class UR_Proj_UberMegaLink extends UTProjectile;

/**
attenuate damage over time
*/
function AttenuateDamage()
{
	if ( LifeSpan < 1.0 )
    {
		Damage = 0.75 * Default.Damage;
    }
	else
    {
		Damage = Default.Damage * FMin(2.0, Square(MaxSpeed)/VSizeSq(Velocity));
    }
}

simulated function HitWall(vector HitNormal, actor Wall, PrimitiveComponent WallComp)
{
	AttenuateDamage();
	Super.HitWall(HitNormal, Wall, WallComp);
}

simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
{
	AttenuateDamage();
	Super.ProcessTouch(Other, HitLocation, HitNormal);
}

defaultproperties
{
	ProjFlightTemplate=ParticleSystem'LP_Weapons.Effects.LP_MegaLink_Bolt_A'
	ProjExplosionTemplate=ParticleSystem'VH_Raptor.Effects.PS_Raptor_Gun_Impact_Blue'

    Speed=1400
    MaxSpeed=5000
	AccelRate=3000.0

    Damage=40
    DamageRadius=20
    MomentumTransfer=4000

    MyDamageType=class'UTDmgType_RaptorBolt'
    LifeSpan=1.6

    bCollideWorld=true
    DrawScale=1.4
}
