• R/O
  • SSH

Commit

Tags
No Tags

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 used on servers hosted by The Sentinels Playground (TSPG).


Commit MetaInfo

Revisionad6af2938ba9d68007666cdbc2972834b007fec6 (tree)
Time2022-06-08 04:23:50
AuthorAdam 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.

Change Summary

Incremental Difference

diff -r d35edbc7fed1 -r ad6af2938ba9 src/unlagged.cpp
--- a/src/unlagged.cpp Mon Jun 06 21:52:09 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