class SchlonzRazorAlt extends Razor2Alt; var int splits; auto state Flying { simulated function ProcessTouch( Actor Other, Vector HitLocation ) { if( Other != Instigator && !Other.isA( 'SchlonzRazorAlt' ) ) { Super.ProcessTouch( Other, HitLocation ); } } simulated function Timer() { local float v; local vector vx, vy, vz; Super.Timer(); if( splits < 1 ) { return; } v = VSize( velocity ) * 0.02 * splits; vx = Normal(Velocity); if( vx.Z < 0.95 ) { vy = Normal( vx cross vect( 0, 0, 1 ) ); vz = vx cross vy; } else { vy = Normal( vx cross vect( 1, 0, 0 ) ); vz = vx cross vy; } vy *= v * 1.5; vz *= v; splits /= 2; SpawnRazor( velocity + vy + vz ); SpawnRazor( velocity + vy - vz ); SpawnRazor( velocity - vy + vz ); Velocity -= vy + vz; SetRotation( rotator( velocity ) ); SetTimer( 0.3, false ); } function SpawnRazor( Vector dir ) { local SchlonzRazorAlt r; r = spawn( Class'SchlonzRazorAlt',,, Location, rotator(dir) ); r.Velocity = dir; r.splits = splits; } simulated function BeginState() { Super.BeginState(); SetTimer( 0.1, false ); } 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.isA( 'Pawn' ) ) { 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 { ExplosionDecal=None Damage=100.000000 MomentumTransfer=200000 }