[Freeciv-Dev] cities should not un-hide squares (PR#416)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Here's a bug I just noticed with the Fog of War code.
When you build a city, or have it transferred to you (by diplomacy, &c.),
the entire city radius is un-hidden. This is incorrect. While cities do
"add a point of visibility" to an already un-hidden square, they don't by
themselves un-hide squares.
When transferring a city, the receiver should have un-hidden only those
squares that the giver has un-hidden. (See
give_citymap_from_player_to_player() in the 1.10.0 code
<http://www.freeciv.org/lxr/source/server/maphand.c?v=1.10.0#L124>.)
From what I could tell quickly, it looks like map_{un}fog_city_area() need
to take into account what is already un-hidden. And
map_{un}fog_pseudo_city_area() should be removed, and calls to them
replaced by appropriate calls to the repaired map_{un}fog_city_area()
routines.
However, I'm still learning the Fog code, so I'm not sure if this is the
correct approach.
jjm
- [Freeciv-Dev] cities should not un-hide squares (PR#416),
Jeff Mallatt <=
|
|