Index: common/map.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/map.h,v retrieving revision 1.130 diff -u -r1.130 map.h --- common/map.h 2002/09/10 13:30:56 1.130 +++ common/map.h 2002/10/16 18:49:45 @@ -229,11 +229,13 @@ /* * Returns true if the step yields a new valid map position. If yes * (dest_x, dest_y) is set to the new map position. + * Also allows dest and src to be the same: + * MAPSTEP(x, y, x, y, dir) + * Direct calls to DIR_DXY should be avoided! -- Raimar */ #define MAPSTEP(dest_x, dest_y, src_x, src_y, dir) \ -( DIRSTEP(dest_x, dest_y, dir), \ - (dest_x) += (src_x), \ - (dest_y) += (src_y), \ +( (dest_x) = (src_x) + DIR_DX[(dir)], \ + (dest_y) = (src_y) + DIR_DY[(dir)], \ normalize_map_pos(&(dest_x), &(dest_y))) struct city *map_get_city(int x, int y);