class SchlonzAssaultFire extends AssaultFire; function DoFireEffect() { local Vector StartTrace; local Rotator R, Aim; local bool bDone; Instigator.MakeNoise( 1.0 ); // the to-hit trace always starts right in front of the eye StartTrace = Instigator.Location + Instigator.EyePosition(); bDone = false; if( Instigator.PlayerReplicationInfo != None ) { if( Instigator.PlayerReplicationInfo.bBot ) { Aim = AdjustAim( StartTrace, 600 ); R = rotator( vector( Aim ) + VRand()*FRand()*Spread ); bDone = true; } } if( bDone == false ) { Aim = AdjustAim( StartTrace, 100 ); // much more precise !!! R = rotator( vector( Aim ) ); } DoTrace( StartTrace, R ); } // DoFireEffect function DoTrace(Vector Start, Rotator Dir) { local Vector X, End, HitLocation, HitNormal, RefNormal; local Actor Other; local int Damage; local bool bDoReflect; local int ReflectNum; ReflectNum = 0; while( true ) { bDoReflect = false; X = Vector( Dir ); End = Start + TraceRange * X; Other = Trace( HitLocation, HitNormal, End, Start, true ); if( Other != None && (Other != Instigator || ReflectNum > 0) ) { if( bReflective && Other.IsA( 'xPawn' ) && xPawn( Other ).CheckReflect( HitLocation, RefNormal, DamageMin*0.25 ) ) { bDoReflect = true; HitNormal = Vect(0,0,0); } else if( !Other.bWorldGeometry ) { Damage = (DamageMin + Rand(DamageMax - DamageMin)) * DamageAtten; Other.TakeDamage( Damage, Instigator, HitLocation, Momentum*X, DamageType ); HitNormal = Vect(0,0,0); if( Pawn( Other ).PlayerReplicationInfo != None ) { if( Pawn( Other ).PlayerReplicationInfo.bBot ) { Instigator.ClientMessage( "Shaarrinnnkkk" ); SchlonzXPawnBot( Other ).SetPawnBotSize( -0.2 ); } } } else if ( WeaponAttachment( Weapon.ThirdPersonActor ) != None ) { WeaponAttachment( Weapon.ThirdPersonActor ).UpdateHit( Other,HitLocation,HitNormal ); } } else { HitLocation = End; HitNormal = Vect(0,0,0); } SpawnBeamEffect( Start, Dir, HitLocation, HitNormal, ReflectNum ); if( bDoReflect && ++ReflectNum < 4 ) { Start = HitLocation; Dir = Rotator( RefNormal ); } else { break; } } } // DoTrace defaultproperties { DamageType=Class'SchlonzUT.SchlonzDamTypeEnforcer' DamageMin=15 DamageMax=15 FireRate=0.500000 ShakeRotMag=(X=4.000000,Y=4.000000,Z=4.000000) Spread=0.040000 }