From 13b21d3ed96141abd2031c2eb0197caa154622af Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 May 2021 23:08:51 +0200 Subject: [PATCH] - removed script access to variables that no longer contain what they once did. --- source/games/duke/src/gameexec.cpp | 13 ------------- source/games/duke/src/gamevar.cpp | 6 +++--- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 7c4d72aee..28e867304 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -130,11 +130,6 @@ static void DoUserDef(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* if (!bSet) SetGameVarID(lVar2, cl_showweapon, sActor, sPlayer); break; - case USERDEFS_FROM_BONUS: - if (bSet) ud.from_bonus = lValue; - else SetGameVarID(lVar2, ud.from_bonus, sActor, sPlayer); - break; - case USERDEFS_CAMERASPRITE: if (bSet) ud.cameraactor = ScriptIndexToActor(lValue); else SetGameVarID(lVar2, ActorToScriptIndex(ud.cameraactor), sActor, sPlayer); @@ -239,14 +234,6 @@ static void DoUserDef(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* else SetGameVarID(lVar2, ud.player_skill, sActor, sPlayer); break; - case USERDEFS_LEVEL_NUMBER: - if (!bSet) SetGameVarID(lVar2, mapfromlevelnum(currentLevel->levelNumber), sActor, sPlayer); - break; - - case USERDEFS_VOLUME_NUMBER: - if (!bSet) SetGameVarID(lVar2, currentLevel->cluster-1, sActor, sPlayer); - break; - case USERDEFS_MARKER: if (bSet) ud.marker = lValue; else SetGameVarID(lVar2, ud.marker, sActor, sPlayer); diff --git a/source/games/duke/src/gamevar.cpp b/source/games/duke/src/gamevar.cpp index 839092c33..95a031ab3 100644 --- a/source/games/duke/src/gamevar.cpp +++ b/source/games/duke/src/gamevar.cpp @@ -555,9 +555,9 @@ void InitGameVarPointers(void) // //--------------------------------------------------------------------------- -// These are deliberately not stored in accessible variables anymore -int getmap() { return mapfromlevelnum(currentLevel->levelNumber); } -int getvol() { return volfromlevelnum(currentLevel->levelNumber); } +// These are deliberately not stored in accessible variables anymore. Use is deprecated. +int getmap() { return currentLevel->levelNumber; } +int getvol() { return currentLevel->cluster; } void AddSystemVars() {