- renamed the level variables.
currentUILevel is now primaryLevel. For ZScript, currentVMLevel was added. This is also exported as 'level' and will change as needed. This also means that no breaking deprecations will be needed in the future, because in order to sandbox a level only 4 variables need to be handled: level, players, playeringame and consoleplayer. The remaining global variables are not relevant for the level state. The static 'level' has been mostly removed from the code except some places that still need work.
This commit is contained in:
parent
6c006a5fbd
commit
45dc9a7b47
44 changed files with 266 additions and 264 deletions
|
|
@ -130,8 +130,8 @@ CVAR(Int, am_showsubsector, -1, 0);
|
|||
|
||||
CUSTOM_CVAR(Int, am_showalllines, -1, CVAR_NOINITCALL) // This is a cheat so don't save it.
|
||||
{
|
||||
if (currentUILevel && currentUILevel->automap)
|
||||
currentUILevel->automap->UpdateShowAllLines();
|
||||
if (primaryLevel && primaryLevel->automap)
|
||||
primaryLevel->automap->UpdateShowAllLines();
|
||||
}
|
||||
|
||||
EXTERN_CVAR(Bool, sv_cheats)
|
||||
|
|
@ -171,9 +171,9 @@ CUSTOM_CVAR(Int, am_emptyspacemargin, 0, CVAR_ARCHIVE)
|
|||
self = 90;
|
||||
}
|
||||
|
||||
if (nullptr != StatusBar && currentUILevel && currentUILevel->automap)
|
||||
if (nullptr != StatusBar && primaryLevel && primaryLevel->automap)
|
||||
{
|
||||
currentUILevel->automap->NewResolution();
|
||||
primaryLevel->automap->NewResolution();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -191,8 +191,8 @@ CVAR(Float, am_zoomdir, 0, CVAR_ARCHIVE)
|
|||
CCMD(am_togglefollow)
|
||||
{
|
||||
am_followplayer = !am_followplayer;
|
||||
if (currentUILevel && currentUILevel->automap)
|
||||
currentUILevel->automap->ResetFollowLocation();
|
||||
if (primaryLevel && primaryLevel->automap)
|
||||
primaryLevel->automap->ResetFollowLocation();
|
||||
Printf("%s\n", GStrings(am_followplayer ? "AMSTR_FOLLOWON" : "AMSTR_FOLLOWOFF"));
|
||||
}
|
||||
|
||||
|
|
@ -210,9 +210,9 @@ CCMD(am_toggletexture)
|
|||
|
||||
CCMD(am_setmark)
|
||||
{
|
||||
if (currentUILevel && currentUILevel->automap)
|
||||
if (primaryLevel && primaryLevel->automap)
|
||||
{
|
||||
int m = currentUILevel->automap->addMark();
|
||||
int m = primaryLevel->automap->addMark();
|
||||
if (m >= 0)
|
||||
{
|
||||
Printf("%s %d\n", GStrings("AMSTR_MARKEDSPOT"), m);
|
||||
|
|
@ -222,7 +222,7 @@ CCMD(am_setmark)
|
|||
|
||||
CCMD(am_clearmarks)
|
||||
{
|
||||
if (currentUILevel && currentUILevel->automap && currentUILevel->automap->clearMarks())
|
||||
if (primaryLevel && primaryLevel->automap && primaryLevel->automap->clearMarks())
|
||||
{
|
||||
Printf("%s\n", GStrings("AMSTR_MARKSCLEARED"));
|
||||
}
|
||||
|
|
@ -230,8 +230,8 @@ CCMD(am_clearmarks)
|
|||
|
||||
CCMD(am_gobig)
|
||||
{
|
||||
if (currentUILevel && currentUILevel->automap)
|
||||
currentUILevel->automap->GoBig();
|
||||
if (primaryLevel && primaryLevel->automap)
|
||||
primaryLevel->automap->GoBig();
|
||||
}
|
||||
|
||||
CCMD(togglemap)
|
||||
|
|
@ -3300,7 +3300,7 @@ void AM_ToggleMap()
|
|||
return;
|
||||
|
||||
// ... or if there is no automap.
|
||||
if (!currentUILevel || !currentUILevel->automap)
|
||||
if (!primaryLevel || !primaryLevel->automap)
|
||||
return;
|
||||
|
||||
if (!automapactive)
|
||||
|
|
@ -3313,7 +3313,7 @@ void AM_ToggleMap()
|
|||
Button_AM_ZoomIn.Reset();
|
||||
Button_AM_ZoomOut.Reset();
|
||||
|
||||
currentUILevel->automap->startDisplay();
|
||||
primaryLevel->automap->startDisplay();
|
||||
automapactive = true;
|
||||
viewactive = (am_overlay != 0.f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue