Quadravol level 2 projectile + melee tweaks.
This commit is contained in:
parent
1ca5f97870
commit
0b93a01401
30 changed files with 316 additions and 43 deletions
|
|
@ -177,6 +177,7 @@ Class PunchImpact : Actor
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "WallCrack";
|
||||
Radius 0.1;
|
||||
Height 0;
|
||||
+NOGRAVITY;
|
||||
|
|
@ -189,7 +190,7 @@ Class PunchImpact : Actor
|
|||
Super.PostBeginPlay();
|
||||
A_QuakeEx(2,2,2,12,0,200,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:100,rollIntensity:.3);
|
||||
A_StartSound("demolitionist/punch",CHAN_VOICE,CHANF_DEFAULT,bAMBUSH?.6:1.);
|
||||
A_SprayDecal("WallCrack",-20);
|
||||
A_SprayDecal(GetTag(),-20);
|
||||
int numpt = Random[Ponch](5,10);
|
||||
if ( bAMBUSH ) numpt /= 3;
|
||||
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ extend Class SWWMWeapon
|
|||
GiveInventory("ParryDamageChecker",1); // need this so parried projectiles deal extra damage
|
||||
}
|
||||
// multi-hit cone rather than the usual one-hit arc, more fun
|
||||
private action bool TryMelee( double spread, int dmg, String hitsound, double rangemul, double kickmul, int flags )
|
||||
private action bool TryMelee( double spread, int dmg, String hitsound, double rangemul, double kickmul, int flags, Class<Actor> impactclass )
|
||||
{
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
@ -446,9 +446,9 @@ extend Class SWWMWeapon
|
|||
mt.hits[i].a.TraceBleed(newdmg,invoker);
|
||||
mt.hits[i].a.SpawnBlood(mt.hits[i].pos,atan2(mt.hits[i].dir.y,mt.hits[i].dir.x)+180,newdmg);
|
||||
}
|
||||
else
|
||||
else if ( impactclass )
|
||||
{
|
||||
let p = Spawn(raging?"BigPunchImpact":"PunchImpact",mt.hits[i].pos);
|
||||
let p = Spawn(raging?(Class<Actor>)("BigPunchImpact"):impactclass,mt.hits[i].pos);
|
||||
p.angle = atan2(mt.hits[i].dir.y,mt.hits[i].dir.x);
|
||||
}
|
||||
if ( (flags&MELEE_HammerHit) && (mt.hits[i].a.Health <= mt.hits[i].a.GetGibHealth()) )
|
||||
|
|
@ -498,7 +498,7 @@ extend Class SWWMWeapon
|
|||
A_BumpFOV(.96);
|
||||
return true;
|
||||
}
|
||||
action bool A_Melee( int dmg = 40, String hitsound = "", double rangemul = 1., double spreadmul = 1., double kickmul = 1., int flags = 0 )
|
||||
action bool A_Melee( int dmg = 40, String hitsound = "", double rangemul = 1., double spreadmul = 1., double kickmul = 1., int flags = 0, Class<Actor> impactclass = "PunchImpact" )
|
||||
{
|
||||
let raging = RagekitPower(FindInventory("RagekitPower"));
|
||||
if ( flags&MELEE_NoRage ) raging = null;
|
||||
|
|
@ -535,7 +535,7 @@ extend Class SWWMWeapon
|
|||
// check for shootables
|
||||
SWWMBulletTrail.DoTrail(self,origin,dir,DEFMELEERANGE*rangemul,0);
|
||||
}
|
||||
bool res = TryMelee((raging?.3:.2)*spreadmul,dmg,hitsound,rangemul,kickmul,flags);
|
||||
bool res = TryMelee((raging?.3:.2)*spreadmul,dmg,hitsound,rangemul,kickmul,flags,impactclass);
|
||||
if ( res && !(flags&MELEE_Rip) ) return res;
|
||||
// check for walls instead
|
||||
FTranslatedLineTarget t;
|
||||
|
|
@ -560,10 +560,13 @@ extend Class SWWMWeapon
|
|||
if ( !d.LineSide ) HitNormal *= -1;
|
||||
if ( !(flags&MELEE_NoUse) ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation+HitNormal*4);
|
||||
}
|
||||
let p = Spawn(raging?"BigPunchImpact":"PunchImpact",d.HitLocation+HitNormal*4);
|
||||
p.angle = atan2(HitNormal.y,HitNormal.x);
|
||||
p.pitch = asin(-HitNormal.z);
|
||||
if ( d.HitType == TRACE_HitFloor ) p.CheckSplash(40);
|
||||
if ( impactclass )
|
||||
{
|
||||
let p = Spawn(raging?(Class<Actor>)("BigPunchImpact"):impactclass,d.HitLocation+HitNormal*4);
|
||||
p.angle = atan2(HitNormal.y,HitNormal.x);
|
||||
p.pitch = asin(-HitNormal.z);
|
||||
if ( d.HitType == TRACE_HitFloor ) p.CheckSplash(40);
|
||||
}
|
||||
if ( raging )
|
||||
{
|
||||
let ps = Spawn("BigPunchSplash",d.HitLocation+HitNormal*4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue