From 96153e7e7ede31ed928c948fce7a7495feef28cc Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Thu, 14 Nov 2019 11:51:36 -0600 Subject: [PATCH] - Fixed: Invulnerability checking for rails was done before the various THRU actor flags instead of after, meaning actors could block shots regardless of those flags. This was never intended. --- src/p_map.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index ccd6c73a0..dec34563a 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -5100,12 +5100,6 @@ static ETraceStatus ProcessRailHit(FTraceResults &res, void *userdata) return TRACE_Stop; } - // Invulnerable things completely block the shot - if (data->StopAtInvul && res.Actor->flags2 & MF2_INVULNERABLE) - { - return TRACE_Stop; - } - // Skip actors if the puff has: // 1. THRUACTORS (This one did NOT include a check for spectral) // 2. MTHRUSPECIES on puff and the shooter has same species as the hit actor @@ -5120,6 +5114,12 @@ static ETraceStatus ProcessRailHit(FTraceResults &res, void *userdata) return TRACE_Skip; } + // Invulnerable things completely block the shot + if (data->StopAtInvul && res.Actor->flags2 & MF2_INVULNERABLE) + { + return TRACE_Stop; + } + // Save this thing for damaging later, and continue the trace SRailHit newhit; newhit.HitActor = res.Actor;