From 94f7bef2ff1a114133b04b6798d93bc9bef9aacc Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 19 Dec 2016 10:40:31 +0200 Subject: [PATCH] Added compatibility parameter to set sector special --- src/compatibility.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 24897ac27..60f9d8ad6 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -80,6 +80,7 @@ enum CP_CLEARSPECIAL, CP_SETACTIVATION, CP_SECTORFLOOROFFSET, + CP_SETSECTORSPECIAL, CP_SETWALLYSCALE, CP_SETTHINGZ, CP_SETTAG, @@ -294,6 +295,15 @@ void ParseCompatibility() sc.MustGetFloat(); CompatParams.Push(int(sc.Float*65536.)); } + else if (sc.Compare("setsectorspecial")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SETSECTORSPECIAL); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + } else if (sc.Compare("setwallyscale")) { if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); @@ -529,6 +539,16 @@ void SetCompatibilityParams() i += 3; break; } + case CP_SETSECTORSPECIAL: + { + const int index = CompatParams[i + 1]; + if (index < numsectors) + { + sectors[index].special = CompatParams[i + 2]; + } + i += 3; + break; + } case CP_SETWALLYSCALE: { if (CompatParams[i+1] < numlines)