- removed script access to variables that no longer contain what they once did.

This commit is contained in:
Christoph Oelckers 2021-05-01 23:08:51 +02:00
parent f732d4ec64
commit 13b21d3ed9
2 changed files with 3 additions and 16 deletions

View file

@ -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);

View file

@ -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()
{