UDMF: add foflayer field to things TEXTMAP

This commit is contained in:
James R 2023-03-29 22:23:02 -07:00 committed by NepDisk
parent ea5dfb0d87
commit 83068074ae
2 changed files with 8 additions and 0 deletions

View file

@ -222,6 +222,7 @@ typedef struct
fixed_t scale;
INT32 args[NUMMAPTHINGARGS];
char *stringargs[NUMMAPTHINGSTRINGARGS];
UINT8 layer; // FOF layer to spawn on, see P_GetMobjSpawnHeight
struct mobj_s *mobj;
} mapthing_t;

View file

@ -1426,6 +1426,7 @@ static void P_LoadThings(UINT8 *data)
memset(mt->args, 0, NUMMAPTHINGARGS*sizeof(*mt->args));
memset(mt->stringargs, 0x00, NUMMAPTHINGSTRINGARGS*sizeof(*mt->stringargs));
mt->pitch = mt->roll = 0;
mt->layer = 0;
mt->type &= 4095;
@ -1887,6 +1888,10 @@ static void ParseTextmapThingParameter(UINT32 i, const char *param, const char *
else if (fastcmp(param, "flip") && fastcmp("true", val))
mapthings[i].options |= MTF_OBJECTFLIP;
//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);
@ -2858,6 +2863,8 @@ static void P_LoadTextmap(void)
mt->scale = FRACUNIT;
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);