mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 08:31:45 +00:00
- added option to set a sector's tag via compatibility.txt (needed by GZDoom)
This commit is contained in:
parent
3d2646cbae
commit
580e580c42
1 changed files with 18 additions and 0 deletions
|
@ -81,6 +81,7 @@ enum
|
||||||
CP_SECTORFLOOROFFSET,
|
CP_SECTORFLOOROFFSET,
|
||||||
CP_SETWALLYSCALE,
|
CP_SETWALLYSCALE,
|
||||||
CP_SETTHINGZ,
|
CP_SETTHINGZ,
|
||||||
|
CP_SETTAG,
|
||||||
};
|
};
|
||||||
|
|
||||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||||
|
@ -307,6 +308,15 @@ void ParseCompatibility()
|
||||||
sc.MustGetFloat();
|
sc.MustGetFloat();
|
||||||
CompatParams.Push(FLOAT2FIXED(sc.Float));
|
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
|
else
|
||||||
{
|
{
|
||||||
sc.UnGet();
|
sc.UnGet();
|
||||||
|
@ -520,6 +530,14 @@ void SetCompatibilityParams()
|
||||||
i += 3;
|
i += 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CP_SETTAG:
|
||||||
|
{
|
||||||
|
if ((unsigned)CompatParams[i + 1] < (unsigned)numsectors)
|
||||||
|
{
|
||||||
|
sectors[CompatParams[i + 1]].tag = CompatParams[i + 2];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue