# HG changeset patch # User Adam Kaminski # Date 1635612963 14400 # Sat Oct 30 12:56:03 2021 -0400 # Node ID a12532ad763539552b5dd3f224dffd0b4a2754fa # Parent abe15d4f605fb219f2ce1ec472d3af65b7a409e0 Fixed the client's last movement command and gametic not being updated when a backtrace isn't performed. diff -r abe15d4f605f -r a12532ad7635 src/sv_main.cpp --- a/src/sv_main.cpp Sat Oct 30 12:44:04 2021 -0400 +++ b/src/sv_main.cpp Sat Oct 30 12:56:03 2021 -0400 @@ -7440,9 +7440,18 @@ Printf( "accepted.\n" ); } } - else if ( sv_smoothplayers_debuginfo ) - { - Printf( "%d: no need to backtrace %s.\n", gametic, players[ulClient].userinfo.GetName( )); + else + { + // [AK] We still need to update the client's last move command to the late command we received last. + // We also need to set their gametic so that they don't think they're lagging. + ULONG ulLastIdx = pClient->LateMoveCMDs.Size( ) - 1; + pClient->ulClientGameTic += pClient->ulExtrapolatedTics; + + delete pClient->LastMoveCMD; + pClient->LastMoveCMD = new ClientMoveCommand( *static_cast( pClient->LateMoveCMDs[ulLastIdx] )); + + if ( sv_smoothplayers_debuginfo ) + Printf( "%d: no need to backtrace %s.\n", gametic, players[ulClient].userinfo.GetName( )); } SERVER_ResetClientExtrapolation( ulClient );