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

View file

@ -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)
{