P_FlagFuseThink: Use mt->z instead of mt->options >> ZSHIFT
This commit is contained in:
parent
f4c6068ab1
commit
de7575416a
13
src/p_mobj.c
13
src/p_mobj.c
|
@ -9905,19 +9905,12 @@ static void P_FlagFuseThink(mobj_t *mobj)
|
||||||
|
|
||||||
x = mobj->spawnpoint->x << FRACBITS;
|
x = mobj->spawnpoint->x << FRACBITS;
|
||||||
y = mobj->spawnpoint->y << FRACBITS;
|
y = mobj->spawnpoint->y << FRACBITS;
|
||||||
|
z = mobj->spawnpoint->z << FRACBITS;
|
||||||
ss = R_PointInSubsector(x, y);
|
ss = R_PointInSubsector(x, y);
|
||||||
if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
|
if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
|
||||||
{
|
z = ss->sector->ceilingheight - mobjinfo[mobj->type].height - z;
|
||||||
z = ss->sector->ceilingheight - mobjinfo[mobj->type].height;
|
|
||||||
if (mobj->spawnpoint->options >> ZSHIFT)
|
|
||||||
z -= (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
z = ss->sector->floorheight + z;
|
||||||
z = ss->sector->floorheight;
|
|
||||||
if (mobj->spawnpoint->options >> ZSHIFT)
|
|
||||||
z += (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
|
|
||||||
}
|
|
||||||
flagmo = P_SpawnMobj(x, y, z, mobj->type);
|
flagmo = P_SpawnMobj(x, y, z, mobj->type);
|
||||||
flagmo->spawnpoint = mobj->spawnpoint;
|
flagmo->spawnpoint = mobj->spawnpoint;
|
||||||
if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
|
if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
|
||||||
|
|
Loading…
Reference in a new issue