Fix respawning rings on slopes

This commit is contained in:
Monster Iestyn 2016-02-15 20:34:53 +00:00
parent 5d1c8d2968
commit ef6430c23e

View file

@ -8171,7 +8171,11 @@ void P_RespawnSpecials(void)
if (mthing->options & MTF_OBJECTFLIP) 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 if (mthing->options & MTF_AMBUSH
&& (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i))) && (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i)))
z -= 24*FRACUNIT; z -= 24*FRACUNIT;
@ -8179,7 +8183,11 @@ void P_RespawnSpecials(void)
} }
else 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 if (mthing->options & MTF_AMBUSH
&& (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i))) && (i == MT_RING || i == MT_REDTEAMRING || i == MT_BLUETEAMRING || i == MT_COIN || P_WeaponOrPanel(i)))
z += 24*FRACUNIT; z += 24*FRACUNIT;