# HG changeset patch # User Adam Kaminski # Date 1631545237 14400 # Mon Sep 13 11:00:37 2021 -0400 # Node ID b9fb5144d1844fff6c9a9bf8e2a32703b17ac5bd # Parent 3e1cc88ef49569eed082b3c97c5aae9420c34181 Don't try to sway the weapon sprites while the server is lagging. diff -r 3e1cc88ef495 -r b9fb5144d184 src/p_pspr.cpp --- a/src/p_pspr.cpp Mon Sep 13 10:35:03 2021 -0400 +++ b/src/p_pspr.cpp Mon Sep 13 11:00:37 2021 -0400 @@ -38,6 +38,7 @@ #include "unlagged.h" #include "g_game.h" #include "p_tick.h" +#include "cl_main.h" // MACROS ------------------------------------------------------------------ @@ -587,8 +588,8 @@ // [AK] Sway the weapon if the multiplier is a non-zero value. if (cl_swayspeed != 0.0f) { - // [AK] Don't readjust the position of the sprite while the ticker is paused. - if ((paused == false) && (P_CheckTickerPaused() == false)) + // [AK] Don't reposition the sprite while the ticker is paused or while the server is lagging. + if ((paused == false) && (P_CheckTickerPaused() == false) && (CLIENT_GetServerLagging() == false)) { fixed_t nswaypos[2]; nswaypos[0] = FLOAT2FIXED(FIXED2FLOAT(player->mo->AngleDelta) * cl_swayspeed / 128.0f);