Prevent AI to damage a teammate when trying to dig with firepunch (patch not tested)
--- a/hedgewars/uAIAmmoTests.pas Sun Sep 28 22:39:07 2008 +0000
+++ b/hedgewars/uAIAmmoTests.pas Sun Sep 28 22:47:13 2008 +0000
@@ -364,7 +364,8 @@
if (Abs(hwRound(Me^.X) - Targ.X) > 25)
or (Abs(hwRound(Me^.Y) - 50 - Targ.Y) > 50) then
begin
- if TestColl(hwRound(Me^.Y), hwRound(Me^.Y) - 16, 6) then
+ if TestColl(hwRound(Me^.Y), hwRound(Me^.Y) - 16, 6)
+ and (RateShove(Me, hwRound(Me^.X) + 10 * hwSign(Me^.dX), hwRound(Me^.Y) - 40, 30, 30) = 0) then
Result:= Succ(BadTurn)
else
Result:= BadTurn;