hedgewars/uAIActions.pas
changeset 165 9b9144948668
parent 144 e6084b0c9316
child 183 57c2ef19f719
--- a/hedgewars/uAIActions.pas	Sun Sep 24 19:51:16 2006 +0000
+++ b/hedgewars/uAIActions.pas	Sun Sep 24 21:32:18 2006 +0000
@@ -125,14 +125,6 @@
      end
 end;
 
-procedure SetWeapon(weap: Longword);
-begin
-with CurrentTeam^ do
-     with Hedgehogs[CurrHedgehog] do
-          while Ammo[CurSlot, CurAmmo].AmmoType <> TAmmoType(weap) do
-                ParseCommand('/slot ' + chr(49 + Ammoz[TAmmoType(weap)].Slot));
-end;
-
 procedure ProcessAction(var Actions: TActions; Me: PGear);
 var s: shortstring;
 begin
@@ -145,7 +137,7 @@
      {$ENDIF}
      if (Action and ai_specmask) <> 0 then
         case Action of
-           aia_Weapon: SetWeapon(Param);
+           aia_Weapon: SetWeapon(TAmmoType(Param));
             aia_WaitX: if round(Me.X) = Param then Time:= GameTicks
                                               else exit;
             aia_WaitY: if round(Me.Y) = Param then Time:= GameTicks