Added compatibility parameter to set sector special

This commit is contained in:
alexey.lysiuk 2016-12-19 10:40:31 +02:00 committed by Christoph Oelckers
parent 1fa37aaeb7
commit 94f7bef2ff

View file

@ -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)