Commit MetaInfo

Revisiónca8f78ef0a0a163d834fa61b49b53553ee653c51 (tree)
Tiempo2022-06-08 04:23:50
AutorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Fixed: unlagged would also reconcile for bots, causing them to miss shots in online games. Also added a sanity check to make sure that the actor isn't NULL.

Cambiar Resumen

Diferencia incremental

diff -r ceb97339f836 -r ca8f78ef0a0a src/unlagged.cpp
--- a/src/unlagged.cpp Sun Jun 12 16:06:20 2022 -0400
+++ b/src/unlagged.cpp Tue Jun 07 15:23:50 2022 -0400
@@ -131,10 +131,12 @@
131131 // Call UNLAGGED_Restore afterwards to restore everything
132132 void UNLAGGED_Reconcile( AActor *actor )
133133 {
134- //Only do anything if the actor to be reconciled is a player,
135- //it's on a server with unlagged on, and reconciliation is not being blocked
136- if ( !actor->player || (NETWORK_GetState() != NETSTATE_SERVER) || ( zadmflags & ZADF_NOUNLAGGED ) ||
137- ( ( actor->player->userinfo.GetClientFlags() & CLIENTFLAGS_UNLAGGED ) == 0 ) || ( reconciliationBlockers > 0 ) )
134+ // [AK] Don't do anything if it's not a server with unlagged or if reconciliation is being blocked.
135+ if (( NETWORK_GetState( ) != NETSTATE_SERVER ) || ( zadmflags & ZADF_NOUNLAGGED ) || ( reconciliationBlockers > 0 ))
136+ return;
137+
138+ // [AK] Don't do anything if the actor isn't a player, is a bot, or if this player disabled unlagged for themselves.
139+ if (( actor == NULL ) || ( actor->player == NULL ) || ( actor->player->bIsBot ) || (( actor->player->userinfo.GetClientFlags( ) & CLIENTFLAGS_UNLAGGED ) == 0 ))
138140 return;
139141
140142 //Something went wrong, reconciliation was attempted when the gamestate
Show on old repository browser