[Freeciv-Dev] Losing a unit doesn't update the home city dialog
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
When you disband a unit, or lose it in combat, it's home city dialog and
city report aren't updated with the new support figures (i.e. food and
production surplus increase in high-level governments).
This fixes it:
--- freeciv.ard/server/unitfunc.c Tue Mar 16 09:56:29 1999
+++ freeciv/server/unitfunc.c Tue Mar 16 09:57:18 1999
@@ -1601,7 +1601,15 @@
}
send_remove_unit(0, punit->id);
- game_remove_unit(punit->id);
+ if (punit->homecity) {
+ /* Get a handle on the unit's home city before the unit is wiped */
+ struct city *pcity = find_city_by_id(punit->homecity);
+ game_remove_unit(punit->id);
+ city_refresh(pcity);
+ send_city_info(dest, pcity, 0);
+ } else {
+ game_remove_unit(punit->id);
+ }
}
/**************************************************************************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Losing a unit doesn't update the home city dialog,
Andrew Donkin <=
|
|