mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-24 03:32:22 +00:00
P_FlagFuseThink: Use mt->z instead of mt->options >> ZSHIFT
This commit is contained in:
parent
f4c6068ab1
commit
de7575416a
1 changed files with 3 additions and 10 deletions
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;
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue