|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488205 is a reply to message #488203] |
Tue, 01 July 2014 10:10 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
Ethenal wrote on Tue, 01 July 2014 09:55 | Of course it's hacky, you're setting an internal netcode flag in a manner that wasn't originally intended, I have no clue how you can possibly tell me it's not "hacky." Being "hacky" does not make it incorrect, but it does make it "hacky." Or maybe see the term kludge
|
Except we aren't using some undocumented piece of code. We are using a function right out of the scripts to set the flag. Heck the plugin doesn't even set the flag. Scripts.DLL does. It works unmodified server side which is why it doesn't make sense to start making changes to the server side code. The only thing that needs to be set client side is the isdestroyed flag. Stuff like base power, defenses, rebuilding a harvester, etc is all server side and doesn't require any changes to be made to the netcode at all. That stuff already works.
If you want to see what function we are using its Restore_Building in engine_game.CPP.
[Updated on: Tue, 01 July 2014 10:43] Report message to a moderator
|
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488207 is a reply to message #482894] |
Tue, 01 July 2014 10:28 |
|
Ethenal
Messages: 2532 Registered: January 2007 Location: US of A
Karma: 0
|
General (2 Stars) |
|
|
I did not say it didn't work, I said it was a kludge, which you pretty much just agreed with. Stop ignoring me and actually read my post!
Look, the bottom line is that neither dblaney1 or I understand the implications of this change in the code more than jonwil or StealthEye, and that is what I'm trying to say. If you try to tell the few people that still read this forum that you are the messiah and are more knowledgeable than either individual, nobody's going to listen to you because both of them have put years of work into this game, and those of us that still play have benefited from their individual work for many, many years.
-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
|
[Updated on: Tue, 01 July 2014 10:30] Report message to a moderator
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488208 is a reply to message #488206] |
Tue, 01 July 2014 10:33 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
Xpert wrote on Tue, 01 July 2014 10:26 | Because those buildings are just script attachments. Yes we can revive the buildings by reattaching the scripts but it still needs the IsDestroyed flag because it isn't actually registered as being alive. When you kill the building again, there's no EVA sound because it's set to destroyed to begin with.
|
Yup that's what I was saying. Iran's fix which syncs the isdestroyed flag fixes both the destroy messages and the ability to build units from the PT.
If you wanna test it make a backup of your bandtest.DLL and use this patched version. This is only needed on your client. Nothing needs to be channgef on the server. I have been running it for over two months now. Fixes both the PT's and destroyed messages. This patch allows the client to set the isdestroyed back to false. The server already sends out the proper netcode to the clients. The clients just don't have the ability to set the flag to false without the patch.
http://www.renegadeforums.com/index.php?t=getfile&id=14941&
[Updated on: Tue, 01 July 2014 10:42] Report message to a moderator
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488209 is a reply to message #488207] |
Tue, 01 July 2014 10:43 |
|
Xpert
Messages: 1588 Registered: December 2005 Location: New York City
Karma: 0
|
General (1 Star) |
|
|
Ethenal wrote on Tue, 01 July 2014 13:28 | I did not say it didn't work, I said it was a kludge, which you pretty much just agreed with. Stop ignoring me and actually read my post!
Look, the bottom line is that neither dblaney1 or I understand the implications of this change in the code more than jonwil or StealthEye, and that is what I'm trying to say. If you try to tell the few people that still read this forum that you are the messiah and are more knowledgeable than either individual, nobody's going to listen to you because both of them have put years of work into this game, and those of us that still play have benefited from their individual work for many, many years.
|
I don't know if that was directed at me but I think you completely misread my post. I'm not disagreeing with you. I'm trying to explain that the reason why those buildings work is not because of a "hacky" method, but it's because it's just script attachments and nothing else.
God what a cluster fuck of a topic.
I actually agree with why they didn't do it. I'm trying to explain that the methods to revive those specific buildings, weren't hacky. Those buildings only needed script attachments. The same can't be done with the WF/Air + Bar/Hand because those require updating clients.
Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.
Part time streamer - https://twitch.tv/gg_wonder
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488210 is a reply to message #482894] |
Tue, 01 July 2014 10:52 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
No matter how you slice it the client needs to be able to set the isdestroyed flag back to false. Both iran's patch and jonwils proposal do this. The difference is that iran's patch ends there and that's the only change made. On the contrary jonwils proposal makes that same change but also adds a bunch more changes that could potentially break things. No matter how you slice it, simply adding the code for clients to reset the flag back to false is less likely to adversely affect other things than doing both that and making large changes to the building controller code.
Essentially x<x+1.
[Updated on: Tue, 01 July 2014 10:53] Report message to a moderator
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488211 is a reply to message #482894] |
Tue, 01 July 2014 11:06 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
You can rant and rave all you like, it won't change the fact that we won't just throw a random bit of bodge code in to make you happy. If it's going to be done it will be done properly.
The more you whine and moan about it the more irritated we all get with you and this in turn makes people less inclined to look into it. You really do have very poor people skills, you might want to look into that.
[Updated on: Tue, 01 July 2014 11:10] Report message to a moderator
|
|
|
|
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488224 is a reply to message #482894] |
Tue, 01 July 2014 13:19 |
StealthEye
Messages: 2518 Registered: May 2006 Location: The Netherlands
Karma: 0
|
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/
|
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488233 is a reply to message #488224] |
Tue, 01 July 2014 13:53 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
StealthEye wrote on Tue, 01 July 2014 13:19 |
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.
|
I agree with this stance 100%.
That is exactly what we are requesting in this thread. Nothing more nothing less.
[Updated on: Tue, 01 July 2014 13:56] Report message to a moderator
|
|
|
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488271 is a reply to message #488268] |
Wed, 02 July 2014 08:34 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
Jerad Gray wrote on Wed, 02 July 2014 07:28 | Hate to ask but it seems like all that would really be required is sending a message to the client on join for all the builds on the map, like how animated tiles work, when you join the game they all play animations to the frame they're at on the sever (IE, if you have a radio tower that tipped over server side 25 minutes ago, and a player joins, they get to see it tip over the second they get in game).
The only difference here would be the message would tell the client to set the buildings destroyed flag to the supplied parameter.
|
It actually already works for people that join after a restore. The issue is clients that are already in the server.
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488602 is a reply to message #482894] |
Tue, 15 July 2014 02:13 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
Started working on this.
Full client support, even on non-4.2 servers.
You can revive buildings with the revivebuildingbytype, revivebuildingbypreset, and revivebuildingbyname console commands, or by calling BuildingGameObj::On_Revived directly.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
Re: Syncing or changing BuildingGameObj 'IsDetroyed' state for clients [message #488629 is a reply to message #488602] |
Tue, 15 July 2014 15:26 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
Whitedragon wrote on Tue, 15 July 2014 02:13 | Started working on this.
Full client support, even on non-4.2 servers.
You can revive buildings with the revivebuildingbytype, revivebuildingbypreset, and revivebuildingbyname console commands, or by calling BuildingGameObj::On_Revived directly.
|
Sounds great. Thanks.
|
|
|