• R/O
  • SSH

Commit

Tags
Aucun tag

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 Beta for TSPG.


Commit MetaInfo

Révision272303b859971bbb4890f973d490f60752a0db8a (tree)
l'heure2021-11-19 23:23:35
AuteurAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Message de Log

Moved some code from P_Ticker over to SERVER_HandleSkipCorrection.

Change Summary

Modification

diff -r bef9a71cd25d -r 272303b85997 src/p_tick.cpp
--- a/src/p_tick.cpp Mon Nov 22 09:32:33 2021 +1100
+++ b/src/p_tick.cpp Fri Nov 19 09:23:35 2021 -0500
@@ -324,17 +324,9 @@
324324 continue;
325325
326326 CLIENT_s *client = SERVER_GetClient( ulIdx );
327- ULONG ulNumMoveCMDs = 0;
328-
329- // [AK] Count how many movement commands are inside the client's tic buffer.
330- for ( unsigned int i = 0; i < client->MoveCMDs.Size( ); i++ )
331- {
332- if ( client->MoveCMDs[i]->isMoveCmd( ))
333- ulNumMoveCMDs++;
334- }
335327
336328 // [AK] Handle the skip correction.
337- SERVER_HandleSkipCorrection( ulIdx, ulNumMoveCMDs );
329+ SERVER_HandleSkipCorrection( ulIdx );
338330
339331 while ( client->MoveCMDs.Size( ) != 0 )
340332 {
diff -r bef9a71cd25d -r 272303b85997 src/sv_main.cpp
--- a/src/sv_main.cpp Mon Nov 22 09:32:33 2021 +1100
+++ b/src/sv_main.cpp Fri Nov 19 09:23:35 2021 -0500
@@ -5407,9 +5407,10 @@
54075407
54085408 //*****************************************************************************
54095409 //
5410-void SERVER_HandleSkipCorrection( ULONG ulClient, ULONG ulNumMoveCMDs )
5410+void SERVER_HandleSkipCorrection( ULONG ulClient )
54115411 {
54125412 CLIENT_s *pClient = &g_aClients[ulClient];
5413+ ULONG ulNumMoveCMDs = 0;
54135414 FString debugMessage;
54145415
54155416 // [AK] Don't handle the skip correction if it's supposed to be disabled.
@@ -5421,6 +5422,13 @@
54215422 if (( players[ulClient].mo == NULL ) || ( pClient->lLastMoveTickProcess == gametic ))
54225423 return;
54235424
5425+ // [AK] Count how many movement commands are inside the client's tic buffer.
5426+ for ( unsigned int i = 0; i < pClient->MoveCMDs.Size( ); i++ )
5427+ {
5428+ if ( pClient->MoveCMDs[i]->isMoveCmd( ))
5429+ ulNumMoveCMDs++;
5430+ }
5431+
54245432 // When a player is experiencing ping spikes or packet loss and we don't have any commands
54255433 // left in their buffer, we will try to predict where they will be for at least the next few tics
54265434 // until we start receiveing commands from them again. In case the player suffers from a ping spike, we
diff -r bef9a71cd25d -r 272303b85997 src/sv_main.h
--- a/src/sv_main.h Mon Nov 22 09:32:33 2021 +1100
+++ b/src/sv_main.h Fri Nov 19 09:23:35 2021 -0500
@@ -639,7 +639,7 @@
639639 void SERVER_KillCheat( const char* what );
640640 void STACK_ARGS SERVER_PrintWarning( const char* format, ... ) GCCPRINTF( 1, 2 );
641641 void SERVER_FlagsetChanged( FIntCVar& flagset, int maxflags = 2 );
642-void SERVER_HandleSkipCorrection( ULONG ulClient, ULONG ulNumMoveCMDs );
642+void SERVER_HandleSkipCorrection( ULONG ulClient );
643643 bool SERVER_IsExtrapolatingPlayer( ULONG ulClient );
644644 bool SERVER_IsBacktracingPlayer( ULONG ulClient );
645645 void SERVER_ResetClientTicBuffer( ULONG ulClient );