Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Building Revival Console Commands v2.0
Re: [SSGM 4.0 Plugin] Building Revival Console Commands v2.0 [message #492000 is a reply to message #491999] Mon, 13 February 2017 10:01 Go to previous messageGo to previous message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma:
Commander
jonwil wrote on Mon, 13 February 2017 01:14

Here is a small update to the code.
Calls to Revive_Building are replaced with calls to Restore_Building (which is the correct engine call to use)
CommandREVIVEBAR and CommandREVIVEHON dont need to call Set_Can_Generate_Soldiers as SoldierFactoryGameObj::On_Revived does that for you.
CommandREVIVEGDIPP and CommandREVIVENODPP are fixed to use Find_Power_Plant.
CommandREVIVEGDICY and CommandREVIVENODCY dont need to call Is_Building_Dead as BuildingGameObj::On_Revived handles that all for you.
CommandREVIVENODSILO and CommandREVIVEGDISILO are fixed to not need the revived variable anymore.
CommandREVIVEAGT and CommandREVIVEOB are fixed to use Find_Base_Defense.



The revived variable was there so that it didn't play the revive sound twice if there were two silos. I actually meant to remove the can generate soldier stuff. Forgot to remove that line. The powerplant was going through all the buildings as there are several maps with multiple powerplants. Thats why it was coded that way. Same for the base defense thing. There are maps out there with multiple Obelisks and AGTs.

Here is a slightly updated version with some of the unnecessary stuff removed using the correct Restore_Building call.

[Updated on: Mon, 13 February 2017 10:17]

Report message to a moderator

 
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: MapFix Plugin
Next Topic: RenList 1.0.9
Goto Forum:
  


Current Time: Wed Jan 15 09:52:57 MST 2025

Total time taken to generate the page: 0.01597 seconds