mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
Added compatibility parameter to set sector special
This commit is contained in:
parent
1fa37aaeb7
commit
94f7bef2ff
1 changed files with 20 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue