# HG changeset patch # User nemo # Date 1267583812 0 # Node ID 7db64c269a5b864dd547ab512365b41f26a1557c # Parent 865ae941d59eede04690f7715a481252498ffd04 Ensure explosives are spawned somewhere w/ plenty of ground under them diff -r 865ae941d59e -r 7db64c269a5b hedgewars/uGears.pas --- a/hedgewars/uGears.pas Tue Mar 02 19:50:58 2010 +0000 +++ b/hedgewars/uGears.pas Wed Mar 03 02:36:52 2010 +0000 @@ -2120,9 +2120,11 @@ inc(y); until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0); +// Flag the check for gtExplosives for reuse by other things that need a solid platform? if (y - sy > Gear^.Radius * 2) - and (y < LAND_HEIGHT) - and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil) then + and (((Gear^.Kind <> gtExplosives) and (y < LAND_HEIGHT)) or ((Gear^.Kind = gtExplosives) and (y < LAND_HEIGHT-1))) + and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil) + and ((Gear^.Kind <> gtExplosives) or (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) then begin ar[cnt].X:= x; if withFall then ar[cnt].Y:= sy + Gear^.Radius