class TazerBeam extends Effects;

var vector MoveAmount;
var int NumPuffs;

replication
{
   // Things the server should send to the client.
   unreliable if( Role==ROLE_Authority )
      MoveAmount, NumPuffs;
}

simulated function Tick( float DeltaTime )
{
   if ( Level.NetMode  != NM_DedicatedServer )
   {
      ScaleGlow = (Lifespan/Default.Lifespan) * 1.0;
      AmbientGlow = ScaleGlow * 210;
   }
}

simulated function PostBeginPlay()
{
      SetTimer(0.001, false);
}

simulated function Timer()
{
   local TazerBeam r;
   
   if (NumPuffs>0)
   {
      r = Spawn(class'Tazerbeam',,,Location+MoveAmount);
      r.RemoteRole = ROLE_None;
      r.NumPuffs = NumPuffs -1;
      r.MoveAmount = MoveAmount;
   }
}

defaultproperties
{
     Physics=PHYS_Rotating
     LifeSpan=2.000000
     DrawType=DT_Mesh
     Style=STY_Translucent
     Mesh=LodMesh'DeusExItems.LaserBeam'
     DrawScale=1.000000
     bUnlit=True
     bParticles=True
     CollisionRadius=0.000000
     CollisionHeight=0.000000
     LightType=LT_Steady
     LightBrightness=255
     LightHue=128
     LightRadius=2
     bBounce=True
     bFixedRotationDir=True
     RotationRate=(Roll=2000000000)
     DesiredRotation=(Roll=20000)
     MultiSkins(0)=FireTexture'Effects.Electricity.WEPN_NESword_SFX'
}
