From 24f1bfae99c6d2d79bac8fb9f0bdc296b5aaee0d Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Tue, 16 Dec 2014 12:48:52 -0600 Subject: [PATCH] - Need to set it on the puff itself, not the defaults. --- src/p_map.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 871ad6c8b..48da5c72c 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3760,11 +3760,11 @@ AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance, puff = P_SpawnPuff(t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, puffFlags | PF_HITTHING); } - if (puffDefaults != NULL && trace.Actor != NULL) + if (puffDefaults != NULL && trace.Actor != NULL && puff != NULL) { - if (puffDefaults->flags7 && MF7_HITTARGET) puffDefaults->target = trace.Actor; - if (puffDefaults->flags7 && MF7_HITMASTER) puffDefaults->master = trace.Actor; - if (puffDefaults->flags7 && MF7_HITTRACER) puffDefaults->tracer = trace.Actor; + if (puffDefaults->flags7 && MF7_HITTARGET) puff->target = trace.Actor; + if (puffDefaults->flags7 && MF7_HITMASTER) puff->master = trace.Actor; + if (puffDefaults->flags7 && MF7_HITTRACER) puff->tracer = trace.Actor; } // Allow puffs to inflict poison damage, so that hitscans can poison, too. @@ -4209,11 +4209,11 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i { P_SpawnPuff(source, puffclass, x, y, z, (source->angle + angleoffset) - ANG90, 1, puffflags); } - if (hitactor != NULL && puffDefaults != NULL) + if (hitactor != NULL && puffDefaults != NULL && thepuff != NULL) { - if (puffDefaults->flags7 & MF7_HITTARGET) puffDefaults->target = hitactor; - if (puffDefaults->flags7 & MF7_HITMASTER) puffDefaults->master = hitactor; - if (puffDefaults->flags7 & MF7_HITTRACER) puffDefaults->tracer = hitactor; + if (puffDefaults->flags7 & MF7_HITTARGET) thepuff->target = hitactor; + if (puffDefaults->flags7 & MF7_HITMASTER) thepuff->master = hitactor; + if (puffDefaults->flags7 & MF7_HITTRACER) thepuff->tracer = hitactor; } if (puffDefaults && puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN) {