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 #487616 is a reply to message #487615] Fri, 16 May 2014 08:01 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Jerad Gray wrote on Fri, 16 May 2014 15:48

<snipped nested quotes>

Last time I ran into it was caused by changing the player character on spawn, but that is one of the rare occurrences where I had complete control and could have found a way around it besides just making a flag external to the script to check.

In the wild, I've seen it caused by things ranging from a separate timer doing clean up, to something a player does (for example once I saw a player die while at a PT (due to lag or a lockup which ever the case was they were still in the PT after their char died) and just as the player's character spawned they bought a character from the PT, the destroy flag on the scripts attached to the spawn character were called before the create due to the character being 'destroyed' and replaced with a new character.

Mind you, this is only a problem if your storing an array index, or a pointer in your script (playerId for efficiency, or a pointer to a list being the most common occurance).

Normally I just protect against it now by attaching a dummy script as the final step of create and then checking for the attached script on any classes that I've found can be called before create (Custom, Damaged, Killed, and Destroyed are the ones that come to mind) on any sensitive scripts (in all of ECW I've done this less than 50 times, and that's a good 4.27MB of code.



It's good practice to initialize any pointers to NULL in the constructor and then check != NULL in the Destroyed method.

The spawn character change should be safe in 4.1 since the lifecycle had some fixed applied at that time which should ensure the correct ordering of events.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 16 May 2014 08:02]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487618 is a reply to message #487616] Fri, 16 May 2014 08:15 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
danpaul88 wrote on Fri, 16 May 2014 09:01

Jerad Gray wrote on Fri, 16 May 2014 15:48

<snipped nested quotes>

Last time I ran into it was caused by changing the player character on spawn, but that is one of the rare occurrences where I had complete control and could have found a way around it besides just making a flag external to the script to check.

In the wild, I've seen it caused by things ranging from a separate timer doing clean up, to something a player does (for example once I saw a player die while at a PT (due to lag or a lockup which ever the case was they were still in the PT after their char died) and just as the player's character spawned they bought a character from the PT, the destroy flag on the scripts attached to the spawn character were called before the create due to the character being 'destroyed' and replaced with a new character.

Mind you, this is only a problem if your storing an array index, or a pointer in your script (playerId for efficiency, or a pointer to a list being the most common occurance).

Normally I just protect against it now by attaching a dummy script as the final step of create and then checking for the attached script on any classes that I've found can be called before create (Custom, Damaged, Killed, and Destroyed are the ones that come to mind) on any sensitive scripts (in all of ECW I've done this less than 50 times, and that's a good 4.27MB of code.



It's good practice to initialize any pointers to NULL in the constructor and then check != NULL in the Destroyed method.

The spawn character change should be safe in 4.1 since the lifecycle had some fixed applied at that time which should ensure the correct ordering of events.

Misread, never thought of it, not sure how the scripts are actually put together in the background. I've seen game engines where the script classes were just used to make the definitions, so the constructors were called once for a class on gameEngine load, not per attachment on each object. Guess I imagined that ren was the same so I never bothered with it.


[Updated on: Fri, 16 May 2014 08:21]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487620 is a reply to message #482894] Fri, 16 May 2014 08:24 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
The constructor is ALWAYS called, even before Created gets called. Setting your pointers to NULL in the class constructor should always be safe.

(EDIT: I see you edited your post so the above is irrelevant now)


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 16 May 2014 08:24]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487716 is a reply to message #482894] Wed, 28 May 2014 15:11 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Please do this in some future patch Smile

https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487717 is a reply to message #482894] Thu, 29 May 2014 01:20 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
As has already been stated countless times, there will be no more scripts releases for Renegade other than any bug fix releases required to fix bugs / crashes / anti-cheat.

http://steamsignature.com/card/1/76561197975867233.png
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487719 is a reply to message #482894] Thu, 29 May 2014 05:41 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Still i would like it Razz

https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487723 is a reply to message #487719] Thu, 29 May 2014 17:37 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
zunnie wrote on Thu, 29 May 2014 06:41

Still i would like it Razz

You need to offer incentives Zunnie, I suggest offering money or sexual favors.

On a side note I was on a server yesterday and buildings were coming back to life just fine and all I'm running is the latest scripts release.


[Updated on: Thu, 29 May 2014 17:39]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487725 is a reply to message #482894] Thu, 29 May 2014 17:58 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

edit

https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png

[Updated on: Thu, 29 May 2014 22:07]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487726 is a reply to message #487717] Thu, 29 May 2014 18:32 Go to previous messageGo to next message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma: 0
Commander
danpaul88 wrote on Thu, 29 May 2014 01:20

