- 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.

This commit is contained in:
Major Cooke 2019-11-14 11:51:36 -06:00 committed by Christoph Oelckers
parent 0b0984b88e
commit 5425aa979d

View file

@ -5089,12 +5089,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
@ -5109,6 +5103,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;