class SHIELD_GUN extends Weapon config(user);

#EXEC OBJ LOAD FILE=SHIELD_2016_TX.utx
#EXEC OBJ LOAD FILE=SHIELD_2016_ANI.ukx
#EXEC OBJ LOAD FILE=SHIELD_2016_SM.usx

var enum M_Shield_Gun_Mode {
                             M_Idle,
                             M_Shield,
                             M_Charging,
                             M_Push
                             } SG_Mode;

var Name Next_Idle_Anim;
var bool Ready, Exosted, Active;
var float Energy, Max_Energy, Stored_Energy, Max_Stored_Energy, Recovery_Rate;
var float Next_Recover_Time, Next_Blast_Time, Blasts_Interval, Recovery_Interval;
var ScriptedTexture LCD_T;
var Shader LCD_S, HUD_Add;
var int BlastRange, Blasts_Left;
var float BlastDamageK, BlastMomentumK;
var Emitter Top_Balst, Bottom_Balst, Left_Balst, Right_Balst;
var SHIELD Shield_Actor;
var Sound ChargingSound, BlastSound, PushSound, FullSound, ClickSound, ShieldOffSound;
var vector DropVector;
var array<Projectile> Projectiles;
var array<float> Velocities;

simulated function PostBeginPlay()
{
 LCD_T = new class'ScriptedTexture';
 LCD_T.SetSize(64,64);
 LCD_T.Client = self;
 LCD_S = new class'Shader';
 HUD_Add = new class'Shader';
 LCD_S.Diffuse = LCD_T;
 LCD_S.Specular = LCD_T;
 HUD_Add.Diffuse = LCD_T;
 HUD_Add.OutputBlending  = OB_Translucent;
 Skins[0] = LCD_S;
 Super.PostBeginPlay();

 Top_Balst = Spawn(class'Blast_TOP',self);
 AttachToBone(Top_Balst, 'top_emitter');

 Bottom_Balst = Spawn(class'Blast_BOTTOM',self);
 AttachToBone(Bottom_Balst, 'bottom_emitter');

 Left_Balst = Spawn(class'Blast_LEFT',self);
 AttachToBone(Left_Balst, 'left_emitter');

 Right_Balst = Spawn(class'Blast_RIGHT',self);
 AttachToBone(Right_Balst, 'right_emitter');
}

simulated function Destroyed()
{
    if (Top_Balst != None)
        Top_Balst.Destroy();
    if (Bottom_Balst != None)
        Bottom_Balst.Destroy();
    if (Left_Balst != None)
        Left_Balst.Destroy();
    if (Right_Balst != None)
        Right_Balst.Destroy();
    if (Shield_Actor != None)
        Shield_Actor.Destroy();
}



simulated function Set_Mode(M_Shield_Gun_Mode Next_Mode)
{
 // go to regular mode
 if (Next_Mode == M_Idle)
  {
   Next_Idle_Anim = 'IDLE_REG';
   if (SG_Mode == M_Shield)
      PlayAnim('ALT_1_REG', 2);
   else if (SG_Mode == M_Push)
      PlayAnim('ALT_2_REG', 2);
   else if (SG_Mode == M_Charging)
      PlayAnim('IDLE_REG', 1);

   AmbientSound = none;
   SoundVolume = 255;
  }
 // open regular shield
 else if (Next_Mode == M_Shield)
  {
   Next_Idle_Anim = 'IDLE_ALT_1';
   if (SG_Mode == M_Idle)
      PlayAnim('REG_ALT_1', 2);
   else if (SG_Mode == M_Push)
      PlayAnim('ALT_2_ALT_1', 2);
   else if (SG_Mode == M_Charging)
      PlayAnim('REG_ALT_1', 2);
  }
 // start charging
 else if (Next_Mode == M_Charging)
  {
   Next_Idle_Anim = 'IDLE_REG';
   if (SG_Mode == M_Shield)
      PlayAnim('ALT_1_REG', 2);
   else if (SG_Mode == M_Push)
      PlayAnim('ALT_2_REG', 2);
   else if (SG_Mode == M_Charging)
      PlayAnim('IDLE_REG', 2);
  }
 // start pushing
 else if (Next_Mode == M_Push)
  {
   Next_Idle_Anim = 'IDLE_ALT_2';
   if (SG_Mode == M_Idle)
      PlayAnim('REG_ALT_2', 2);
   else if (SG_Mode == M_Shield)
      PlayAnim('ALT_1_ALT_2', 2);
   else if (SG_Mode == M_Charging)
      PlayAnim('REG_ALT_2', 2);
  }
 Ready = false;
 SG_Mode = Next_Mode;
}


