# HG changeset patch # User Wuzzy # Date 1594225154 -7200 # Node ID 0436ea41ece57622e241ff5ce565bc757d3b00e3 # Parent f8688e1bcc1385339fbc58c94e65819b98d69ae9 AI: Don't use airstrikes if negative gravity diff -r f8688e1bcc13 -r 0436ea41ece5 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Wed Jul 08 18:17:49 2020 +0200 +++ b/hedgewars/uAIAmmoTests.pas Wed Jul 08 18:19:14 2020 +0200 @@ -1432,7 +1432,7 @@ Flags:= Flags; // avoid compiler hint ap.ExplR:= 0; ap.Time:= 0; -if (Level > 3) or (aiGravityf = 0) then +if (Level > 3) or (aiGravityf <= 0) then exit(BadTurn); ap.Angle:= 0; @@ -1562,7 +1562,7 @@ begin Flags:= Flags; // avoid compiler hint ap.ExplR:= 0; -if (Level > 3) or (aiGravityf = 0) then +if (Level > 3) or (aiGravityf <= 0) then exit(BadTurn); ap.Angle:= 0; @@ -1723,7 +1723,7 @@ // so they are unsupported. // TODO: Implement mine strike for other values of MineTime // TODO: Teach AI to avoid hitting their own with mines -if (Level > 3) or (aiGravityf = 0) or (cMinesTime <> 0) then +if (Level > 3) or (aiGravityf <= 0) or (cMinesTime <> 0) then exit(BadTurn); ap.Angle:= 0;