//============================================================================= // SchlonzMutator. //============================================================================= class SchlonzErstAugustSniper expands SniperRifle; var Actor ErstAugustTarget; var Vector ErstAugustLocation; var bool ErstAugustFired; function TraceFire( float Accuracy ) { local vector HitLocation, HitNormal, StartTrace, EndTrace, X,Y,Z; local actor Other; local Pawn PawnOwner; PawnOwner = Pawn(Owner); Owner.MakeNoise(PawnOwner.SoundDampening); GetAxes(PawnOwner.ViewRotation,X,Y,Z); StartTrace = Owner.Location + PawnOwner.Eyeheight * Z; AdjustedAim = PawnOwner.AdjustAim(1000000, StartTrace, 2*AimError, False, False); X = vector(AdjustedAim); EndTrace = StartTrace + 40000 * X; Other = PawnOwner.TraceShot(HitLocation,HitNormal,EndTrace,StartTrace); ProcessTraceHit(Other, HitLocation, HitNormal, X,Y,Z); } function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z) { local UT_Shellcase s; local SchlonzErstAugustFuse f; s = Spawn(class'UT_ShellCase',, '', Owner.Location + CalcDrawOffset() + 30 * X + (2.8 * FireOffset.Y+5.0) * Y - Z * 1); if ( s != None ) { s.DrawScale = 2.0; s.Eject(((FRand()*0.3+0.4)*X + (FRand()*0.2+0.2)*Y + (FRand()*0.3+1.0) * Z)*160); } if (Other == Level) { Spawn(class'UT_HeavyWallHitEffect',,, HitLocation+HitNormal, Rotator(HitNormal)); } else if( (Other != self) && (Other != Owner) && (Other != None) ) { if( instigator.IsA('PlayerPawn') && ( other.IsA('PlayerPawn') || other.IsA('Bot')) || other.IsA('ScriptedPawn' ) ) { /* ErstAugustTarget = Other; ErstAugustLocation = Other.Location; ErstAugustLocation.Z += 100; GotoState( 'ErstAugust' ); */ f = Spawn( class'SchlonzErstAugustFuse', , , Other.Location, Rotator(Normal(Other.Velocity)) ); f.BlowUp( Other ); } else { if( Other.bIsPawn ) Other.PlaySound(Sound 'ChunkHit',, 4.0,,100); if( Other.bIsPawn && (HitLocation.Z - Other.Location.Z > 0.62 * Other.CollisionHeight) && (instigator.IsA('PlayerPawn') || (instigator.IsA('Bot') && !Bot(Instigator).bNovice)) ) Other.TakeDamage(2500, Pawn(Owner), HitLocation, 35000 * X, AltDamageType); else Other.TakeDamage(500, Pawn(Owner), HitLocation, 30000.0*X, MyDamageType); if ( !Other.bIsPawn && !Other.IsA('Carcass') ) spawn(class'UT_SpriteSmokePuff',,,HitLocation+HitNormal*9); } } }