578 begin |
578 begin |
579 repeat |
579 repeat |
580 inc(y, 2); |
580 inc(y, 2); |
581 until (y >= cWaterLine) or |
581 until (y >= cWaterLine) or |
582 (not ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FFFF) = 0)) or |
582 (not ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FFFF) = 0)) or |
583 (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FF00) = 0)); |
583 (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask) = 0)); |
584 |
584 |
585 sy:= y; |
585 sy:= y; |
586 |
586 |
587 repeat |
587 repeat |
588 inc(y); |
588 inc(y); |
589 until (y >= cWaterLine) or |
589 until (y >= cWaterLine) or |
590 (not ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FFFF) <> 0)) or |
590 (not ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FFFF) <> 0)) or |
591 (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, $FF00) <> 0)); |
591 (ignoreOverlap and (CountNonZeroz(x, y, Gear^.Radius - 1, 1, lfLandMask) <> 0)); |
592 |
592 |
593 if (y - sy > Gear^.Radius * 2) |
593 if (y - sy > Gear^.Radius * 2) |
594 and (((Gear^.Kind = gtExplosives) |
594 and (((Gear^.Kind = gtExplosives) |
595 and (y < cWaterLine) |
595 and (y < cWaterLine) |
596 and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 60, 60)) |
596 and (ignoreNearObjects or NoGearsToAvoid(x, y - Gear^.Radius, 60, 60)) |