# HG changeset patch # User unc0rr # Date 1402432523 -14400 # Node ID 07adc8b6288c8c7b5a7604c353d0e0eff7b6241d # Parent 99032c5be7bad8b5a4dc97b7d756db2fd58458b3 Fallback to old heuristic if not pit position diff -r 99032c5be7ba -r 07adc8b6288c hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Tue Jun 10 22:35:44 2014 +0200 +++ b/hedgewars/uGearsUtils.pas Wed Jun 11 00:35:23 2014 +0400 @@ -654,7 +654,9 @@ if (y - sy > Gear^.Radius * 2) and (y < cWaterLine) and (((Gear^.Kind = gtExplosives) and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 60, 60)) - and (isSteadyPosition(x, y+1, Gear^.Radius - 1, 3, $FFFF))) + and (isSteadyPosition(x, y+1, Gear^.Radius - 1, 3, $FFFF) + or (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1, $FFFF) > Gear^.Radius) + )) or ((Gear^.Kind <> gtExplosives) and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 110, 110))