Removed seemingly redundant (and incorrect) mapthing Z load code.
The proper code seems to sit inside P_SpawnMapThing() and the SpawnHoop functions. Time will tell if I've actually commited an atrocity.
This commit is contained in:
parent
8ea7dd418a
commit
6fe6db8e18
|
@ -1009,7 +1009,6 @@ void P_ScanThings(INT16 mapnum, INT16 wadnum, INT16 lumpnum)
|
||||||
static void P_PrepareRawThings(UINT8 *data, size_t i)
|
static void P_PrepareRawThings(UINT8 *data, size_t i)
|
||||||
{
|
{
|
||||||
mapthing_t *mt;
|
mapthing_t *mt;
|
||||||
sector_t *mtsector;
|
|
||||||
|
|
||||||
nummapthings = i / (5 * sizeof (INT16));
|
nummapthings = i / (5 * sizeof (INT16));
|
||||||
mapthings = Z_Calloc(nummapthings * sizeof (*mapthings), PU_LEVEL, NULL);
|
mapthings = Z_Calloc(nummapthings * sizeof (*mapthings), PU_LEVEL, NULL);
|
||||||
|
@ -1018,13 +1017,8 @@ static void P_PrepareRawThings(UINT8 *data, size_t i)
|
||||||
{
|
{
|
||||||
mt->x = READINT16(data);
|
mt->x = READINT16(data);
|
||||||
mt->y = READINT16(data);
|
mt->y = READINT16(data);
|
||||||
// Z for objects
|
mt->z = 0;
|
||||||
mtsector = R_PointInSubsector(mt->x << FRACBITS, mt->y << FRACBITS)->sector;
|
|
||||||
mt->z = (INT16)(
|
|
||||||
#ifdef ESLOPE
|
|
||||||
mtsector->f_slope ? P_GetZAt(mtsector->f_slope, mt->x << FRACBITS, mt->y << FRACBITS) :
|
|
||||||
#endif
|
|
||||||
mtsector->floorheight)>>FRACBITS;
|
|
||||||
mt->angle = READINT16(data);
|
mt->angle = READINT16(data);
|
||||||
mt->type = READUINT16(data);
|
mt->type = READUINT16(data);
|
||||||
mt->options = READUINT16(data);
|
mt->options = READUINT16(data);
|
||||||
|
@ -1137,11 +1131,6 @@ static void P_LoadThings(boolean loademblems)
|
||||||
|| mt->type == 1705 || mt->type == 1713) // hoops
|
|| mt->type == 1705 || mt->type == 1713) // hoops
|
||||||
{
|
{
|
||||||
mt->mobj = NULL;
|
mt->mobj = NULL;
|
||||||
|
|
||||||
// Z for objects Tails 05-26-2002
|
|
||||||
mt->z = (INT16)(R_PointInSubsector(mt->x << FRACBITS, mt->y << FRACBITS)
|
|
||||||
->sector->floorheight>>FRACBITS);
|
|
||||||
|
|
||||||
P_SpawnHoopsAndRings(mt, false);
|
P_SpawnHoopsAndRings(mt, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue