765 if cAirMines > 0 then |
765 if cAirMines > 0 then |
766 Gear:= AddGear(0, 0, gtAirMine, 0, _0, _0, 0); |
766 Gear:= AddGear(0, 0, gtAirMine, 0, _0, _0, 0); |
767 while (i < cAirMines) and (j < 1000*cAirMines) do |
767 while (i < cAirMines) and (j < 1000*cAirMines) do |
768 begin |
768 begin |
769 p:= 0; |
769 p:= 0; |
|
770 if (hasBorder) or (WorldEdge = weBounce) then |
|
771 rx:= leftX+GetRandom(rightX-leftX-16)+8 |
|
772 else |
|
773 rx:= leftX+GetRandom(rightX-leftX+400)-200; |
770 if hasBorder then |
774 if hasBorder then |
771 begin |
|
772 rx:= leftX+GetRandom(rightX-leftX-16)+8; |
|
773 ry:= topY+GetRandom(LAND_HEIGHT-topY-16)+8 |
775 ry:= topY+GetRandom(LAND_HEIGHT-topY-16)+8 |
774 end |
|
775 else |
776 else |
776 begin |
777 ry:= topY+GetRandom(LAND_HEIGHT-topY+400)-200; |
777 rx:= leftX+GetRandom(rightX-leftX+400)-200; |
|
778 ry:= topY+GetRandom(LAND_HEIGHT-topY+400)-200 |
|
779 end; |
|
780 Gear^.X:= int2hwFloat(CalcWorldWrap(rx,Gear^.Radius)); |
778 Gear^.X:= int2hwFloat(CalcWorldWrap(rx,Gear^.Radius)); |
781 Gear^.Y:= int2hwFloat(ry); |
779 Gear^.Y:= int2hwFloat(ry); |
782 if CheckLandValue(rx, ry, $FFFF) and |
780 if CheckLandValue(rx, ry, $FFFF) and |
783 (TestCollisionYwithGear(Gear,-1) = 0) and |
781 (TestCollisionYwithGear(Gear,-1) = 0) and |
784 (TestCollisionXwithGear(Gear, 1) = 0) and |
782 (TestCollisionXwithGear(Gear, 1) = 0) and |