hedgewars/uGears.pas
changeset 13569 7d2e2a5d4bff
parent 13345 e54d6db06f35
child 13570 5190d41a2440
equal deleted inserted replaced
13568:470982c05f7e 13569:7d2e2a5d4bff
   669     else
   669     else
   670         begin
   670         begin
   671         rx:= leftX+GetRandom(rightX-leftX+400)-200;
   671         rx:= leftX+GetRandom(rightX-leftX+400)-200;
   672         ry:= topY+GetRandom(LAND_HEIGHT-topY+400)-200
   672         ry:= topY+GetRandom(LAND_HEIGHT-topY+400)-200
   673         end;
   673         end;
   674     Gear^.X:= int2hwFloat(rx);
   674     Gear^.X:= int2hwFloat(CalcWorldWrap(rx,Gear^.Radius));
   675     Gear^.Y:= int2hwFloat(ry);
   675     Gear^.Y:= int2hwFloat(ry);
   676     if CheckLandValue(rx, ry, $FFFF) and
   676     if CheckLandValue(rx, ry, $FFFF) and
   677        (TestCollisionYwithGear(Gear,-1) = 0) and
   677        (TestCollisionYwithGear(Gear,-1) = 0) and
   678        (TestCollisionXwithGear(Gear, 1) = 0) and
   678        (TestCollisionXwithGear(Gear, 1) = 0) and
   679        (TestCollisionXwithGear(Gear,-1) = 0) and
   679        (TestCollisionXwithGear(Gear,-1) = 0) and