mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Map loading should consider tag 0 as a valid tag and add its respective entries just like the rest of tags.
This commit is contained in:
parent
0375bef961
commit
7cd4a3de14
1 changed files with 11 additions and 10 deletions
|
|
@ -936,8 +936,7 @@ static void P_LoadSectors(UINT8 *data)
|
||||||
ss->lightlevel = SHORT(ms->lightlevel);
|
ss->lightlevel = SHORT(ms->lightlevel);
|
||||||
ss->special = SHORT(ms->special);
|
ss->special = SHORT(ms->special);
|
||||||
ss->tag = SHORT(ms->tag);
|
ss->tag = SHORT(ms->tag);
|
||||||
if (ss->tag)
|
Tag_FSet(&ss->tags, ss->tag);
|
||||||
Tag_Add(&ss->tags, ss->tag);
|
|
||||||
|
|
||||||
ss->floor_xoffs = ss->floor_yoffs = 0;
|
ss->floor_xoffs = ss->floor_yoffs = 0;
|
||||||
ss->ceiling_xoffs = ss->ceiling_yoffs = 0;
|
ss->ceiling_xoffs = ss->ceiling_yoffs = 0;
|
||||||
|
|
@ -1052,8 +1051,7 @@ static void P_LoadLinedefs(UINT8 *data)
|
||||||
ld->flags = SHORT(mld->flags);
|
ld->flags = SHORT(mld->flags);
|
||||||
ld->special = SHORT(mld->special);
|
ld->special = SHORT(mld->special);
|
||||||
ld->tag = SHORT(mld->tag);
|
ld->tag = SHORT(mld->tag);
|
||||||
if (ld->tag)
|
Tag_FSet(&ld->tags, ld->tag);
|
||||||
Tag_Add(&ld->tags, ld->tag);
|
|
||||||
memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));
|
memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));
|
||||||
memset(ld->stringargs, 0x00, NUMLINESTRINGARGS*sizeof(*ld->stringargs));
|
memset(ld->stringargs, 0x00, NUMLINESTRINGARGS*sizeof(*ld->stringargs));
|
||||||
ld->alpha = FRACUNIT;
|
ld->alpha = FRACUNIT;
|
||||||
|
|
@ -1284,6 +1282,7 @@ static void P_LoadThings(UINT8 *data)
|
||||||
mt->options = READUINT16(data);
|
mt->options = READUINT16(data);
|
||||||
mt->extrainfo = (UINT8)(mt->type >> 12);
|
mt->extrainfo = (UINT8)(mt->type >> 12);
|
||||||
mt->tag = 0;
|
mt->tag = 0;
|
||||||
|
Tag_FSet(&mt->tags, mt->tag);
|
||||||
|
|
||||||
mt->type &= 4095;
|
mt->type &= 4095;
|
||||||
|
|
||||||
|
|
@ -1405,8 +1404,7 @@ static void ParseTextmapSectorParameter(UINT32 i, char *param, char *val)
|
||||||
else if (fastcmp(param, "id"))
|
else if (fastcmp(param, "id"))
|
||||||
{
|
{
|
||||||
sectors[i].tag = atol(val);
|
sectors[i].tag = atol(val);
|
||||||
if (sectors[i].tag)
|
Tag_FSet(§ors[i].tags, sectors[i].tag);
|
||||||
Tag_Add(§ors[i].tags, sectors[i].tag);
|
|
||||||
}
|
}
|
||||||
else if (fastcmp(param, "moreids"))
|
else if (fastcmp(param, "moreids"))
|
||||||
{
|
{
|
||||||
|
|
@ -1455,8 +1453,7 @@ static void ParseTextmapLinedefParameter(UINT32 i, char *param, char *val)
|
||||||
if (fastcmp(param, "id"))
|
if (fastcmp(param, "id"))
|
||||||
{
|
{
|
||||||
lines[i].tag = atol(val);
|
lines[i].tag = atol(val);
|
||||||
if (lines[i].tag)
|
Tag_FSet(&lines[i].tags, lines[i].tag);
|
||||||
Tag_Add(&lines[i].tags, lines[i].tag);
|
|
||||||
}
|
}
|
||||||
else if (fastcmp(param, "moreids"))
|
else if (fastcmp(param, "moreids"))
|
||||||
{
|
{
|
||||||
|
|
@ -1536,8 +1533,7 @@ static void ParseTextmapThingParameter(UINT32 i, char *param, char *val)
|
||||||
if (fastcmp(param, "id"))
|
if (fastcmp(param, "id"))
|
||||||
{
|
{
|
||||||
mapthings[i].tag = atol(val);
|
mapthings[i].tag = atol(val);
|
||||||
if (mapthings[i].tag)
|
Tag_FSet(&mapthings[i].tags, mapthings[i].tag);
|
||||||
Tag_Add(&mapthings[i].tags, mapthings[i].tag);
|
|
||||||
}
|
}
|
||||||
else if (fastcmp(param, "moreids"))
|
else if (fastcmp(param, "moreids"))
|
||||||
{
|
{
|
||||||
|
|
@ -1678,6 +1674,7 @@ static void P_LoadTextmap(void)
|
||||||
|
|
||||||
sc->special = 0;
|
sc->special = 0;
|
||||||
sc->tag = 0;
|
sc->tag = 0;
|
||||||
|
Tag_FSet(&sc->tags, 0);
|
||||||
|
|
||||||
sc->floor_xoffs = sc->floor_yoffs = 0;
|
sc->floor_xoffs = sc->floor_yoffs = 0;
|
||||||
sc->ceiling_xoffs = sc->ceiling_yoffs = 0;
|
sc->ceiling_xoffs = sc->ceiling_yoffs = 0;
|
||||||
|
|
@ -1685,6 +1682,7 @@ static void P_LoadTextmap(void)
|
||||||
sc->floorpic_angle = sc->ceilingpic_angle = 0;
|
sc->floorpic_angle = sc->ceilingpic_angle = 0;
|
||||||
|
|
||||||
TextmapParse(sectorsPos[i], i, ParseTextmapSectorParameter);
|
TextmapParse(sectorsPos[i], i, ParseTextmapSectorParameter);
|
||||||
|
|
||||||
P_InitializeSector(sc);
|
P_InitializeSector(sc);
|
||||||
TextmapFixFlatOffsets(sc);
|
TextmapFixFlatOffsets(sc);
|
||||||
}
|
}
|
||||||
|
|
@ -1696,6 +1694,8 @@ static void P_LoadTextmap(void)
|
||||||
ld->flags = 0;
|
ld->flags = 0;
|
||||||
ld->special = 0;
|
ld->special = 0;
|
||||||
ld->tag = 0;
|
ld->tag = 0;
|
||||||
|
Tag_FSet(&ld->tags, 0);
|
||||||
|
|
||||||
memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));
|
memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));
|
||||||
memset(ld->stringargs, 0x00, NUMLINESTRINGARGS*sizeof(*ld->stringargs));
|
memset(ld->stringargs, 0x00, NUMLINESTRINGARGS*sizeof(*ld->stringargs));
|
||||||
ld->alpha = FRACUNIT;
|
ld->alpha = FRACUNIT;
|
||||||
|
|
@ -1743,6 +1743,7 @@ static void P_LoadTextmap(void)
|
||||||
mt->z = 0;
|
mt->z = 0;
|
||||||
mt->extrainfo = 0;
|
mt->extrainfo = 0;
|
||||||
mt->tag = 0;
|
mt->tag = 0;
|
||||||
|
Tag_FSet(&mt->tags, 0);
|
||||||
mt->mobj = NULL;
|
mt->mobj = NULL;
|
||||||
|
|
||||||
TextmapParse(mapthingsPos[i], i, ParseTextmapThingParameter);
|
TextmapParse(mapthingsPos[i], i, ParseTextmapThingParameter);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue