mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-04 01:41:42 +00:00
Update sbarinfo.cpp
Update code to be consistent with patch for Zandronum
This commit is contained in:
parent
2221bc3a44
commit
0056e1857c
1 changed files with 8 additions and 8 deletions
|
@ -490,12 +490,9 @@ void SBarInfo::ParseSBarInfo(int lump)
|
|||
continue;
|
||||
}
|
||||
int baselump = -2;
|
||||
FString SBarInfoTopLevelString;
|
||||
if(sc.GetString(SBarInfoTopLevelString))
|
||||
{ // Store the string if the next token is a string, and revert scanner state afterwards
|
||||
sc.UnGet();
|
||||
}
|
||||
switch(sc.MustMatchString(SBarInfoTopLevel))
|
||||
// Store the command, used for the switch statement and case SBARINFO_APPENDSTATUSBAR.
|
||||
const int command = sc.MustMatchString(SBarInfoTopLevel);
|
||||
switch(command)
|
||||
{
|
||||
case SBARINFO_BASE:
|
||||
baseSet = true;
|
||||
|
@ -647,8 +644,7 @@ void SBarInfo::ParseSBarInfo(int lump)
|
|||
barNum = sc.MustMatchString(StatusBars);
|
||||
}
|
||||
// SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
|
||||
const bool append = (SBarInfoTopLevelString.CompareNoCase("appendstatusbar") == 0);
|
||||
if (!append)
|
||||
if (command != SBARINFO_APPENDSTATUSBAR)
|
||||
{
|
||||
if (this->huds[barNum] != NULL)
|
||||
{
|
||||
|
@ -656,6 +652,10 @@ void SBarInfo::ParseSBarInfo(int lump)
|
|||
}
|
||||
this->huds[barNum] = new SBarInfoMainBlock(this);
|
||||
}
|
||||
else if (this->huds[barNum] == NULL)
|
||||
{
|
||||
sc.ScriptError( "AppendStatusBar can't be used on a HUD that doesn't exist yet." );
|
||||
}
|
||||
if(barNum == STBAR_AUTOMAP)
|
||||
{
|
||||
automapbar = true;
|
||||
|
|
Loading…
Reference in a new issue