src/npf.cpp
changeset 7922 a7e266f966d9
parent 7764 e594296e90f6
child 7928 63e18de69e50
equal deleted inserted replaced
7921:3437fdd5c0a8 7922:a7e266f966d9
   102 	uint x;
   102 	uint x;
   103 	uint y;
   103 	uint y;
   104 
   104 
   105 	/* we are going the aim for the x coordinate of the closest corner
   105 	/* we are going the aim for the x coordinate of the closest corner
   106 	 * but if we are between those coordinates, we will aim for our own x coordinate */
   106 	 * but if we are between those coordinates, we will aim for our own x coordinate */
   107 	x = clamp(TileX(tile), minx, maxx);
   107 	x = Clamp(TileX(tile), minx, maxx);
   108 
   108 
   109 	/* same for y coordinate, see above comment */
   109 	/* same for y coordinate, see above comment */
   110 	y = clamp(TileY(tile), miny, maxy);
   110 	y = Clamp(TileY(tile), miny, maxy);
   111 
   111 
   112 	/* return the tile of our target coordinates */
   112 	/* return the tile of our target coordinates */
   113 	return TileXY(x, y);
   113 	return TileXY(x, y);
   114 }
   114 }
   115 
   115