UDMF: add foflayer field to things TEXTMAP

This commit is contained in:
James R 2023-03-29 22:23:02 -07:00
parent 75d5c5b68f
commit 881f8d8407
2 changed files with 5 additions and 0 deletions

View file

@ -251,6 +251,7 @@ struct mapthing_t
INT16 special;
INT32 args[NUMMAPTHINGARGS];
char *stringargs[NUMMAPTHINGSTRINGARGS];
UINT8 layer; // FOF layer to spawn on, see P_GetMobjSpawnHeight
mobj_t *mobj;
};

View file

@ -1286,6 +1286,7 @@ static void P_LoadThings(UINT8 *data)
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
mt->special = 0;
mt->pitch = mt->roll = 0;
mt->layer = 0;
mt->type &= 4095;
@ -1793,6 +1794,8 @@ static void ParseTextmapThingParameter(UINT32 i, const char *param, const char *
else if (fastcmp(param, "special"))
mapthings[i].special = atol(val);
else if (fastcmp(param, "foflayer"))
mapthings[i].layer = atol(val);
else if (fastncmp(param, "stringarg", 9) && strlen(param) > 9)
{
size_t argnum = atol(param + 9);
@ -2766,6 +2769,7 @@ static void P_LoadTextmap(void)
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
mt->special = 0;
mt->layer = 0;
mt->mobj = NULL;
TextmapParse(mapthingsPos[i], i, ParseTextmapThingParameter);