Skip to content

Commit

Permalink
- removed script access to variables that no longer contain what they…
Browse files Browse the repository at this point in the history
… once did.
  • Loading branch information
coelckers committed May 1, 2021
1 parent f732d4e commit 13b21d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
13 changes: 0 additions & 13 deletions source/games/duke/src/gameexec.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions source/games/duke/src/gamevar.cpp
Expand Up @@ -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()
{
Expand Down

0 comments on commit 13b21d3

Please sign in to comment.