P_FlagFuseThink: Use mt->z instead of mt->options >> ZSHIFT

This commit is contained in:
MascaraSnake 2019-12-25 11:17:57 +01:00
parent f4c6068ab1
commit de7575416a
1 changed files with 3 additions and 10 deletions

View File

@ -9905,19 +9905,12 @@ static void P_FlagFuseThink(mobj_t *mobj)
x = mobj->spawnpoint->x << FRACBITS;
y = mobj->spawnpoint->y << FRACBITS;
z = mobj->spawnpoint->z << FRACBITS;
ss = R_PointInSubsector(x, y);
if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
{
z = ss->sector->ceilingheight - mobjinfo[mobj->type].height;
if (mobj->spawnpoint->options >> ZSHIFT)
z -= (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
}
z = ss->sector->ceilingheight - mobjinfo[mobj->type].height - z;
else
{
z = ss->sector->floorheight;
if (mobj->spawnpoint->options >> ZSHIFT)
z += (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
}
z = ss->sector->floorheight + z;
flagmo = P_SpawnMobj(x, y, z, mobj->type);
flagmo->spawnpoint = mobj->spawnpoint;
if (mobj->spawnpoint->options & MTF_OBJECTFLIP)