[Freeciv-Dev] (PR#13539) Fix AI tile effect miscalculation
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13539 >
I don't think the problem is in the cache. The attached patch adds an
assertion to check the cache validity, and this assertion never fails.
-jason
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.358
diff -p -u -r1.358 city.c
--- common/city.c 24 Jul 2005 17:01:35 -0000 1.358
+++ common/city.c 25 Jul 2005 21:43:45 -0000
@@ -1537,6 +1537,9 @@ static inline void get_worked_tile_outpu
city_map_iterate(x, y) {
if (pcity->city_map[x][y] == C_TILE_WORKER) {
output_type_iterate(o) {
+ assert(pcity->tile_output[x][y][o]
+ == base_city_get_output_tile(x, y, pcity,
+ base_city_celebrating(pcity), o));
output[o] += pcity->tile_output[x][y][o];
} output_type_iterate_end;
}
|
|