make if-checks for AppendStatusBar consistent with Zandronum implementation

This commit is contained in:
BinarryCode 2024-11-24 13:10:21 -08:00 committed by Rachael Alexanderson
parent bea4659c08
commit ed4ef14d31
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -644,7 +644,7 @@ void SBarInfo::ParseSBarInfo(int lump)
barNum = sc.MustMatchString(StatusBars); barNum = sc.MustMatchString(StatusBars);
} }
// SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists. // SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
if (command != SBARINFO_APPENDSTATUSBAR) if(command != SBARINFO_APPENDSTATUSBAR)
{ {
if (this->huds[barNum] != NULL) if (this->huds[barNum] != NULL)
{ {
@ -652,7 +652,7 @@ void SBarInfo::ParseSBarInfo(int lump)
} }
this->huds[barNum] = new SBarInfoMainBlock(this); this->huds[barNum] = new SBarInfoMainBlock(this);
} }
else if (this->huds[barNum] == NULL) else if(this->huds[barNum] == NULL)
{ {
sc.ScriptError("Status bar '%s' has not been created and cannot be appended to. Use 'StatusBar' instead.", StatusBars[barNum]); sc.ScriptError("Status bar '%s' has not been created and cannot be appended to. Use 'StatusBar' instead.", StatusBars[barNum]);
} }