simulated function AnimEnd(int channel)
{
  if ((SG_Mode == M_Idle) && (Stored_Energy > 0))
     Blast();
  else
    {
     LoopAnim(Next_Idle_Anim);
     Ready = true;
    }
}

simulated function Spawn_Blasts()
{
   Top_Balst.Emitters[0].SpawnParticle(1);
   Bottom_Balst.Emitters[0].SpawnParticle(1);
   Left_Balst.Emitters[0].SpawnParticle(1);
   Right_Balst.Emitters[0].SpawnParticle(1);

   Blasts_Left = Blasts_Left - 1;
   Next_Blast_Time = Level.TimeSeconds + Blasts_Interval;
}

simulated function Push()
{
 local vector TraceStart, TraceEnd;
 local vector HitLocation, HitNormal;
 local rotator TraceDirection;
 local Actor WorldContact, Victim;
 local float VDist, VDistK;
 local float Momentum, SDamK;
 local int pj;
 local bool pjinlist;

 TraceStart = Pawn(Owner).Location;
 TraceDirection = Pawn(Owner).GetViewRotation();
 if (PlayerController(Pawn(Owner).Controller).bBehindView == true)
    TraceDirection.Pitch = 0;
 TraceEnd = TraceStart + vector(TraceDirection)*256;

 if (Energy > 0)
 {
  ForEach RadiusActors(class'Actor', Victim, 256, TraceEnd )
  {
   VDist = Max(0,(VSize(Victim.Location - TraceStart) - Victim.CollisionRadius));
   VDistK = 1 - VDist/BlastRange;

   if ((VDistK > 0) && (VSize(Victim.Location - TraceEnd) < (256-VSize(Victim.Location - TraceStart)*0.75)))
   {
    Momentum = BlastMomentumK*50*VDistK;

    if (Victim.IsA('Projectile') == true)
     {
      pjinlist = false;
      for (pj=0; pj<Projectiles.Length; pj++)
       {
         if (Projectiles[pj] == Victim)
           pjinlist = true;
       }
      if (pjinlist == false)
       {
        Projectiles[Projectiles.Length] = Projectile(Victim);
        Velocities[Projectiles.Length] = VSize(Victim.Velocity);
        PlaySound(ShieldOffSound,,255,,256);
       }
     }
    else if ((Victim != Owner) && (Victim != self))
      Victim.TakeDamage(0, Pawn(Owner), Victim.Location, Momentum*vector(TraceDirection), Class'XWeapons.DamTypeShieldImpact');
   }
  }

 // self propelling
 TraceEnd = TraceStart + vector(TraceDirection)*BlastRange;
 WorldContact = Trace(HitLocation,HitNormal,TraceEnd,TraceStart, false);
 SDamK = float(Max(0, int(float(BlastRange) - VSize(HitLocation - TraceStart))))/float(BlastRange);

 Energy = Energy - 1;
 if (WorldContact.bWorldGeometry == true)
  {
    Momentum = SDamK*BlastMomentumK*16;
    Pawn(Owner).TakeDamage(0, Pawn(Owner), Pawn(Owner).Location, -Momentum*vector(TraceDirection), Class'XWeapons.DamTypeShieldImpact');
    Energy = Energy - 1;
    if (Energy <= 0)
      Exosted = true;
  }
 Blasts_Left = Blasts_Left + 1;
 Blasts_Interval = 0.01;
}
else
 AmbientSound = none;

for (pj=0; pj<Projectiles.Length; pj++)
 {
  Projectiles[pj].Velocity = Projectiles[pj].Velocity + 1000*Vector(TraceDirection);
  Projectiles[pj].SetRotation(Rotator(Projectiles[pj].Velocity));
  Energy = Energy - Projectiles[pj].Damage/10;
  if ((VSize(Projectiles[pj].Velocity) >= Velocities[pj]) || (VSize(Projectiles[pj].Location - TraceStart) > BlastRange))
   {
    Projectiles.Remove(pj, 1);
    Velocities.Remove(pj, 1);
    pj = pj - 1;
   }
 }
}

