Merge remote-tracking branch 'gzdoom/master' into qzdoom

This commit is contained in:
Magnus Norddahl 2017-02-14 14:55:02 +01:00
commit 7f81e0bd26
2 changed files with 6 additions and 3 deletions

View file

@ -381,7 +381,7 @@ void DMenu::Ticker ()
DEFINE_ACTION_FUNCTION(DMenu, Ticker)
{
PARAM_SELF_PROLOGUE(DMenu);
self->Drawer();
self->Ticker();
return 0;
}
@ -392,7 +392,7 @@ void DMenu::CallTicker()
VMValue params[] = { (DObject*)this };
GlobalVMStack.Call(func, params, 1, nullptr, 0, nullptr);
}
else Drawer();
else Ticker();
}

View file

@ -796,7 +796,10 @@ static void ParseOptionMenuBody(FScanner &sc, DOptionMenuDescriptor *desc)
auto cv = FindCVar(sc.String, nullptr);
if (cv == nullptr && *sc.String)
{
sc.ScriptError("Unknown CVar %s", sc.String);
if (func->Variants[0].ArgFlags[i] & VARF_Optional)
sc.ScriptMessage("Unknown CVar %s", sc.String);
else
sc.ScriptError("Unknown CVar %s", sc.String);
}
params.Push(cv);
}