As has already been stated countless times, there will be no more scripts releases for Renegade other than any bug fix releases required to fix bugs / crashes / anti-cheat.


We don't want a new scripts release, we just want this file distributed through the auto updater. I don't know why you guys are resisting this so much. I have been running the patched bandtest.dll for over a month now without a single crash.

[Updated on: Thu, 29 May 2014 18:34]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487727 is a reply to message #482894] Thu, 29 May 2014 21:10 Go to previous messageGo to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
I agree with listening to the tt devs Satisfied
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487728 is a reply to message #487726] Thu, 29 May 2014 21:18 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
dblaney1 wrote on Thu, 29 May 2014 19:32

danpaul88 wrote on Thu, 29 May 2014 01:20

As has already been stated countless times, there will be no more scripts releases for Renegade other than any bug fix releases required to fix bugs / crashes / anti-cheat.


We don't want a new scripts release, we just want this file distributed through the auto updater. I don't know why you guys are resisting this so much. I have been running the patched bandtest.dll for over a month now without a single crash.


make a few little mods to your server and you think you know what's best for all of us.... Thumbs Up Sarcasm
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487729 is a reply to message #482894] Thu, 29 May 2014 21:45 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

The fact of the matter is that at this stage in the game, very few people would benefit from this "modification" anyway. Yes, some people would definitely reap something from this - but not very many, and certainly not enough to make such a fuss about it.

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487730 is a reply to message #487728] Thu, 29 May 2014 22:25 Go to previous messageGo to next message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma: 0
Commander
Mauler wrote on Thu, 29 May 2014 21:18

dblaney1 wrote on Thu, 29 May 2014 19:32

danpaul88 wrote on Thu, 29 May 2014 01:20

As has already been stated countless times, there will be no more scripts releases for Renegade other than any bug fix releases required to fix bugs / crashes / anti-cheat.


We don't want a new scripts release, we just want this file distributed through the auto updater. I don't know why you guys are resisting this so much. I have been running the patched bandtest.dll for over a month now without a single crash.


make a few little mods to your server and you think you know what's best for all of us.... Thumbs Up Sarcasm



It would be good if you actually understood that this is a Client Side patch, so servers have absolutely nothing to do with this at all. The file in question doesn't even exist on the server.
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487731 is a reply to message #487730] Thu, 29 May 2014 22:34 Go to previous messageGo to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
dblaney1 wrote on Thu, 29 May 2014 22:25

Mauler wrote on Thu, 29 May 2014 21:18

dblaney1 wrote on Thu, 29 May 2014 19:32

danpaul88 wrote on Thu, 29 May 2014 01:20

As has already been stated countless times, there will be no more scripts releases for Renegade other than any bug fix releases required to fix bugs / crashes / anti-cheat.


We don't want a new scripts release, we just want this file distributed through the auto updater. I don't know why you guys are resisting this so much. I have been running the patched bandtest.dll for over a month now without a single crash.


make a few little mods to your server and you think you know what's best for all of us.... Thumbs Up Sarcasm



It would be good if you actually understood that this is a Client Side patch, so servers have absolutely nothing to do with this at all. The file in question doesn't even exist on the server.


I believe what my good friend is saying is that because you wrote some pedestrian code you think you know more than the tt devs Listen
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487732 is a reply to message #487731] Thu, 29 May 2014 22:41 Go to previous messageGo to next message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma: 0
Commander
roszek wrote on Thu, 29 May 2014 22:34

dblaney1 wrote on Thu, 29 May 2014 22:25

Mauler wrote on Thu, 29 May 2014 21:18

dblaney1 wrote on Thu, 29 May 2014 19:32

danpaul88 wrote on Thu, 29 May 2014 01:20

As has already been stated countless times, there will be no more scripts releases for Renegade other than any bug fix releases required to fix bugs / crashes / anti-cheat.


We don't want a new scripts release, we just want this file distributed through the auto updater. I don't know why you guys are resisting this so much. I have been running the patched bandtest.dll for over a month now without a single crash.


make a few little mods to your server and you think you know what's best for all of us.... Thumbs Up Sarcasm



It would be good if you actually understood that this is a Client Side patch, so servers have absolutely nothing to do with this at all. The file in question doesn't even exist on the server.


I believe what my good friend is saying is that because you wrote some pedestrian code you think you know more than the tt devs Listen



I only have two college degrees in Computer science/Software Engineering and Network Engineering, and contribute to several major open source projects with actual code that has been merged and used by millions of devices.

