• 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

Revision8f2036dc0d8fd34dda286eaf00fb4cd1b8e3499e (tree)
Time2021-07-19 00:26:04
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Organize late movement commands from a player chronologically in case the server receives them in the wrong order.

Change Summary

Incremental Difference

diff -r 4bb3026890ef -r 8f2036dc0d8f src/sv_main.cpp
--- a/src/sv_main.cpp Sun Jul 18 00:48:16 2021 -0400
+++ b/src/sv_main.cpp Sun Jul 18 11:26:04 2021 -0400
@@ -5098,7 +5098,19 @@
50985098 // [AK] We want to try filling this buffer only when the client is suffering from a ping
50995099 // spike, not when they're experiencing packet loss.
51005100 if ( cmd->getClientTic( ) <= ulMaxClientTic )
5101+ {
51015102 buffer = &g_aClients[g_lCurrentClient].LateMoveCMDs;
5103+
5104+ // [AK] Organize the late movement commands in case they arrived in the wrong order.
5105+ for ( unsigned int i = 0; i < buffer->Size( ); i++ )
5106+ {
5107+ if ( cmd->getClientTic( ) < ( *buffer )[i]->getClientTic( ))
5108+ {
5109+ buffer->Insert( i, cmd );
5110+ return false;
5111+ }
5112+ }
5113+ }
51025114 }
51035115 }
51045116