From c6ade27b6aac1483089240d7ccae04f450d92088 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 29 May 2015 14:59:13 +0100 Subject: [PATCH] Fixes to CTF flag respawning, particularly reverse gravity and z-positioning. --- src/p_mobj.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 081124b9..092005c4 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6497,19 +6497,22 @@ void P_MobjThinker(mobj_t *mobj) if (mobj->spawnpoint->options & MTF_OBJECTFLIP) { z = ss->sector->ceilingheight - mobjinfo[mobj->type].height; - if (mobj->spawnpoint->z) - z -= mobj->spawnpoint->z << FRACBITS; + if (mobj->spawnpoint->options >> ZSHIFT) + z -= (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS; } else { z = ss->sector->floorheight; - if (mobj->spawnpoint->z) - z += mobj->spawnpoint->z << FRACBITS; + if (mobj->spawnpoint->options >> ZSHIFT) + z += (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS; } flagmo = P_SpawnMobj(x, y, z, mobj->type); flagmo->spawnpoint = mobj->spawnpoint; if (mobj->spawnpoint->options & MTF_OBJECTFLIP) - flagmo->spawnpoint->options |= MTF_OBJECTFLIP; + { + flagmo->eflags |= MFE_VERTICALFLIP; + flagmo->flags2 |= MF2_OBJECTFLIP; + } if (mobj->type == MT_REDFLAG) {