[Freeciv-Dev] Bug/Patch: Units in wrong city transfered after disband ci
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi!
I noticed that when a city is disbanded into settlers, all units
present in the city that becomes owner of the new unit are transfered
to that city. I don't thats the intention of iterating the list of
supported units in transfer_city_units().
Could somebody please apply this to the CVS?
Index: citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.102
diff -p -u -r1.102 citytools.c
--- citytools.c 2001/01/14 22:24:03 1.102
+++ citytools.c 2001/01/29 18:47:28
@@ -643,9 +643,17 @@ void transfer_city_units(struct player *
struct city *exclude_city,
int kill_outside, int verbose)
{
- int x = pcity->x;
- int y = pcity->y;
-
+ /* 010129 wegge Transfer units in disbanded city, not in receiving city */
+ int x, y;
+ if (exclude_city) {
+ x = exclude_city->x;
+ y = exclude_city->y;
+ } else {
+ x = pcity->x;
+ y = pcity->y;
+ }
+
+
/* Transfer enemy units in the city to the new owner */
unit_list_iterate(map_get_tile(x, y)->units, vunit) {
/* Dont transfer units already owned by new city-owner --wegge */
--
/Wegge
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Bug/Patch: Units in wrong city transfered after disband city,
Anders Wegge Jakobsen <=
|
|