Follow-up Comment #4, bug #23614 (project freeciv):
To ensure correct cached illness values on the server, city_illness_calc()
could be called from city_refresh_from_main_map() or city_refresh(). Those get
called at a suitably late time in the loading sequence.
I don't know how expensive it is; it might be overkill, as the server only
needs correct values once a turn to cause a plague, and the client
recalculates illness on demand to display to the player, so mostly it doesn't
matter if pcity->server.illness is a bit stale, I think?
In theory, pcity->server.illness being incorrect after savegame load also
applies to S2_5; but due to the above it may not matter. (Also, in practice
city_illness_calc() might get called later in loading; I haven't checked.) So
I'm not targeting a fix at 2.5.1.
If we add city_illness_calc to the refresh functions, they might still get
called too early and cause a crash on trunk unless city_illness_calc() itself
gets some protection against being called with incomplete trade route
information.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?23614>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev