diff --git a/src/k_battle.c b/src/k_battle.c index c3781fb30..cb6659fbb 100644 --- a/src/k_battle.c +++ b/src/k_battle.c @@ -594,18 +594,14 @@ void K_SpawnBattleCapsules(void) z = P_GetZAt(sec->c_slope, x, y, sec->ceilingheight) - mobjinfo[MT_BATTLECAPSULE].height; floorheights[0] = z; - - if (mt->options >> ZSHIFT) - z -= ((mt->options >> ZSHIFT) << FRACBITS); + z -= (mt->z << FRACBITS); } else { z = P_GetZAt(sec->f_slope, x, y, sec->floorheight); floorheights[0] = z; - - if (mt->options >> ZSHIFT) - z += ((mt->options >> ZSHIFT) << FRACBITS); + z += (mt->z << FRACBITS); } diff --git a/src/k_respawn.c b/src/k_respawn.c index 7c0a7241e..59e5a0669 100644 --- a/src/k_respawn.c +++ b/src/k_respawn.c @@ -186,7 +186,7 @@ void K_DoIngameRespawn(player_t *player) else { sector_t *s; - fixed_t z = (beststart->options >> ZSHIFT) * FRACUNIT; + fixed_t z = beststart->z * FRACUNIT; player->respawn.pointx = beststart->x << FRACBITS; player->respawn.pointy = beststart->y << FRACBITS; diff --git a/src/slope_anchors.c b/src/slope_anchors.c index fef3b6e2d..51a567f19 100644 --- a/src/slope_anchors.c +++ b/src/slope_anchors.c @@ -118,17 +118,13 @@ anchor_height const mapthing_t * a, const sector_t * s ){ + if (a->options & MTF_OBJECTFLIP) { - INT16 z = ( a->options >> ZSHIFT ); - - if (a->options & MTF_OBJECTFLIP) - { - return ( s->ceilingheight >> FRACBITS ) - z; - } - else - { - return ( s->floorheight >> FRACBITS ) + z; - } + return ( s->ceilingheight >> FRACBITS ) - a->z; + } + else + { + return ( s->floorheight >> FRACBITS ) + a->z; } }