This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
Revision | ad6af2938ba9d68007666cdbc2972834b007fec6 (tree) |
---|---|
Time | 2022-06-08 04:23:50 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
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.
@@ -131,10 +131,12 @@ | ||
131 | 131 | // Call UNLAGGED_Restore afterwards to restore everything |
132 | 132 | void UNLAGGED_Reconcile( AActor *actor ) |
133 | 133 | { |
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 )) | |
138 | 140 | return; |
139 | 141 | |
140 | 142 | //Something went wrong, reconciliation was attempted when the gamestate |