From 3058648fdc1f0ec8723a0e2a273d66b067c575f2 Mon Sep 17 00:00:00 2001
From: Monster Iestyn <iestynjealous@ntlworld.com>
Date: Tue, 16 Feb 2016 17:58:08 +0000
Subject: [PATCH] Fix elemental flame trails not spawning when going up slopes

---
 src/p_user.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/p_user.c b/src/p_user.c
index 96841d7e07..d5ff80f6e5 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -6193,6 +6193,14 @@ void P_ElementalFireTrail(player_t *player)
 	{
 		newx = player->mo->x + P_ReturnThrustX(player->mo, travelangle + ((i&1) ? -1 : 1)*ANGLE_135, FixedMul(24*FRACUNIT, player->mo->scale));
 		newy = player->mo->y + P_ReturnThrustY(player->mo, travelangle + ((i&1) ? -1 : 1)*ANGLE_135, FixedMul(24*FRACUNIT, player->mo->scale));
+#ifdef ESLOPE
+		if (player->mo->standingslope)
+		{
+			ground = P_GetZAt(player->mo->standingslope, newx, newy);
+			if (player->mo->eflags & MFE_VERTICALFLIP)
+				ground -= FixedMul(mobjinfo[MT_SPINFIRE].height, player->mo->scale);
+		}
+#endif
 		flame = P_SpawnMobj(newx, newy, ground, MT_SPINFIRE);
 		P_SetTarget(&flame->target, player->mo);
 		flame->angle = travelangle;
-- 
GitLab