Make AI switch to amNothing before trying to walk if it holds weapon which needs targeting (not tested)
--- a/hedgewars/uAI.pas Fri Apr 15 22:38:50 2011 +0400
+++ b/hedgewars/uAI.pas Sat Apr 16 23:21:15 2011 +0400
@@ -208,6 +208,9 @@
BestRate:= RatePlace(Me);
BaseRate:= Max(BestRate, 0);
+if (Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then
+ AddAction(Actions, aia_Weapon, Longword(amNothing), 100 + random(200), 0, 0);
+
while (Stack.Count > 0) and (not StopThinking) and (GameFlags and gfArtillery = 0) do
begin
Pop(ticks, Actions, Me^);