mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
Merge commit 'b3f5de356f14e2026cc9e5738e8b58e22e7daa44'
This commit is contained in:
commit
bbd3106cbb
1 changed files with 11 additions and 1 deletions
|
@ -1747,10 +1747,20 @@ class CommandGameMode : public SBarInfoCommandFlowControl
|
||||||
|
|
||||||
void Parse(FScanner &sc, bool fullScreenOffsets)
|
void Parse(FScanner &sc, bool fullScreenOffsets)
|
||||||
{
|
{
|
||||||
|
static bool warnUnknown = true;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_Identifier);
|
sc.MustGetToken(TK_Identifier);
|
||||||
modes |= static_cast<GameModes> (1<<sc.MustMatchString(modeNames));
|
int mode = sc.MatchString(modeNames);
|
||||||
|
if(mode >= 0)
|
||||||
|
modes |= static_cast<GameModes> (1<<mode);
|
||||||
|
else if(warnUnknown)
|
||||||
|
{
|
||||||
|
// Only warn about unknowns for cross port compatibility
|
||||||
|
// Also only warn once to keep logs from getting messy.
|
||||||
|
warnUnknown = false;
|
||||||
|
FScriptPosition(sc).Message(MSG_WARNING, "Ignoring unknown gamemode %s (future cases will be silently ignored).", sc.String);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while(sc.CheckToken(','));
|
while(sc.CheckToken(','));
|
||||||
SBarInfoCommandFlowControl::Parse(sc, fullScreenOffsets);
|
SBarInfoCommandFlowControl::Parse(sc, fullScreenOffsets);
|
||||||
|
|
Loading…
Reference in a new issue