From ef6430c23eaadca8a78285d82fa7a53b0e2495a1 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 15 Feb 2016 20:34:53 +0000 Subject: [PATCH] Fix respawning rings on slopes --- src/p_mobj.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 25ae8815..f240c40f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8171,7 +8171,11 @@ void P_RespawnSpecials(void) if (mthing->options & MTF_OBJECTFLIP) { - z = ss->sector->ceilingheight - (mthing->options >> ZSHIFT) * FRACUNIT; + z = ( +#ifdef ESLOPE + ss->sector->c_slope ? P_GetZAt(ss->sector->c_slope, x, y) : +#endif + ss->sector->ceilingheight) - (mthing->options >> ZSHIFT) * FRACUNIT; if (mthing->options & MTF_AMBUSH && (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i))) z -= 24*FRACUNIT; @@ -8179,7 +8183,11 @@ void P_RespawnSpecials(void) } else { - z = ss->sector->floorheight + (mthing->options >> ZSHIFT) * FRACUNIT; + z = ( +#ifdef ESLOPE + ss->sector->f_slope ? P_GetZAt(ss->sector->f_slope, x, y) : +#endif + ss->sector->floorheight) + (mthing->options >> ZSHIFT) * FRACUNIT; if (mthing->options & MTF_AMBUSH && (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i))) z += 24*FRACUNIT;