mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 23:31:50 +00:00
Fixes to CTF flag respawning, particularly reverse gravity and z-positioning.
This commit is contained in:
parent
f7c463418e
commit
c6ade27b6a
1 changed files with 8 additions and 5 deletions
13
src/p_mobj.c
13
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue