From 8c5fe26b142f52db89be055056f854b2fab321fb Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 29 Jul 2017 20:40:00 +0000 Subject: [PATCH] CON: Fix playervar quick structure access. git-svn-id: https://svn.eduke32.com/eduke32@6404 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/gamevars.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/duke3d/src/gamevars.cpp b/source/duke3d/src/gamevars.cpp index eba571c1a..9ef7f8e54 100644 --- a/source/duke3d/src/gamevars.cpp +++ b/source/duke3d/src/gamevars.cpp @@ -754,10 +754,12 @@ special: returnValue = VM_GetPlayerInput(arrayIndex, labelNum); break; + // no THISACTOR check here because we convert those cases to setvarvar case STRUCT_ACTORVAR: + returnValue = Gv_GetVar(labelNum, arrayIndex, vm.playerNum); + break; case STRUCT_PLAYERVAR: - // no THISACTOR check here because we convert those cases to setvarvar - returnValue = Gv_GetVar(labelNum, arrayIndex, playerNum); + returnValue = Gv_GetVar(labelNum, vm.spriteNum, arrayIndex); break; case STRUCT_SECTOR: @@ -950,11 +952,13 @@ int __fastcall Gv_GetSpecialVarX(int gameVar) returnValue = VM_GetPlayerInput(arrayIndex, labelNum); break; + // no THISACTOR check here because we convert those cases to setvarvar case STRUCT_ACTORVAR: - case STRUCT_PLAYERVAR: - // no THISACTOR check here because we convert those cases to setvarvar returnValue = Gv_GetVar(labelNum, arrayIndex, vm.playerNum); break; + case STRUCT_PLAYERVAR: + returnValue = Gv_GetVar(labelNum, vm.spriteNum, arrayIndex); + break; case STRUCT_SECTOR: if (arrayIndexVar == g_thisActorVarID)