simulated function Blast()
{
 local vector TraceStart, TraceEnd;
 local vector HitLocation, HitNormal;
 local rotator TraceDirection;
 local Actor WorldContact, Victim;
 local float VDist, VDistK;
 local float Damage, Momentum, SDamK;

 TraceStart = Pawn(Owner).Location;
 TraceDirection = Pawn(Owner).GetViewRotation();
 if (PlayerController(Pawn(Owner).Controller).bBehindView == true)
    TraceDirection.Pitch = 0;
 TraceEnd = TraceStart + vector(TraceDirection)*256;

 WorldContact = Trace(HitLocation,HitNormal,TraceEnd,TraceStart);

 ForEach RadiusActors(class'Actor', Victim, 256, TraceEnd )
 {
  VDist = Max(0,(VSize(Victim.Location - TraceStart) - Victim.CollisionRadius));
  VDistK = 1 - VDist/BlastRange;

  if ((VDistK > 0) && (VSize(Victim.Location - TraceEnd) < (256-VSize(Victim.Location - TraceStart)*0.75)))
  {
   Damage = BlastDamageK*(20+Stored_Energy)*VDistK;
   Momentum = BlastMomentumK*Stored_Energy*VDistK;

   if (Victim.IsA('Projectile') == true)
     Projectile(Victim).ProcessTouch(Owner, Victim.Location);

   if ((Victim != Owner) && (Victim != self))
     Victim.TakeDamage(Damage, Pawn(Owner), Victim.Location, Momentum*vector(TraceDirection), Class'XWeapons.DamTypeShieldImpact');
  }
 }

 // self damaging
 TraceEnd = TraceStart + vector(TraceDirection)*BlastRange;
 WorldContact = Trace(HitLocation,HitNormal,TraceEnd,TraceStart, false);
 SDamK = float(Max(0, int(float(BlastRange) - VSize(HitLocation - TraceStart))))/float(BlastRange);

 if (Pawn(Owner).Physics == Phys_Walking)
 {
    if ((WorldContact.bWorldGeometry == true) && (Stored_Energy > 5))
    {
     Momentum = BlastMomentumK*Stored_Energy;
     if (Stored_Energy > 20)
       Damage = SDamK*BlastDamageK*(Stored_Energy)*0.7;
     else
       Damage = 0;
     Pawn(Owner).TakeDamage(Damage, Pawn(Owner), Pawn(Owner).Location, -Momentum*vector(TraceDirection), Class'XWeapons.DamTypeShieldImpact');
    }
 }
 else if (WorldContact.bWorldGeometry == true)
  {
   Momentum = BlastMomentumK*Stored_Energy;
   if (Stored_Energy > 20)
     Damage = BlastDamageK*(Stored_Energy)*0.35;
   else
     Damage = 0;
   Pawn(Owner).TakeDamage(Damage, Pawn(Owner), Pawn(Owner).Location, -Momentum*vector(TraceDirection), Class'XWeapons.DamTypeShieldImpact');
  }

 Blasts_Left = 2 + Stored_Energy/10;
 Blasts_Interval = 0.01 / Blasts_Left;
 PlaySound(BlastSound,,(50+Stored_Energy*2)/255,,256);
 if (WorldContact.bWorldGeometry == true)
  PlayAnim('REG_BLAST_CHARGED', 1);
 else
  PlayAnim('REG_BLAST', 1);
 Stored_Energy = 0;
}

simulated function BringUp(optional Weapon PrevWeapon)
{
 Active = true;
 Super.BringUp(PrevWeapon);
}

simulated function bool PutDown()
{
 Active = false;
 return Super.PutDown();
}

