- added option to set a sector's tag via compatibility.txt (needed by GZDoom)

This commit is contained in:
Christoph Oelckers 2014-09-08 22:54:56 +02:00
parent 3d2646cbae
commit 580e580c42

View file

@ -81,6 +81,7 @@ enum
CP_SECTORFLOOROFFSET,
CP_SETWALLYSCALE,
CP_SETTHINGZ,
CP_SETTAG,
};
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
@ -307,6 +308,15 @@ void ParseCompatibility()
sc.MustGetFloat();
CompatParams.Push(FLOAT2FIXED(sc.Float));
}
else if (sc.Compare("setsectortag"))
{
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SETTAG);
sc.MustGetNumber();
CompatParams.Push(sc.Number);
sc.MustGetNumber();
CompatParams.Push(sc.Number);
}
else
{
sc.UnGet();
@ -520,6 +530,14 @@ void SetCompatibilityParams()
i += 3;
break;
}
case CP_SETTAG:
{
if ((unsigned)CompatParams[i + 1] < (unsigned)numsectors)
{
sectors[CompatParams[i + 1]].tag = CompatParams[i + 2];
}
break;
}
}
}
}