[Updated on: Thu, 29 May 2014 22:42]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487733 is a reply to message #482894] Fri, 30 May 2014 01:42 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Lots of people have degrees in computing. In my experience that doesn't necessarily mean they know the first thing about computing... degrees just mean you memorized what you needed to know to pass a test, they're useful for getting your foot in the door as a graduate but beyond that you need to prove yourself in battle with the compiler and prove you know your stuff.

But that's by the by, just saying that I'm not impressed by anyone who thinks quoting their degrees somehow indicates their level of competency.



And, for the record, no, we will not be pushing an unverified third party file which wasn't generated by our build server to the patching system.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 30 May 2014 01:42]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487734 is a reply to message #482894] Fri, 30 May 2014 04:59 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

As the guy who is (at this point) basically in charge of any future scripts releases for Renegade, I am going to say that this feature will NOT be included (regardless of whether any future releases get made or not). Continuing to ask for it will not help, it will just make me even less likely to care about your feature.

As of now, we have NO plans to push any further scripts builds in any case (if bugs show up that are game-breaking, we MAY consider a new build but as of right now there are no game-breaking bugs that we need to deal with)


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
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #487974 is a reply to message #482894] Sun, 22 June 2014 10:11 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

If this were requested for APB, it would'be been done yesterday lol.

https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488021 is a reply to message #487974] Thu, 26 June 2014 08:13 Go to previous messageGo to next message
bmruze is currently offline  bmruze
Messages: 62
Registered: March 2006
Location: South Carolina
Karma: 1
Recruit

What they have done so far with the scripts will look good on their resume. Why take a chance on incorporating something that could cause more issues and require more work. Stick with what's solid and working.

I am in no way saying that they are lazy or are only doing this to help their resume. I'm just saying that this is what I would do if I was them.


https://content.screencast.com/users/bmruze/folders/Jing/media/b3acb17d-6b52-4e10-8183-eae956a12446/2017-09-02_0843.png
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488022 is a reply to message #482894] Thu, 26 June 2014 08:52 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
I don't even include scripts.dll or indeed any W3D based stuff on my CV... this is something I do in my free time and I don't expect anything from it.

http://steamsignature.com/card/1/76561197975867233.png
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488032 is a reply to message #487734] Fri, 27 June 2014 04:07 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
jonwil wrote on Fri, 30 May 2014 07:59

As the guy who is (at this point) basically in charge of any future scripts releases for Renegade, I am going to say that this feature will NOT be included (regardless of whether any future releases get made or not). Continuing to ask for it will not help, it will just make me even less likely to care about your feature.




Don't ask for it to go in, because the answer will be even more of a no? lol...

zunnie wrote on Sun, 22 June 2014 13:11

If this were requested for APB, it would'be been done yesterday lol.


Yeah, he's kinda right.



Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488042 is a reply to message #487974] Fri, 27 June 2014 16:40 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

zunnie wrote on Mon, 23 June 2014 01:11

If this were requested for APB, it would'be been done yesterday lol.

Actually no, I wouldn't add this feature for APB. At least not in the way that people are asking for here.


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
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488046 is a reply to message #482894] Fri, 27 June 2014 17:37 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

All this nonsense ignores the fact that allowing buildings to be revived is a pretty dubious Renegade "feature" LOL

And what I mean by a "dubious Renegade feature" is that it's an absolutely terrible idea bar-fucking-none


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488060 is a reply to message #482894] Sat, 28 June 2014 01:01 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
General (4 Stars)
Yeah being able to revive buildings when they were illegally destroyed or adding special features/game modes based on it is fucking terrible. Why would you ever want to do such a thing?

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Sat, 28 June 2014 01:02]

Report message to a moderator

Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488063 is a reply to message #482894] Sat, 28 June 2014 08:45 Go to previous messageGo to previous message
EvilWhiteDragon is currently offline  EvilWhiteDragon
Messages: 3751
Registered: October 2005
Location: The Netherlands
Karma: 0
General (3 Stars)

How do you illegally destroy a building?

http://www.blackintel.org/usr/evilwhitedragon/pointfix.gif
BlackIntel admin/founder/PR dude (not a coder)
Please visit http://www.blackintel.org/

V, V for Vendetta

People should not be afraid of their governments.
Governments should be afraid of their people.
Previous Topic: Trouble downloading scripts
Next Topic: Can't see player names anymore?
Goto Forum:
  


Current Time: Mon Dec 02 22:02:40 MST 2024

Total time taken to generate the page: 0.01551 seconds