diff -r 92cff18a3ab6 -r 9b9144948668 hedgewars/uAIActions.pas --- 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