From 42be7bee935b7509a5979a77f91b6b8983a9284e Mon Sep 17 00:00:00 2001 From: FishyClockwork Date: Sat, 29 Oct 2016 17:05:59 +0200 Subject: [PATCH] For USDF treat Require/Exclude as unknown For USDF treat Require/Exclude as an unknown keyword. --- src/p_usdf.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index e8ce5ca50..a64dc932f 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -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();