Fixed here too.

This commit is contained in:
Mari the Deer 2021-10-30 11:41:59 +02:00
commit 8f672a8bd2
3 changed files with 6 additions and 9 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r45 \cu(Fri 29 Oct 20:09:35 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r45 \cu(2021-10-29 20:09:35)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r46 \cu(Sat 30 Oct 11:41:59 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r46 \cu(2021-10-30 11:41:59)\c-";

View file

@ -32,7 +32,7 @@ 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)?-abs(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;
let ent = new("HitListEntry");
@ -95,7 +95,8 @@ Class SpreadSlugTracer : SpreadgunTracer
}
else
{
ent.hitdamage = min(Results.HitActor.health+int(Results.HitActor.GetSpawnHealth()*gameinfo.gibfactor),int(penetration));
int gibh = (Results.HitActor.GibHealth!=int.min)?-abs(Results.HitActor.GibHealth):-int(Results.HitActor.GetSpawnHealth()*gameinfo.gibfactor);
ent.hitdamage = min(Results.HitActor.health+abs(gibh),int(penetration));
penetration = max(0,penetration-ent.hitdamage);
}
hitlist.Push(ent);

View file

@ -60,15 +60,11 @@ Class SilverBulletTracer : SpreadSlugTracer
ent.hitlocation = Results.HitPos;
ent.x = Results.HitVector;
ent.pastwall = pastwall;
ent.hitdamage = int(penetration);
if ( (Results.HitActor.Health >= int(penetration)) || Results.HitActor.bNODAMAGE )
{
ent.hitdamage = int(penetration);
penetration = 0;
}
else
{
int gibh = (Results.HitActor.GibHealth!=int.min)?Results.HitActor.GibHealth:-int(Results.HitActor.GetSpawnHealth()*gameinfo.gibfactor);
ent.hitdamage = min(Results.HitActor.health-int(gibh*1.5),int(penetration));
int killdamage = min(Results.HitActor.health,int(penetration));
penetration = max(0,penetration-killdamage*.4);
}