
// This cycles between Regular, EMP, Incendiary, and Concussion Projectiles
function Player::WCS(%Player, %Direction)
{
   // If not moving backwards, then move forward
   if (%Direction != -1)
      %Direction = 1;

   // If the weapon doesn't support the WCS, then abort now
   %Weapon = %Player.getMountedImage($WeaponSlot);
   if (%Weapon.WCS != true)
   {
      messageClient(%Player.client, '', "The Weapons Control System is unable to alter the firing pattern of this weapon.");
      return;
   }

   // If the Weapon just changes the firing pattern, load the weapon
   // specific code now.
   if (%Weapon.WCSFirePattern == true)
   {
      %Weapon.WCS(%Player, %Direction);
      return;
   }

   if (%Direction == 1)
   {
      switch$ (%Player.WCSProjectile)
      {
         case "EMP" :
            if (%Player.InWater != true)
               %Player.WCSProjectile = "Incendiary";
            else
               %Player.WCSProjectile = "Concussion";

         case "Incendiary" :
            %Player.WCSProjectile = "Concussion";

         case "Concussion" :
            %Player.WCSProjectile = "";

         default :
            %Player.WCSProjectile = "EMP";         
      }
   } else {
      switch$ (%Player.WCSProjectile)
      {
         case "EMP" :
            %Player.WCSProjectile = "";

         case "Incendiary" :
            %Player.WCSProjectile = "EMP";

         case "Concussion" :
            if (%Player.InWater != true)
               %Player.WCSProjectile = "Incendiary";
            else
               %Player.WCSProjectile = "EMP";

         default :
            %Player.WCSProjectile = "Concussion";         
      }
   }

   %Client = %Player.client;

   // Display help relating to currently selected Projectile
   if (%Client.HelpSchedule !$= "")
      Cancel(%Client.HelpSchedule);

   if (%Player.WCSProjectile $= "")
       %Message = $HelpDesc["DefaultProjectile"];
   else
      %Message = $HelpDesc[%Player.WCSProjectile];

   %Lines = 1;

   bottomPrint(%Client, %Message, 10, %Lines);
      
   %Client.HelpSchedule = schedule(%Lines * 6000, %Client, clearBottomPrint, %Client);
}