Here, look in INFc_Weapon, FireTracer() and scroll down to the end of the function:
You can modify this function and overwrite it in UN_Mk23 to check if Other is a Pawn or not like this:
Now write a function DrawSpriteDot that is similar to DrawLaserDot only it spawns the sprite version.
Code:
// LaserSight !!
Other = PawnOwner.TraceShot(HitLocation,HitNormal,EndTrace,Start);
if (Other != None)
{
DrawLaserDot(HitLocation, HitNormal);
}
else if ( LaserPoint != None )
{
LaserPoint.Destroy();
LaserPoint = None;
}
Code:
// LaserSight !!
Other = PawnOwner.TraceShot(HitLocation,HitNormal,EndTrace,Start);
if ( Pawn(Other) != None)
DrawSpriteDot(HitLocation, HitNormal);
else if( Other != None )
DrawLaserDot(HitLocation, HitNormal);
else if ( LaserPoint != None )
{
LaserPoint.Destroy();
LaserPoint = None;
}
Last edited: