• 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évisionbc71b20f4906d81e64102dcc86962b8de5846737 (tree)
l'heure2021-11-22 07:23:55
AuteurJoshua Surace <doomjoshuaboy@live...>
CommiterJoshua Surace

Message de Log

Backed out changeset: 22b486393cf7
Removes: "Increase the client's ping proportionally to the number of expected backup commands."

Change Summary

Modification

diff -r ed48c3edd000 -r bc71b20f4906 src/sv_main.cpp
--- a/src/sv_main.cpp Fri Nov 19 07:39:38 2021 -0500
+++ b/src/sv_main.cpp Mon Nov 22 09:23:55 2021 +1100
@@ -2119,7 +2119,6 @@
21192119 g_aClients[lClient].IgnoredAddresses.clear();
21202120 g_aClients[lClient].ScreenWidth = 0;
21212121 g_aClients[lClient].ScreenHeight = 0;
2122- g_aClients[lClient].ulExtraDelay = 0;
21232122 g_aClients[lClient].ulClientGameTic = 0;
21242123 // [CK] Since the client is not up to date at all, the farthest the client
21252124 // should be able to go back is the gametic they connected with.
@@ -6239,27 +6238,12 @@
62396238 }
62406239 else
62416240 {
6242- // [AK] Adjust the client's old ping based on the extra delay there is due to them sending us backup
6243- // commands. We must do this so that the ping calculation below produces a consistent result.
6244- ULONG oldPing = p->ulPing - g_aClients[g_lCurrentClient].ulExtraDelay;
6245-
6246- p->ulPing = ( p->ulPingAverages * oldPing + currentPing ) / ( 1 + p->ulPingAverages );
6241+ ULONG oldPing = p->ulPing;
6242+ ULONG ulPingAverages = p->ulPingAverages;
6243+ p->ulPing = ( p->ulPingAverages * p->ulPing + currentPing ) / ( 1 + p->ulPingAverages );
62476244 // [BB] The most recent ping measurement should always have a noticeable influence on the average ping.
62486245 if ( p->ulPingAverages < 20 )
62496246 p->ulPingAverages++;
6250-
6251- // [AK] If the client is sending us backup commands, we always have to delay their input enough so that
6252- // we get all the commands at the right time. Therefore, we also increase the client's ping proportionally
6253- // to the number of expected backup commands to indicate this delay to everyone.
6254- if (( p->bSpectating == false ) && ( g_aClients[g_lCurrentClient].ulNumExpectedCMDs > 1 ))
6255- {
6256- g_aClients[g_lCurrentClient].ulExtraDelay = ( g_aClients[g_lCurrentClient].ulNumExpectedCMDs - 1 ) * ticLength;
6257- p->ulPing += g_aClients[g_lCurrentClient].ulExtraDelay;
6258- }
6259- else
6260- {
6261- g_aClients[g_lCurrentClient].ulExtraDelay = 0;
6262- }
62636247 }
62646248
62656249 return ( false );
diff -r ed48c3edd000 -r bc71b20f4906 src/sv_main.h
--- a/src/sv_main.h Fri Nov 19 07:39:38 2021 -0500
+++ b/src/sv_main.h Mon Nov 22 09:23:55 2021 +1100
@@ -480,10 +480,6 @@
480480 // means we're expecting them to also send us backups of older commands.
481481 ULONG ulNumExpectedCMDs;
482482
483- // [AK] How much artificial delay there is in the client's inputs due to them sending us backup commands.
484- // Each backup command received per tic delays the client's ping by ~29 ms.
485- ULONG ulExtraDelay;
486-
487483 // [AK] A list of specials this player executed while being extrapolated.
488484 TArray<CLIENT_SAVED_SPECIAL_s> ExtrapolatedSpecials;
489485