class ZY_Proj expands Projectile;

var() class<Effects> ExplSpriteEffect;
var byte Team;
var() byte LightH[4], LightS[4];

simulated function PostBeginPlay()
{
	Super.PostBeginPlay();
	Velocity = Speed * vector(Rotation);
	Team = Instigator.PlayerReplicationInfo.Team;

	if (Class'NWMutator'.default.bCybotID_InTeamGames && Level.Game.IsA('TeamGamePlus') && !Level.Game.IsA('MonsterHunt'))
	{
		LightHue = LightH[Team];
		LightSaturation = LightS[Team];
	}
}

function TakeDamage(int NDamage, pawn InstigatedBy, vector HitLocation, vector Momentum, name DType);

simulated function ProcessTouch (Actor Other, Vector HitLocation)
{
	if (Other != Instigator && !Other.IsA('Cybot'))
		Explode(HitLocation, vect(0,0,1));
}

    function BlowUp(vector HitLocation)
    {
        HurtRadius(Damage , 40, MyDamageType, MomentumTransfer, HitLocation);
	Spawn(ExplSpriteEffect);
        MakeNoise(0.4);
    }

simulated function Explode(vector HitLocation, vector HitNormal)
{
	BlowUp(HitLocation);
	Destroy();
}



defaultproperties
{
	DrawType=DT_Mesh
	Mesh=LodMesh'UnrealShare.DispM1'
	Style=STY_Translucent
	bBounce=False
	RemoteRole=ROLE_SimulatedProxy
	Damage=30
	MaxSpeed=4000.000000
	MomentumTransfer=5000
	MyDamageType=Energy
	speed=2000.000000
	DrawScale=0.500000
	bUnlit=True
	CollisionHeight=0.000000
	CollisionRadius=0.000000
	SoundVolume=60
	SoundRadius=80
	AmbientSound=Sound'UnrealShare.Dispersion.DispFly'
	ScaleGlow=3.000000
	LightBrightness=150
	LightHue=40
	LightSaturation=128
	LightEffect=LE_FireWaver
	LightRadius=4
	LightType=LT_Steady
	ExplosionDecal=None
	bNetTemporary=True
	LightH(0)=0
	LightS(0)=0
	LightH(1)=148
	LightS(1)=128
	LightH(2)=85
	LightS(2)=64
	LightH(3)=40
	LightS(3)=128
	ExplSpriteEffect=Class'ZY_ExplEffect'
}