simulated function Process_Input()
{
  local M_Shield_Gun_Mode Chosen_Mode;

  Chosen_Mode = M_Idle;

  if (Pawn(Owner).Controller.bFire == 0)
  {
   if (Pawn(Owner).Controller.bAltFire == 0)
     Chosen_Mode = M_Idle;
   else
     Chosen_Mode = M_Shield;
  }
  else
  {
   if (Pawn(Owner).Controller.bAltFire == 0)
     Chosen_Mode = M_Charging;
   else
     Chosen_Mode = M_Push;
  }

  if ((SG_Mode != Chosen_Mode) && (Ready == true))
     Set_Mode(Chosen_Mode);
}



simulated function Process_Energy_Recover()
{
  if (SG_Mode == M_Charging)
   {
     if (Stored_Energy < Max_Stored_Energy)
      {
       Stored_Energy = Stored_Energy + Recovery_Rate;
       if (Stored_Energy >= Max_Stored_Energy)
         PlaySound(FullSound,,0.5,,256);
      }
     else if (Energy < Max_Energy)
      {
       Energy = Energy + Recovery_Rate;
       if (Energy > 25)
         Exosted = false;
      }

     if ((Stored_Energy > 3) && (Ready == true) && (AmbientSound != ChargingSound))
      {
       PlaySound(ClickSound,,0.1,,256);
       AmbientSound = ChargingSound;
      }
     SoundVolume = 50 + Stored_Energy*2;
     SoundPitch = 48 + Stored_Energy/2;
   }
  else
  {
   if (SG_Mode == M_Push)
   {
    if ((Ready == true) && (Exosted == false))
     {
      if ((AmbientSound != PushSound) &&  (Energy > 0))
       {
        AmbientSound = PushSound;
        SoundVolume = 164;
        SoundPitch = 64;
       }
       Push();
     }
    else
      AmbientSound = none;
   }

   if (Energy < Max_Energy)
    {
      Energy = Energy + Recovery_Rate;
      if (Energy > 25)
        Exosted = false;
    }
  }
  LCD_T.Revision++;
  Next_Recover_Time = Level.TimeSeconds + Recovery_Interval;
}


simulated function Tick(float dt)
{
 if (Active == true)
 {
  Process_Input();

  if (Ready != true)
   {
    AmbientSound = none;
    if (Shield_Actor != None)
      Shield_Actor.Destroy();
   }
  else if (SG_Mode == M_Shield)
   ShieldProcess();

  if (Next_Recover_Time < Level.TimeSeconds)
   Process_Energy_Recover();

  if ((Next_Blast_Time < Level.TimeSeconds) && (Blasts_Left > 0))
   Spawn_Blasts();
 }

 Super.Tick(dt);
}

simulated function ShieldProcess()
{
 local vector ShieldLocation;
 local rotator ShieldRotation;

 if ((Shield_Actor == none) && (Energy > 0) && (Exosted != true))
 {
  Shield_Actor = Spawn(class'SHIELD',self);
  Shield_Actor.SG = self;
  PlaySound(ShieldOffSound,,255,,256);
 }

 if (Energy <= 0)
  {
   Exosted = true;
   if (Shield_Actor != None)
    Shield_Actor.Destroy();
  }

 ShieldRotation = Pawn(Owner).GetViewRotation();
 ShieldLocation = Owner.Location + Vector(ShieldRotation)*16;
 if ((PlayerController(Pawn(Owner).Controller).bBehindView != true) || (Pawn(Owner).Controller.IsA('Bot')))
  ShieldLocation.Z = ShieldLocation.Z + Pawn(Owner).EyeHeight;
 Shield_Actor.SetLocation(ShieldLocation);
 Shield_Actor.SetRotation(ShieldRotation);
}

