//============================================================================= // AdvancedBladeAlt. //============================================================================= class AdvancedBladeAlt expands RazorBladeAlt; auto state Flying { simulated function ProcessTouch (Actor Other, Vector HitLocation) { local RipperPulse1 s; if ( Other != Instigator ) { if ( Role == ROLE_Authority ) { Other.TakeDamage(damage, instigator,HitLocation, (MomentumTransfer * Normal(Velocity)), MyDamageType ); } s = spawn(class'RipperPulse1',,,HitLocation); s.RemoteRole = ROLE_None; MakeNoise(1.0); Destroy(); } } simulated function HitWall (vector HitNormal, actor Wall) { Super(Projectile).HitWall( HitNormal, Wall ); } simulated function Explode(vector HitLocation, vector HitNormal) { local RipperPulse1 s; local vector start; s = spawn(class'RipperPulse1',,,HitLocation + HitNormal*16); s.RemoteRole = ROLE_None; BlowUp(HitLocation); start = Location + 10 * HitNormal; Spawn( class 'razor3',, '', Start,rotrand()); Spawn( class 'razor3',, '', Start,rotrand()); Spawn( class 'razor3',, '', Start,rotrand()); Spawn( class 'razor3',, '', Start,rotrand()); Spawn( class 'razor3',, '', Start,rotrand()); Destroy(); } function BlowUp(vector HitLocation) { local actor Victims; local float damageScale, dist; local vector dir; if( bHurtEntry ) return; bHurtEntry = true; foreach VisibleCollidingActors( class 'Actor', Victims, 180, HitLocation ) { if( Victims != self ) { dir = Victims.Location - HitLocation; dist = FMax(1,VSize(dir)); dir = dir/dist; dir.Z = FMin(0.45, dir.Z); damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/180); Victims.TakeDamage ( damageScale * Damage, Instigator, Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir, damageScale * MomentumTransfer * dir, MyDamageType ); } } bHurtEntry = false; MakeNoise(1.0); } } defaultproperties { Damage=35.000000 }