From 3269d6a3981aecdf2f47cd93c0e4670ba7d56749 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 10 Dec 2021 17:31:51 +1100 Subject: [PATCH] - Duke: Ensure all weapon variables used for interpolation have the `o` values set when CON updates them. * Hasn't been an issue to date but could become one should a mod set these. * Can't simply back the variable up and set the main one because unless the mod knows we're interpolating, it could have undesirable effects. --- source/games/duke/src/gameexec.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 36eec4513..3f5f7164c 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -429,7 +429,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_WEAPON_SWAY: - if (bSet) ps[iPlayer].weapon_sway = lValue; + if (bSet) ps[iPlayer].oweapon_sway = ps[iPlayer].weapon_sway = lValue; else SetGameVarID(lVar2, ps[iPlayer].weapon_sway, sActor, sPlayer); break; @@ -567,7 +567,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_KICKBACK_PIC: - if (bSet) ps[iPlayer].kickback_pic = lValue; + if (bSet) ps[iPlayer].okickback_pic = ps[iPlayer].kickback_pic = lValue; else SetGameVarID(lVar2, ps[iPlayer].kickback_pic, sActor, sPlayer); break; @@ -607,7 +607,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_RANDOM_CLUB_FRAME: - if (bSet) ps[iPlayer].random_club_frame = lValue; + if (bSet) ps[iPlayer].orandom_club_frame = ps[iPlayer].random_club_frame = lValue; else SetGameVarID(lVar2, ps[iPlayer].random_club_frame, sActor, sPlayer); break; @@ -726,7 +726,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_WEAPON_POS: - if (bSet) ps[iPlayer].weapon_pos = lValue; + if (bSet) ps[iPlayer].oweapon_pos = ps[iPlayer].weapon_pos = lValue; else SetGameVarID(lVar2, ps[iPlayer].weapon_pos, sActor, sPlayer); break; @@ -870,7 +870,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_HARD_LANDING: - if (bSet) ps[iPlayer].hard_landing = lValue; + if (bSet) ps[iPlayer].ohard_landing = ps[iPlayer].hard_landing = lValue; else SetGameVarID(lVar2, ps[iPlayer].hard_landing, sActor, sPlayer); break;