simulated event RenderTexture(ScriptedTexture Tex)
{
  local Color DrawColor;
  local vector TraceStart, TraceEnd;
  local Actor WorldContact;

   if (SG_Mode == M_Charging)
   {
    DrawColor.A = 255;
    DrawColor.B = 0;
    DrawColor.R = 255*Stored_Energy/Max_Stored_Energy;
    DrawColor.G = 255-DrawColor.R;

    TraceStart = Pawn(Owner).Location;
    TraceEnd = TraceStart + vector(Pawn(Owner).GetViewRotation())*128;
    WorldContact = Trace(TraceEnd,TraceStart,TraceEnd,TraceStart);

    if ((WorldContact != none) && (WorldContact.bWorldGeometry == true))
     LCD_T.DrawTile(8,8,48,48,192,128,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);

    if (Stored_Energy > 0)
    {
     if (Stored_Energy < 10)
        LCD_T.DrawTile(8,8,48,48,64,128,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     if (Stored_Energy < 20)
        LCD_T.DrawTile(8,8,48,48,0,128,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 30)
        LCD_T.DrawTile(8,8,48,48,192,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 40)
        LCD_T.DrawTile(8,8,48,48,128,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 60)
        LCD_T.DrawTile(8,8,48,48,64,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 70)
        LCD_T.DrawTile(8,8,48,48,0,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 80)
        LCD_T.DrawTile(8,8,48,48,192,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 90)
        LCD_T.DrawTile(8,8,48,48,128,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Stored_Energy < 100)
        LCD_T.DrawTile(8,8,48,48,64,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else
        LCD_T.DrawTile(8,8,48,48,0,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
    }
   }
  else if ((SG_Mode != M_Idle) || (Energy < Max_Energy))
   {
    DrawColor.A = 255;
    DrawColor.B = 0;
    DrawColor.G =   Max(0, Int(255*Energy/Max_Energy));
    DrawColor.R = Max(0, 255-DrawColor.G);

    if (Energy > 0)
    {
     if (Energy < 10)
        LCD_T.DrawTile(8,8,48,48,64,128,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     if (Energy < 20)
        LCD_T.DrawTile(8,8,48,48,0,128,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 30)
        LCD_T.DrawTile(8,8,48,48,192,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 40)
        LCD_T.DrawTile(8,8,48,48,128,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 60)
        LCD_T.DrawTile(8,8,48,48,64,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 70)
        LCD_T.DrawTile(8,8,48,48,0,64,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 80)
        LCD_T.DrawTile(8,8,48,48,192,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 90)
        LCD_T.DrawTile(8,8,48,48,128,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else if (Energy < 100)
        LCD_T.DrawTile(8,8,48,48,64,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
     else
        LCD_T.DrawTile(8,8,48,48,0,0,64,64,Texture'AS_FX_TX.HUD.OBJ_Status',DrawColor);
    }
   }
}

simulated function GetFireCoords(optional out vector Fire_Location, optional out rotator Fire_Rotation)
{
 local vector flux_start, flux_end;

 flux_start = (GetBoneCoords('top_emitter').Origin + GetBoneCoords('bottom_emitter').Origin + GetBoneCoords('left_emitter').Origin + GetBoneCoords('right_emitter').Origin)/4;
 flux_end = (GetBoneCoords('top_diffusor').Origin + GetBoneCoords('bottom_diffusor').Origin + GetBoneCoords('left_diffusor').Origin + GetBoneCoords('right_diffusor').Origin)/4;

 Fire_Location = flux_end;
 Fire_Rotation = Rotator(flux_end - flux_start);
}

simulated event RenderOverlays( Canvas Canvas )
{
 if (Hand != 0)
 {
  Canvas.SetPos(Canvas.ClipX/2-32, Canvas.ClipY/2-32);
  Canvas.DrawTile(HUD_Add,64,64,0,0,64,64);
 }

 Super.RenderOverlays(Canvas);
}

function DropFrom(vector StartLocation)
{
    local int m;
	local Actor Pickup;

    ClientWeaponThrown();

    for (m = 0; m < NUM_FIRE_MODES; m++)
    {
        if (FireMode[m].bIsFiring)
            StopFire(m);
    }

	if ( Instigator != None )
      DetachFromPawn(Instigator);

     if ((Instigator.Health > 0) && (self.SG_Mode != M_Idle))
      {
       Pickup = Spawn(Class'SHIELD_2016.TRAP_SHIELD_PICKUP',,, StartLocation, Pawn(Owner).GetViewRotation());
   	   if ( Pickup != None )
   	   {
        if (SG_Mode == M_Shield)
 	      TRAP_SHIELD_PICKUP(Pickup).TSP_Mode = P_Shield;
 	    else if (SG_Mode == M_Charging)
 	     {
 	      TRAP_SHIELD_PICKUP(Pickup).TSP_Mode = P_Charging;
          Pickup.AmbientSound = ChargingSound;
          Pickup.SoundVolume = 50 + Stored_Energy*2;
          Pickup.SoundPitch = 48 + Stored_Energy/2;
 	     }
 	    else if (SG_Mode == M_Push)
 	     {
 	      TRAP_SHIELD_PICKUP(Pickup).TSP_Mode = P_Push;
          Pickup.AmbientSound = PushSound;
          Pickup.SoundVolume = 164;
          Pickup.SoundPitch = 64;
 	     }

	    TRAP_SHIELD_PICKUP(Pickup).Master = Pawn(Owner);
        TRAP_SHIELD_PICKUP(Pickup).Energy = Energy;
        TRAP_SHIELD_PICKUP(Pickup).Stored_Energy = Stored_Energy;
        Pickup.Velocity = Vector(Rotation)*1000;
       }
      }
     else
      {
	   Pickup = Spawn(PickupClass,,, StartLocation, Rotator(-Vector(Pawn(Owner).GetViewRotation())));
   	   if ( Pickup != None )
   	   {
	    Pickup(Pickup).InitDroppedPickupFor(self);
	    if (Instigator.Health > 0)
	      Pickup.Velocity = Vector(Rotation)*1000;
	    else
          Pickup.Velocity = -10*vector(Rotation)*Stored_Energy;
       }
      }

    if (Top_Balst != None)
        Top_Balst.Destroy();
    if (Bottom_Balst != None)
        Bottom_Balst.Destroy();
    if (Left_Balst != None)
        Left_Balst.Destroy();
    if (Right_Balst != None)
        Right_Balst.Destroy();
    if (Shield_Actor != None)
        Shield_Actor.Destroy();

    Destroy();
}

DefaultProperties
{
     FireModeClass(0)=Class'SHIELD_2016.PRIMARY_FIRE'
     FireModeClass(1)=Class'SHIELD_2016.SECONDARY_FIRE'
     ItemName="Force Shield Gun"
     Description="Industrial grade force field manipulator"
     InventoryGroup=1
     Mesh=SkeletalMesh'SHIELD_2016_ANI.SHIELD_GUN'
     DrawScale=0.400000
     DisplayFOV=60.000000
     HighDetailOverlay=Combiner'SHIELD_2016_TX.SEP_SPEC'
     SmallViewOffset=(X=25.0,Y=12.0,Z=-7.0)
     PlayerViewOffset=(X=20.0,Y=10.0,Z=-7.0)
     PlayerViewPivot=(Pitch=2000,Yaw=0,Roll=0)
     CenteredOffsetY=0.000000
     IconMaterial=Texture'HUDContent.Generic.HUD'
     IconCoords=(X1=169,Y1=39,X2=241,Y2=77)
     SelectAnim="SELECT_IT"
     PutDownAnim="PUT_DOWN"
     PickupClass=Class'SHIELD_2016.SHIELD_PICKUP'
     AttachmentClass=Class'SHIELD_2016.ATTACHMENT'
     Next_Idle_Anim = IDLE_REG
     Energy = 100
     Max_Energy = 100
     Max_Stored_Energy = 100
     Recovery_Rate = 1
     Recovery_Interval = 0.035
     BlastRange = 128
     BlastDamageK = 2
     BlastMomentumK = 2000
     Blasts_Interval = 0.01
     PushSound=Sound'IndoorAmbience.machinery18'
     ChargingSound=Sound'ONSVehicleSounds-S.RV.RVChargeLoop01'
     BlastSound=ProceduralSound'WeaponSounds.PShieldGunFire.P1ShieldGunFire'
     SoundRadius = 256
     SelectSound=Sound'WeaponSounds.Misc.ballgun_change'
     Fullsound=Sound'AssaultSounds.HumanShip.HnShipFireReadyl01'
     ClickSound=Sound'NewWeaponSounds.Newclickgrenade'
     ShieldOffSound=Sound'ONSBPSounds.ShockTank.ShieldOff'
     Active = false;
}
