function TraceFire( float Accuracy )
{
local vector HitLocation, HitNormal, StartTrace, EndTrace, X,Y,Z;
local actor Other;
Owner.MakeNoise(Pawn(Owner).SoundDampening);
GetAxes(Pawn(owner).ViewRotation,X,Y,Z); //okay, this gives the vectors x, y, and z the player's rotation, pitch, yaw, whatever. I got that.
StartTrace = Owner.Location + CalcDrawOffset() + FireOffset.Y * Y + FireOffset.Z * Z; //this places the beginning of the trace at Owner.Location plus the fire offset and the draw offset. This is where it gets a bit fuzzy.
/* Okay, a vector is a struct, right? A struct with three variables, x, y, and z. I am assuming that Owner.Location is also a vector. In the above statement I see the offsets (I understand those) being added to the Owner.Location, but I don't see how you can add the Y value to the Z value and get anything other than garbage numbers. Am I missing something?
Dammit! Must get off phone lines. Be back later with mucho edits.
Have at the rest of this.
*/
EndTrace = StartTrace + Accuracy * (FRand() - 0.5 )* Y * 1000
+ Accuracy * (FRand() - 0.5 ) * Z * 1000 ;
if ( bBotSpecialMove && (Tracked != None)
&& (((Owner.Acceleration == vect(0,0,0)) && (VSize(Owner.Velocity) < 40)) ||
(Normal(Owner.Velocity) Dot Normal(Tracked.Velocity) > 0.95)) )
EndTrace += 10000 * Normal(Tracked.Location - StartTrace);
else
{
AdjustedAim = pawn(owner).AdjustAim(1000000, StartTrace, 2.75*AimError, False, False);
EndTrace += (10000 * vector(AdjustedAim));
}
Tracked = None;
bBotSpecialMove = false;
Other = Pawn(Owner).TraceShot(HitLocation,HitNormal,EndTrace,StartTrace);
ProcessTraceHit(Other, HitLocation, HitNormal, vector(AdjustedAim),Y,Z);
}