Allow parrying own projectiles (despite this hardly being doable in practice).

This commit is contained in:
Mari the Deer 2021-06-13 16:47:25 +02:00
commit 01c30c996d
3 changed files with 6 additions and 6 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r538 \cu(Sun 13 Jun 14:20:27 CEST 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r538 \cu(2021-06-13 14:20:27)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r539 \cu(Sun 13 Jun 16:47:25 CEST 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r539 \cu(2021-06-13 16:47:25)\c-";

View file

@ -136,11 +136,11 @@ Class ParryField : Actor
Actor a;
while ( a = Actor(ti.Next()) )
{
if ( !((SWWMUtility.ValidProjectile(a) && (a.target != master)) || a.bSKULLFLY) || a.bTHRUACTORS || (level.Vec3Diff(a.pos,pos).length() > 80) ) continue;
if ( !(SWWMUtility.ValidProjectile(a) || a.bSKULLFLY) || a.bTHRUACTORS || (level.Vec3Diff(a.pos,pos).length() > 80) ) continue;
Vector3 vdir = a.vel;
Vector3 dir = level.Vec3Diff(master.Vec2OffsetZ(0,0,pos.z),a.pos).unit();
Vector3 hdir = dir;
if ( a.bMISSILE || (a is 'HolySpirit') ) // special wraithverge handling
if ( (a.target != master) && (a.bMISSILE || (a is 'HolySpirit')) ) // special wraithverge handling
{
// deflect directly to target
if ( a.target )

View file

@ -214,7 +214,7 @@ Class DeepImpact : SWWMWeapon
let s = Demolitionist(self).mystats;
while ( m = Actor(ti.Next()) )
{
if ( !(SWWMUtility.ValidProjectile(m) && (m.target != self)) ) continue;
if ( !SWWMUtility.ValidProjectile(m) ) continue;
Vector3 rdir = level.Vec3Diff(origin,m.pos);
double rdist = rdir.length();
if ( rdist <= 0. ) continue;
@ -225,7 +225,7 @@ Class DeepImpact : SWWMWeapon
Vector3 ndir = m.vel.unit();
m.angle = atan2(ndir.y,ndir.x);
m.pitch = asin(-ndir.z);
if ( m.bSEEKERMISSILE ) m.tracer = m.target;
if ( m.bSEEKERMISSILE && (m.target != self) ) m.tracer = m.target;
m.target = self;
if ( !m.FindInventory("ParriedBuff") )
{