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 #488224 is a reply to message #482894] Tue, 01 July 2014 13:19 Go to previous messageGo to previous message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma:
General (2 Stars)

The way I see it, syncing the IsDestroyed flag correctly is not a hack. It is actually an improvement to the synchronization of the BuildingGameObj and would imo be part of a proper implementation of building revival. However, that does not mean that after the change BuildingGameObj::Set_Destroyed(false) correctly revives a building. To correctly revive a building, more is needed.

For true building revival, there are three approaches:

1. The way it is currently done. I don't know the details, but I think it is along these lines: call Set_Destroyed(false), check the building type and reattach scripts, send announcements, call Set_Base_Power, Can_Generate_Vehicles, etc. so that the game ends up in the right state - this I'd definitely call a hack, and I would be against including it in the engine like that. (But it's the only way to do it without engine changes, and it apparently works well.)

2. Add a BuildingGameObj::On_Revived function (ala BuildingGameObj::On_Destroyed) or edit BuildingGameObj::Import_Rare to perform the necessary actions when a building is revived. Then, the revival logic is exactly where it should be. - If TT would implement building revival, I think this should be the approach. This takes some development and validation time to do it properly though, and I'm not sure if it's worth it. (This assumes that we have actually cloned enough of the Renegade code to even make that change, but I think we have.)

3. Adding a new net event like jonwil suggested. I do not particularly like that solution either. Building creation or destruction is not an event, why should building revival be.

So, in short, my stance is: (A) implement the syncing of the IsDestroyed flag. It is technically an improvement even if it is not sufficient to make building revival work, and it allows others (albeit with hacks) to implement building revival. (B) Do not implement building revival. It takes too much effort, risks introduction of other bugs, and there are probably more important things to work on.


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
 
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: Thu May 23 14:09:34 MST 2024

Total time taken to generate the page: 1.66706 seconds