From fa01a32a7f86d47134a0b31ef97673b10e7d7fc4 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 17:56:42 +0000 Subject: [PATCH] Move the fireball despawn to later so its target/tracer isn't nulled until AFTER the enemy it touches is killed, allowing for correct point delivery (resolves #373). --- src/p_map.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index d4c753dfc..8220f3818 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1303,11 +1303,6 @@ static boolean PIT_CheckThing(mobj_t *thing) return false; } - // Fireball touched an enemy - // Don't bounce though, just despawn right there - if ((tmthing->type == MT_FIREBALL) && (thing->flags & MF_ENEMY)) - P_KillMobj(tmthing, NULL, NULL, 0); - // damage / explode if (tmthing->flags & MF_ENEMY) // An actual ENEMY! (Like the deton, for example) P_DamageMobj(thing, tmthing, tmthing, 1, 0); @@ -1356,6 +1351,11 @@ static boolean PIT_CheckThing(mobj_t *thing) P_DamageMobj(thing, tmthing, tmthing->target, 1, damagetype); } + // Fireball touched an enemy + // Don't bounce though, just despawn right there + if ((tmthing->type == MT_FIREBALL) && (thing->flags & MF_ENEMY)) + P_KillMobj(tmthing, NULL, NULL, 0); + // don't traverse any more if (tmthing->type == MT_SHELL)