Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Syncing or changing BuildingGameObj 'IsDetroyed' state for clients
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488178 is a reply to message #482894] Tue, 01 July 2014 01:43 Go to previous messageGo to previous message
jonwil is currently offline  jonwil
Messages: 3560
Registered: February 2003
Karma:
General (3 Stars)

The following events happen in the On_Destroyed event (called when a building is destroyed):
BuildingGameObj IsDestroyed is set to true, BaseControllerClass::On_Building_Destroyed is called (this plays the "building destroyed" sound and sets the "base destroyed" flag if all buildings are dead), BaseControllerClass::Check_Prerequisites is called (this goes with the prerequisite logic where stuff you buy from the sidebar can have a flag that says "this building must exist/must be alive for the object to be purchasable") and the building is made visible in the single player encyclopedia.

AirFactoryGameObj BaseControllerClass::Check_Vehicle_Factory is called (this sets the CanGenerateVehicles flag appropriately based on the buildings that are present and alive)

ComCenterGameObj BaseControllerClass::Check_Radar is called (this toggles the radar depending on what buildings exist/are alive)

NavalFactoryGameObj BaseControllerClass::Check_Vehicle_Factory is called (this sets the CanGenerateVehicles flag appropriately based on the buildings that are present and alive)

PowerPlantGameObj BaseControllerClass::Check_Base_Power is called (this sets the base power as appropriate based on the buildings that are present and alive)

RefineryGameObj Destroys any instances of the harvester preset, also disables any spawners that would spawn the harvester preset (said spawners are used for maps that have a refinery but no weapons factory)

SoldierFactoryGameObj Sets the CanGenerateSoldiers flag to off.

WeaponsFactoryGameObj BaseControllerClass::Check_Vehicle_Factory is called (this sets the CanGenerateVehicles flag appropriately based on the buildings that are present and alive)

So yes more happens than just toggling the flag and any engine feature that might be added in the future would be undoing those other things that happen (e.g. turning CanGenerateSoldiers back on for a SoldierFactoryGameObj, restoring the harvester spawners for a RefineryGameObj etc)


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
 
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
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
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: Trouble downloading scripts
Next Topic: Can't see player names anymore?
Goto Forum:
  


Current Time: Fri Jul 18 04:18:27 MST 2025

Total time taken to generate the page: 0.02544 seconds