[Freeciv-Dev] (PR#12157) Engineers autooperates on glacier tiles.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12157 >
Seems warmap doesn't know about dangerous tiles. Naturally. This patch
provides a simple workaround that should work...I think. Please test.
-jason
? gmon.out
Index: server/settlers.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/settlers.c,v
retrieving revision 1.219
diff -u -r1.219 settlers.c
--- server/settlers.c 7 Jan 2005 02:56:28 -0000 1.219
+++ server/settlers.c 10 Feb 2005 21:14:45 -0000
@@ -892,8 +892,11 @@
#endif
/* try to work near the city */
city_map_checked_iterate(pcity->tile, i, j, ptile) {
- if (get_worker_city(pcity, i, j) == C_TILE_UNAVAILABLE)
+ if (get_worker_city(pcity, i, j) == C_TILE_UNAVAILABLE
+ || terrain_has_flag(pcity->tile->terrain, TER_UNSAFE)) {
+ /* Don't risk bothering with this tile. */
continue;
+ }
in_use = (get_worker_city(pcity, i, j) == C_TILE_WORKER);
if (map_get_continent(ptile) == ucont
&& WARMAP_COST(ptile) <= THRESHOLD * mv_rate
|
|