hedgewars/uGearsUtils.pas
changeset 13318 9071600f7b22
parent 13148 ec165591a1ee
child 13381 caed04706564
child 13550 d42237d16acf
equal deleted inserted replaced
13317:ab3fe9f302d5 13318:9071600f7b22
  1634 WorldWrap:= false;
  1634 WorldWrap:= false;
  1635 if WorldEdge = weNone then exit(false);
  1635 if WorldEdge = weNone then exit(false);
  1636 if (hwRound(Gear^.X) < LongInt(leftX)) or
  1636 if (hwRound(Gear^.X) < LongInt(leftX)) or
  1637    (hwRound(Gear^.X) > LongInt(rightX)) then
  1637    (hwRound(Gear^.X) > LongInt(rightX)) then
  1638     begin
  1638     begin
  1639     // bullets can now hurt the hog that fired them
       
  1640     if (WorldEdge <> weSea) and (Gear^.Kind in [gtDEagleShot, gtSniperRifleShot, gtMinigunBullet]) then
       
  1641         Gear^.Data:= nil;
       
  1642     if WorldEdge = weWrap then
  1639     if WorldEdge = weWrap then
  1643         begin
  1640         begin
  1644         if (hwRound(Gear^.X) < LongInt(leftX)) then
  1641         if (hwRound(Gear^.X) < LongInt(leftX)) then
  1645              Gear^.X:= Gear^.X + int2hwfloat(rightX - leftX)
  1642              Gear^.X:= Gear^.X + int2hwfloat(rightX - leftX)
  1646         else Gear^.X:= Gear^.X - int2hwfloat(rightX - leftX);
  1643         else Gear^.X:= Gear^.X - int2hwfloat(rightX - leftX);