Fix incorrect gibhealth handling in hitscan.

This commit is contained in:
Mari the Deer 2021-08-17 15:12:41 +02:00
commit 9ee1340761
3 changed files with 6 additions and 6 deletions

View file

@ -32,9 +32,9 @@ Class SpreadgunTracer : LineTracer
{
int amt = SWWMDamageAccumulator.GetAmount(Results.HitActor);
// getgibhealth isn't clearscope, fuck
int gibh = (Results.HitActor.GibHealth!=int.min)?Results.HitActor.GibHealth:int(Results.HitActor.GetSpawnHealth()*gameinfo.gibfactor);
int gibh = (Results.HitActor.GibHealth!=int.min)?Results.HitActor.GibHealth:-int(Results.HitActor.GetSpawnHealth()*gameinfo.gibfactor);
// if gibbed, go through without dealing more damage
if ( Results.HitActor.health-amt <= -gibh ) return TRACE_Skip;
if ( Results.HitActor.health-amt <= gibh ) return TRACE_Skip;
let ent = new("HitListEntry");
ent.hitactor = Results.HitActor;
ent.hitlocation = Results.HitPos;