Home » Renegade Discussions » Mod Forum » Low Health
Re: Low Health [message #324883 is a reply to message #316585] |
Wed, 02 April 2008 05:53 |
EA-DamageEverything
Messages: 423 Registered: January 2005 Location: Germany
Karma:
|
Commander |
|
|
CarrierII wrote on Mon, 11 February 2008 22:30 | Sort of related, anyone intend to fix the serverside functionality that made EVA/CABAL say "GDI Weapons Factory destruction imminent"?
| BUMP, yes. All "destruction imminent" Sounds are inside the gmscripts.cpp from the SSGM source. Replace the follwoing part with this expanded one=
void MDB_SSGM_Building::Damaged(GameObject *obj, GameObject *damager, float damage) {
if ((Commands->Get_ID(damager) != 0 && !Settings->InvinBuild) && (Settings->GameMode == 1 || Settings->GameMode == 5)) {
if (damage > 0) {
if (Settings->LogBuildingDamage && ReportDamage) {
ReportDamage = false;
FDSMessage(StrFormat("The %s is under attack!",Translate_Preset(obj).c_str()),"_BUILDING");
Commands->Start_Timer(obj,this,Settings->BuildingDamageInt,1);
}
if (!Data->Mod) {
if (!OkHealth) OkHealth = true;
if (PlayHealth && (Commands->Get_Health(obj) + Commands->Get_Shield_Strength(obj)) <= ((Commands->Get_Max_Health(obj) + Commands->Get_Max_Shield_Strength(obj)) * 0.2f)) {
PlayHealth = false;
char *Announcement = "ERROR";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Advanced_Guard_Tower")) Announcement = "M00BGAT_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Barracks")) Announcement = "M00BGIB_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_War_Factory")) Announcement = "M00BGWF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Power_Plant")) Announcement = "M00BGPP_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Refinery")) Announcement = "M00BGTR_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Obelisk")) Announcement = "M00BNOL_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Hand_of_Nod")) Announcement = "M00BNHN_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Airstrip")) Announcement = "M00BNAF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Power_Plant")) Announcement = "M00BNPP_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Refinery")) Announcement = "M00BNTR_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Helipad")) Announcement = "M00BGHP_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Helipad")) Announcement = "M00BNHP_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Com_Center")) Announcement = "M00BGCC_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Com_Center")) Announcement = "M00BNCC_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Facility")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Facility")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Tiberium_Silo")) Announcement = "M00BGTS_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Tiberium_Silo")) Announcement = "M00BNTS_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Bay")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Pad")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Bay")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Pad")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_RepFac")) Announcement = "M00BGRF_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_NOD_RepFac")) Announcement = "M00BNRF_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"MP_GDI_ConstructionYard")) Announcement = "M00BGCY_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"MP_Nod_ConstructionYard")) Announcement = "M00BNCY_HLTH0001I1EVAN_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_GDI")) Announcement = "M00BGCY_HLTH0001I1EVAG_SND.wav";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_Nod")) Announcement = "M00BNCY_HLTH0001I1EVAN_SND.wav";
if (IsAlive) {
Commands->Create_2D_Sound(Announcement);
Commands->Start_Timer(obj,this,30.0f,22);
}
}
}
}
if (!Data->Mod) {
if ((Commands->Get_Health(obj) + Commands->Get_Shield_Strength(obj)) == (Commands->Get_Max_Health(obj) + Commands->Get_Max_Shield_Strength(obj)) && OkHealth) {
OkHealth = false;
if (PlayRepair) {
PlayRepair = false;
char *Announcement = "ERROR";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Advanced_Guard_Tower")) Announcement = "M00BGAT_DSGN0007I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Barracks")) Announcement = "M00BGIB_DSGN0008I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_War_Factory")) Announcement = "M00BGWF_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Power_Plant")) Announcement = "M00BGPP_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Refinery")) Announcement = "M00BGTR_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Obelisk")) Announcement = "M00BNOL_DSGN0008I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Hand_of_Nod")) Announcement = "M00BNHN_DSGN0016I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Airstrip")) Announcement = "M00BNAF_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Power_Plant")) Announcement = "M00BNPP_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Refinery")) Announcement = "M00BNTR_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Helipad")) Announcement = "M00BGHP_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Helipad")) Announcement = "M00BNHP_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Com_Center")) Announcement = "M00BGCC_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Com_Center")) Announcement = "M00BNCC_DSGN0010I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Facility")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Facility")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Tiberium_Silo")) Announcement = "M00BGTS_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Tiberium_Silo")) Announcement = "M00BNTS_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Bay")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Nod_Repair_Pad")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Bay")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_Repair_Pad")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_GDI_RepFac")) Announcement = "M00BGRF_DSGN0001I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_NOD_RepFac")) Announcement = "M00BNRF_DSGN0002I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"MP_GDI_ConstructionYard")) Announcement = "M00BGCY_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"MP_Nod_ConstructionYard")) Announcement = "M00BNCY_DSGN0009I1EVAN_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_GDI")) Announcement = "M00BGCY_DSGN0009I1EVAG_SND";
if (strstr(Commands->Get_Preset_Name(obj),"mp_Con_Yard_Nod")) Announcement = "M00BNCY_DSGN0009I1EVAN_SND";
if (IsAlive) {
Create_Sound_Team(Announcement,Commands->Get_Position(obj),obj,Get_Object_Type(obj));
Commands->Start_Timer(obj,this,30.0f,23);
}
}
}
}
}
if (obj != damager && damage != 0.0f) {
if (Settings->GameMode == 2 && (Is_SoldierFactory(obj) || Is_Refinery(obj))) {
Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
}
else if ((Settings->GameMode == 3 || Settings->GameMode == 4) && Is_SoldierFactory(obj)) {
Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
}
if (Settings->InvinBuild) {
Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
}
}
}
|
|
|
|
|
Low Health
By: Lone0001 on Wed, 06 February 2008 10:28
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 10:42
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 11:41
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 12:10
|
|
|
Re: Low Health
By: Ethenal on Wed, 06 February 2008 12:13
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 12:20
|
|
|
Re: Low Health
By: Lone0001 on Wed, 06 February 2008 12:21
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 12:25
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 12:45
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 13:21
|
|
|
Re: Low Health
By: Ethenal on Wed, 06 February 2008 13:23
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 13:28
|
|
|
Re: Low Health
By: Ethenal on Wed, 06 February 2008 13:30
|
|
|
Re: Low Health
By: cnc95fan on Wed, 06 February 2008 13:31
|
|
|
Re: Low Health
By: Hex on Wed, 06 February 2008 14:08
|
|
|
Re: Low Health
By: Zion on Wed, 06 February 2008 14:21
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: renalpha on Thu, 03 April 2008 10:50
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: Hex on Wed, 06 February 2008 15:01
|
|
|
Re: Low Health
By: reborn on Wed, 06 February 2008 15:01
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: Brandon on Wed, 02 April 2008 10:13
|
|
|
Re: Low Health
By: jnz on Wed, 02 April 2008 16:44
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: Lone0001 on Wed, 02 April 2008 16:47
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: reborn on Thu, 03 April 2008 12:07
|
|
|
Re: Low Health
By: renalpha on Thu, 03 April 2008 14:06
|
|
|
Re: Low Health
By: renalpha on Sat, 05 April 2008 11:46
|
|
|
Re: Low Health
By: reborn on Sun, 06 April 2008 05:49
|
|
|
Re: Low Health
By: renalpha on Sun, 06 April 2008 06:19
|
|
|
Re: Low Health
By: reborn on Sun, 06 April 2008 08:56
|
|
|
Re: Low Health
By: renalpha on Sun, 06 April 2008 10:24
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: renalpha on Tue, 08 April 2008 22:35
|
|
|
Re: Low Health
By: reborn on Wed, 09 April 2008 00:30
|
|
|
Re: Low Health
By: renalpha on Wed, 09 April 2008 01:32
|
|
|
Re: Low Health
By: reborn on Wed, 09 April 2008 03:27
|
|
|
Re: Low Health
|
|
|
Re: Low Health
By: reborn on Wed, 09 April 2008 04:39
|
Goto Forum:
Current Time: Fri Dec 20 15:49:53 MST 2024
Total time taken to generate the page: 0.01149 seconds
|