Fix more stupidity crashes related to enemies ceasing to exist the instant they die (I really wish some modders weren't fucking stupid doing that, yes, you can guess what kind of mod triggered this).
This commit is contained in:
parent
5445a7e3f4
commit
498aaeadb3
3 changed files with 11 additions and 11 deletions
|
|
@ -1,2 +1,2 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \cwGZ\c- r510 (Fri 28 Aug 12:59:13 CEST 2020)";
|
||||
SWWM_MODVER="\chSWWM \cwGZ\c- r511 (Fri 28 Aug 19:25:05 CEST 2020)";
|
||||
|
|
|
|||
|
|
@ -752,7 +752,7 @@ Class ParryField : Actor
|
|||
Actor a;
|
||||
while ( a = Actor(ti.Next()) )
|
||||
{
|
||||
if ( !((a.bMISSILE && !a.IsZeroDamage()) || a.bSKULLFLY) || a.bTHRUACTORS || (level.Vec3Diff(a.pos,Vec3Offset(0,0,20)).length() > 80) ) continue;
|
||||
if ( !((a.bMISSILE && !a.IsZeroDamage() && (a.target != master)) || a.bSKULLFLY) || a.bTHRUACTORS || (level.Vec3Diff(a.pos,Vec3Offset(0,0,20)).length() > 80) ) continue;
|
||||
Vector3 vdir = a.vel;
|
||||
Vector3 dir = level.Vec3Diff(master.Vec2OffsetZ(0,0,pos.z),a.pos).unit();
|
||||
if ( a.bMISSILE )
|
||||
|
|
|
|||
|
|
@ -707,14 +707,7 @@ Class SilverBullet : SWWMWeapon
|
|||
int realdmg = t.HitList[i].HitDamage;
|
||||
SWWMDamageAccumulator.Accumulate(t.HitList[i].HitActor,realdmg,invoker,self,'shot',false,DMG_FOILINVUL);
|
||||
SWWMUtility.DoKnockback(t.HitList[i].HitActor,t.HitList[i].x+(0,0,0.025),realdmg*20.*FRandom[SilverBullet](.8,1.2));
|
||||
if ( t.HitList[i].HitActor.bNOBLOOD )
|
||||
{
|
||||
let p = Spawn("SilverImpact",t.HitList[i].HitLocation);
|
||||
p.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180;
|
||||
p.pitch = asin(t.HitList[i].x.z);
|
||||
p.target = self;
|
||||
}
|
||||
else
|
||||
if ( t.HitList[i].HitActor && !t.HitList[i].HitActor.bNOBLOOD )
|
||||
{
|
||||
t.HitList[i].HitActor.TraceBleed(realdmg,self);
|
||||
t.HitList[i].HitActor.SpawnBlood(t.HitList[i].HitLocation,atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180,realdmg);
|
||||
|
|
@ -723,6 +716,13 @@ Class SilverBullet : SWWMWeapon
|
|||
p.special1 = 1;
|
||||
p.target = self;
|
||||
}
|
||||
else
|
||||
{
|
||||
let p = Spawn("SilverImpact",t.HitList[i].HitLocation);
|
||||
p.angle = atan2(t.HitList[i].x.y,t.HitList[i].x.x)+180;
|
||||
p.pitch = asin(t.HitList[i].x.z);
|
||||
p.target = self;
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<t.WallPenetrateList.Size(); i++ )
|
||||
{
|
||||
|
|
@ -810,9 +810,9 @@ Class SilverBullet : SWWMWeapon
|
|||
}
|
||||
if ( t.Results.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = t.Results.HitActor.DamageMobj(invoker,self,1000,'shot',DMG_FOILINVUL|DMG_USEANGLE|DMG_THRUSTLESS,atan2(t.Results.HitVector.y,t.Results.HitVector.x));
|
||||
SWWMUtility.DoKnockback(t.Results.HitActor,t.Results.HitVector+(0,0,.025),dmg*20.*FRandom[SilverBullet](.8,1.2));
|
||||
if ( !t.Results.HitActor.bNOBLOOD )
|
||||
int dmg = t.Results.HitActor.DamageMobj(invoker,self,1000,'shot',DMG_FOILINVUL|DMG_USEANGLE|DMG_THRUSTLESS,atan2(t.Results.HitVector.y,t.Results.HitVector.x));
|
||||
if ( t.Results.HitActor && !t.Results.HitActor.bNOBLOOD )
|
||||
{
|
||||
t.Results.HitActor.TraceBleed(dmg,self);
|
||||
t.Results.HitActor.SpawnBlood(t.Results.HitPos,atan2(t.Results.HitVector.y,t.Results.HitVector.x)+180,dmg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue