# HG changeset patch # User unC0Rr # Date 1599723041 -7200 # Node ID 94f4d0a96143e3103913fa0dbb58d6c1789484c3 # Parent 027a56b3895e61034c0d71201673d5294042a460 Prevent AI from getting stuck in attempt to look in another direction after choosing bee weapon diff -r 027a56b3895e -r 94f4d0a96143 hedgewars/uAI.pas --- a/hedgewars/uAI.pas Sun Sep 06 00:21:37 2020 +0300 +++ b/hedgewars/uAI.pas Thu Sep 10 09:30:41 2020 +0200 @@ -199,13 +199,13 @@ end; end; - AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0); - if (ap.Angle > 0) then AddAction(BestActions, aia_LookRight, 0, 200, 0, 0) else if (ap.Angle < 0) then AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0); + AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0); + if (Ammoz[a].Ammo.Propz and ammoprop_Timerable) <> 0 then AddAction(BestActions, aia_Timer, ap.Time div 1000, 400, 0, 0);