hedgewars/GSHandlers.inc
changeset 5896 9ce1cf4e5a32
parent 5893 368669bf6cb3
child 5913 1791f776b726
equal deleted inserted replaced
5895:212d3b459658 5896:9ce1cf4e5a32
  4207 
  4207 
  4208     if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] > 255) then
  4208     if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] > 255) then
  4209     begin
  4209     begin
  4210         Gear^.State := Gear^.State or gstCollision;
  4210         Gear^.State := Gear^.State or gstCollision;
  4211         Gear^.State := Gear^.State and not gstMoving;
  4211         Gear^.State := Gear^.State and not gstMoving;
  4212         if not calcSlopeTangent(Gear, x, y, tx, ty, 255)
  4212         if not CalcSlopeTangent(Gear, x, y, tx, ty, 255)
  4213            or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain
  4213            or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain
  4214         begin
  4214         begin
  4215             loadNewPortalBall(Gear, true);
  4215             loadNewPortalBall(Gear, true);
  4216             EXIT;
  4216             EXIT;
  4217         end;
  4217         end;