hedgewars/uGearsUtils.pas
changeset 9489 0818d14e90be
parent 9485 3dee8a3b0406
child 9521 8054d9d775fd
child 9522 a386e1cdc468
equal deleted inserted replaced
9487:fbe203c1d11e 9489:0818d14e90be
  1219 *)
  1219 *)
  1220 function WorldWrap(var Gear: PGear): boolean;
  1220 function WorldWrap(var Gear: PGear): boolean;
  1221 var tdx: hwFloat;
  1221 var tdx: hwFloat;
  1222 begin
  1222 begin
  1223 WorldWrap:= false;
  1223 WorldWrap:= false;
  1224 // for playing around since it isn't hooked up yet
       
  1225 //WorldEdge:= weBounce;
       
  1226 if WorldEdge = weNone then exit(false);
  1224 if WorldEdge = weNone then exit(false);
  1227 if (hwRound(Gear^.X)-Gear^.Radius < leftX) or
  1225 if (hwRound(Gear^.X)-Gear^.Radius < leftX) or
  1228    (hwRound(Gear^.X)+Gear^.Radius > rightX) then
  1226    (hwRound(Gear^.X)+Gear^.Radius > rightX) then
  1229     begin
  1227     begin
  1230     if WorldEdge = weWrap then
  1228     if WorldEdge = weWrap then