[Freeciv-Dev] Re: (PR#4338) cm4 sanitycheck
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 1 Jun 2003, ChrisK@xxxxxxxx wrote:
> Problem is, when a city is conquered, the units are wiped, but not the units
> transported by them.
...
> Problem seems to be in transfer_city(), but a fix is beyond my capabilities.
I'm afraid this is my fault. I cleaned up some very bad code which some
other very bad code relied on working in a not specified way. I'm working
on a general cleanup of all this code, but I am waiting for Vasco's safe
list node deletion patch since that will make everything cleaner.
Try this in the meantime:
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.218
diff -u -r1.218 citytools.c
--- server/citytools.c 6 May 2003 05:06:07 -0000 1.218
+++ server/citytools.c 1 Jun 2003 10:42:26 -0000
@@ -672,7 +672,7 @@
no cargo deletion => no trouble with "units" list.
In cases where the cargo can be left without transport the calling
function should take that into account. */
- wipe_unit_spec_safe(vunit, NULL, FALSE);
+ wipe_unit_spec_safe(vunit, &myiter, TRUE);
} unit_list_iterate_end;
}
We might delete perfectly safe cargo for cases like Civil War, but at
least cores should be avoided.
- Per
|
|