[Freeciv-Dev] (PR#6285) rand_map_pos using native coordinates
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This simple patch rewrites rand_map_pos to use native coordinates. This
allows it to work with iso-maps.
jason
Index: common/map.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.c,v
retrieving revision 1.145
diff -u -r1.145 map.c
--- common/map.c 2003/09/25 20:55:01 1.145
+++ common/map.c 2003/09/25 21:02:58
@@ -1489,10 +1489,8 @@
**************************************************************************/
void rand_map_pos(int *x, int *y)
{
- do {
- *x = myrand(map.xsize);
- *y = myrand(map.ysize);
- } while (!is_normal_map_pos(*x, *y));
+ native_to_map_pos(x, y, myrand(map.xsize), myrand(map.ysize));
+ CHECK_MAP_POS(*x, *y);
}
/**************************************************************************
- [Freeciv-Dev] (PR#6285) rand_map_pos using native coordinates,
Jason Short <=
|
|