Fixes to CTF flag respawning, particularly reverse gravity and z-positioning.

This commit is contained in:
Monster Iestyn 2015-05-29 14:59:13 +01:00
parent f7c463418e
commit c6ade27b6a
1 changed files with 8 additions and 5 deletions

View File

@ -6497,19 +6497,22 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->spawnpoint->options & MTF_OBJECTFLIP) if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
{ {
z = ss->sector->ceilingheight - mobjinfo[mobj->type].height; z = ss->sector->ceilingheight - mobjinfo[mobj->type].height;
if (mobj->spawnpoint->z) if (mobj->spawnpoint->options >> ZSHIFT)
z -= mobj->spawnpoint->z << FRACBITS; z -= (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
} }
else else
{ {
z = ss->sector->floorheight; z = ss->sector->floorheight;
if (mobj->spawnpoint->z) if (mobj->spawnpoint->options >> ZSHIFT)
z += mobj->spawnpoint->z << FRACBITS; 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)
flagmo->spawnpoint->options |= MTF_OBJECTFLIP; {
flagmo->eflags |= MFE_VERTICALFLIP;
flagmo->flags2 |= MF2_OBJECTFLIP;
}
if (mobj->type == MT_REDFLAG) if (mobj->type == MT_REDFLAG)
{ {