T3D 1.1 Final - Server does not sanity check the timing of moves from client - RESOLVED (THREED-2600)
by Guy Allard · in Torque 3D Professional · 05/09/2011 (12:52 pm) · 28 replies
Build T3D 1.1 Final (and earlier?)
Platform: any
Target: Game
Issues:
When connected to a dedicated server, setting $timescale to a value > 1 on the client results in the movement speed for that client increasing. The increased movement speed is not only client side, but is mirrored on the server and is visible to all other clients connected to the dedicated server.
This should not be possible as the server is supposed to be authoritative in this situation.
Steps to repeat:
Put up a dedicated server. Connect to it along with some friends so that they can witness your greatness. Pull down your console and type $timescale=5 into the console. Run around while laughing maniacally at your l33t sp33d pwn4ge.
Suggested fix:
please.
Platform: any
Target: Game
Issues:
When connected to a dedicated server, setting $timescale to a value > 1 on the client results in the movement speed for that client increasing. The increased movement speed is not only client side, but is mirrored on the server and is visible to all other clients connected to the dedicated server.
This should not be possible as the server is supposed to be authoritative in this situation.
Steps to repeat:
Put up a dedicated server. Connect to it along with some friends so that they can witness your greatness. Pull down your console and type $timescale=5 into the console. Run around while laughing maniacally at your l33t sp33d pwn4ge.
Suggested fix:
please.
About the author
Recent Threads
#22
09/23/2011 (4:20 pm)
TheMartian is absolutely correct. I tested both TGE 1.1 (Anybody remember when GG offered TGE as a shipped CD for $10?) and TGE 1.5.2 vanilla as well. During both tests when the client player side set $timescale to 5.0 in the console it caused the client side to jitter like crazy as it was being forced to sync with the server's side of the game session and on the server side the client player actually moved slightly slower, which is a very good thing. So, as to when the authoritative server model of Torque networking broke remains unclear.
#23
I've been working on a fix for this issue and believe I have it resolved. I went back to TGE 1.5.2 to see how it worked and fixed the omissions in T3D 1.2.
Now a cheating client that sets $timescale to something other than 1 will experience rubber banding as the client is forced back into position by the server. Respect My Authoritah!
The first change is to gameBase/moveList.h. Make the clearMoves() method virtual.
The second change is to gameBase/std/stdGameProcess.cpp. Modify the StdServerProcessList::advanceObjects() method to call advanceMove() on all move lists.
If you guys could test it out and let me know that my fix works for you that would be great.
Thanks!
- Dave
09/28/2011 (12:23 pm)
Greetings!I've been working on a fix for this issue and believe I have it resolved. I went back to TGE 1.5.2 to see how it worked and fixed the omissions in T3D 1.2.
Now a cheating client that sets $timescale to something other than 1 will experience rubber banding as the client is forced back into position by the server. Respect My Authoritah!
The first change is to gameBase/moveList.h. Make the clearMoves() method virtual.
virtual void clearMoves( U32 count );
The second change is to gameBase/std/stdGameProcess.cpp. Modify the StdServerProcessList::advanceObjects() method to call advanceMove() on all move lists.
void StdServerProcessList::advanceObjects()
{
#ifdef TORQUE_DEBUG_NET_MOVES
Con::printf("Advance server time...");
#endif
Parent::advanceObjects();
// Credit all connections with the elapsed tick
SimGroup *clientGroup = Sim::getClientGroup();
for(SimGroup::iterator i = clientGroup->begin(); i != clientGroup->end(); i++)
{
if (GameConnection *con = dynamic_cast<GameConnection *>(*i))
{
con->mMoveList->advanceMove();
}
}
#ifdef TORQUE_DEBUG_NET_MOVES
Con::printf("---------");
#endif
}If you guys could test it out and let me know that my fix works for you that would be great.
Thanks!
- Dave
#24
09/28/2011 (7:44 pm)
Hey David, I finally got a chance to try out your changes and to me this looks like a working fix as the results were pretty much exactly what I saw with TGE 1.1.0 and TGE 1.5.2. Thanks for taking the time to figure it out. :)
#25
09/29/2011 (3:24 am)
@David, first tests of this are positive :) Clientside timescale modifications appear to be corrected by the server. Good stuff!
#26
- Dave
09/29/2011 (8:57 am)
Whew! Cool beans, guys. It took me a while to trace through the networking and move list code to end up at this fix. I'm glad to hear that your initial testing is working out.- Dave
#27
09/29/2011 (9:54 am)
How the heck did you track that down? Seems like such a small fix :)
#28
10/11/2011 (2:40 pm)
Fixed in 1.2.
Torque Owner TheMartian
Conundrum Studios
I was one of the original posters in that thread way back when, back in the 1.4 and older versions of torque (v12 engine and such) and I was pretty sure our testing team and tried the various speed hack programs with no effect. And I do not recall this being a problem in the original tribes games either.
which would imply somewhere along the way this use to work and then was broken.
Is that what you guys are finding? Does anyone still have an uber old original version of the TGE engine from back when GG started to test on?