Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Low Health
Re: Low Health [message #324883 is a reply to message #316585] Wed, 02 April 2008 05:53 Go to previous messageGo to previous message
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));
		}
	}
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GDI Guard Tower(s)?
Next Topic: RenX - protected models?
Goto Forum:
  


Current Time: Fri Dec 20 15:49:53 MST 2024

Total time taken to generate the page: 0.01149 seconds