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)