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 #487503 is a reply to message #487487] Sun, 04 May 2014 14:37 Go to previous messageGo to previous message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma:
Commander
danpaul88 wrote on Sun, 04 May 2014 09:02

Breaking the lifecycle contract of a GameObject is incredibly dangerous and, whilst it might work in limited test cases, you fail to see the wider implications.

All GameObjects have a guarunteed lifecycle whereby they transition from Created -> Destroyed, usually via Killed unless removed from the level by a script or other event. Scripts attached to that object are free to make the assumption that they can clean up resources once Killed or Destroyed are called. Subsequently causing that GameObject to be alive again and triggering Damaged events or another Killed / Destroyed event in this case would cause that script to be in an invalid state and could result in a crash.

This is one of many resons why transitioning ANY object from Destroyed back to a "live" state will NEVER be officially supported.

The only valid way to do this is to instantiate an entirely new GameObject instance... and it is not possible to create building controllers at run time because they are part of the level static data.



I think your understanding of how this works only applies to objects that aren't building controllers. Building controllers behave quite differently than other objects. Also the part you are worried about (the behavior of attached scripts) is already possible on the current scripts. The scripts attached to buildings are run server side and its already possible to restore a building server side. The issue being discussed here is syncing that restore with the client who doesn't have to deal with what scripts are attached to a building controller at all. Many servers have been running server side restores without issue. I think this should be investigated further than just outright denied. It really would provide a lot of benefits, possible even make a building like a construction yard worth protecting if it had some kind of restore role for other buildings.

I have repeatedly destroyed and restored buildings multiple times in the same game to see if I could glitch the game out. No luck, everything worked flawlessly.

[Updated on: Sun, 04 May 2014 14:42]

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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Mon Feb 17 02:25:54 MST 2025

Total time taken to generate the page: 0.02232 seconds