This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
Revision | bc71b20f4906d81e64102dcc86962b8de5846737 (tree) |
---|---|
Time | 2021-11-22 07:23:55 |
Author | Joshua Surace <doomjoshuaboy@live...> |
Commiter | Joshua Surace |
Backed out changeset: 22b486393cf7
Removes: "Increase the client's ping proportionally to the number of expected backup commands."
@@ -2119,7 +2119,6 @@ | ||
2119 | 2119 | g_aClients[lClient].IgnoredAddresses.clear(); |
2120 | 2120 | g_aClients[lClient].ScreenWidth = 0; |
2121 | 2121 | g_aClients[lClient].ScreenHeight = 0; |
2122 | - g_aClients[lClient].ulExtraDelay = 0; | |
2123 | 2122 | g_aClients[lClient].ulClientGameTic = 0; |
2124 | 2123 | // [CK] Since the client is not up to date at all, the farthest the client |
2125 | 2124 | // should be able to go back is the gametic they connected with. |
@@ -6239,27 +6238,12 @@ | ||
6239 | 6238 | } |
6240 | 6239 | else |
6241 | 6240 | { |
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 ); | |
6247 | 6244 | // [BB] The most recent ping measurement should always have a noticeable influence on the average ping. |
6248 | 6245 | if ( p->ulPingAverages < 20 ) |
6249 | 6246 | 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 | - } | |
6263 | 6247 | } |
6264 | 6248 | |
6265 | 6249 | return ( false ); |
@@ -480,10 +480,6 @@ | ||
480 | 480 | // means we're expecting them to also send us backups of older commands. |
481 | 481 | ULONG ulNumExpectedCMDs; |
482 | 482 | |
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 | - | |
487 | 483 | // [AK] A list of specials this player executed while being extrapolated. |
488 | 484 | TArray<CLIENT_SAVED_SPECIAL_s> ExtrapolatedSpecials; |
489 | 485 |