- Never consider a bot in inf attacks mode being in after attack mode, helps action in inf attack
authorunc0rr
Tue, 01 Jan 2019 02:22:01 +0100
changeset 14527 a4d560aeda96
parent 14526 ba29aa03db87
child 14528 184df3900ec4
- Never consider a bot in inf attacks mode being in after attack mode, helps action in inf attack - Also start thinking if TurnTimeLeft is bigger than default value
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Fri Dec 28 22:47:17 2018 +0100
+++ b/hedgewars/uAI.pas	Tue Jan 01 02:22:01 2019 +0100
@@ -544,7 +544,7 @@
     exit
     end;
 
-FillBonuses(((Me^.State and gstAttacked) <> 0) and (not isInMultiShoot));
+FillBonuses(((Me^.State and gstAttacked) <> 0) and (not isInMultiShoot) and ((GameFlags and gfInfAttack) = 0));
 
 SDL_LockMutex(ThreadLock);
 ThinkThread:= SDL_CreateThread(@Think, PChar('think'), Me);
@@ -561,7 +561,7 @@
 with CurrentHedgehog^ do
     if (Gear <> nil)
     and ((Gear^.State and gstHHDriven) <> 0)
-    and (TurnTimeLeft < cHedgehogTurnTime - 50) then
+    and ((TurnTimeLeft < cHedgehogTurnTime - 50) or (TurnTimeLeft > cHedgehogTurnTime)) then
         if ((Gear^.State and gstHHThinking) = 0) then
             if (BestActions.Pos >= BestActions.Count)
             and (TurnTimeLeft > cStopThinkTime) then