• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).


Commit MetaInfo

Revision4bb3026890ef34e60a16feae33eee6e0b3f4d1b0 (tree)
Time2021-07-18 13:48:16
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Changed some of the skip correction code.

Change Summary

Incremental Difference

diff -r 232b5f652798 -r 4bb3026890ef src/p_tick.cpp
--- a/src/p_tick.cpp Sat Jul 17 23:56:55 2021 -0400
+++ b/src/p_tick.cpp Sun Jul 18 00:48:16 2021 -0400
@@ -411,6 +411,15 @@
411411 const bool bMovement = client->MoveCMDs[0]->isMoveCmd( );
412412 client->MoveCMDs[0]->process( ulIdx );
413413
414+ if ( bMovement )
415+ {
416+ if ( client->LastMoveCMD != NULL )
417+ delete client->LastMoveCMD;
418+
419+ // [AK] This becomes the last movement command we received from the client.
420+ client->LastMoveCMD = new ClientMoveCommand( *static_cast<ClientMoveCommand *>( client->MoveCMDs[0] ));
421+ }
422+
414423 delete client->MoveCMDs[0];
415424 client->MoveCMDs.Delete(0);
416425
diff -r 232b5f652798 -r 4bb3026890ef src/sv_main.cpp
--- a/src/sv_main.cpp Sat Jul 17 23:56:55 2021 -0400
+++ b/src/sv_main.cpp Sun Jul 18 00:48:16 2021 -0400
@@ -5088,25 +5088,18 @@
50885088 {
50895089 if (( sv_smoothplayers ) && ( cmd->isMoveCmd( )))
50905090 {
5091- ULONG ulNewClientTic = cmd->getClientTic( );
5092-
50935091 // [AK] It's possible this was a command that arrived late and we already extrapolated
50945092 // the player's movement at this tic. In this case, we'll store these commands into a
50955093 // separate buffer so we can backtrace the player's actual movement.
5096- if ( g_aClients[g_lCurrentClient].LastMoveCMD != NULL )
5094+ if (( g_aClients[g_lCurrentClient].LastMoveCMD != NULL ) && ( g_aClients[g_lCurrentClient].ulExtrapolatedTics > 0 ))
50975095 {
50985096 ULONG ulMaxClientTic = g_aClients[g_lCurrentClient].LastMoveCMD->getClientTic( ) + g_aClients[g_lCurrentClient].ulExtrapolatedTics;
50995097
51005098 // [AK] We want to try filling this buffer only when the client is suffering from a ping
51015099 // spike, not when they're experiencing packet loss.
5102- if (( ulNewClientTic < ulMaxClientTic ) || (( g_aClients[g_lCurrentClient].ulExtrapolatedTics > 1 ) && ( ulNewClientTic == ulMaxClientTic )))
5100+ if ( cmd->getClientTic( ) <= ulMaxClientTic )
51035101 buffer = &g_aClients[g_lCurrentClient].LateMoveCMDs;
5104-
5105- delete g_aClients[g_lCurrentClient].LastMoveCMD;
51065102 }
5107-
5108- // [AK] This becomes the last movement command we received from the client.
5109- g_aClients[g_lCurrentClient].LastMoveCMD = new CommandType( *cmd );
51105103 }
51115104
51125105 buffer->Push( cmd );