For USDF treat Require/Exclude as unknown

For USDF treat Require/Exclude as an unknown keyword.
This commit is contained in:
FishyClockwork 2016-10-29 17:05:59 +02:00 committed by Christoph Oelckers
parent f450a60f66
commit 42be7bee93

View file

@ -210,19 +210,16 @@ class USDFParser : public UDMFParserBase
{
switch(key)
{
case NAME_Cost:
case NAME_Require:
case NAME_Exclude:
// Print a warning if the namespace is not ZDoom otherwise fall-through. [FishyClockwork]
if (namespace_bits != Zd)
// Require and Exclude are exclusive to namespace ZDoom. [FishyClockwork]
if (key == NAME_Cost || namespace_bits == Zd)
{
sc.ScriptMessage("Detected \"%s\" block, ignoring. Require/Exclude are exclusive to namespace ZDoom.", key == NAME_Require ? "Require" : "Exclude");
while (!sc.CheckToken('}')) sc.MustGetAnyToken(); // Skip this block
ParseCostRequireExclude(reply, key);
break;
}
case NAME_Cost:
ParseCostRequireExclude(reply, key);
break;
// Intentional fall-through
default:
sc.UnGet();