Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] cities should not un-hide squares (PR#416)
Home

[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]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] cities should not un-hide squares (PR#416)
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Sun, 25 Jun 2000 08:30:26 -0700 (PDT)

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





[Prev in Thread] Current Thread [Next in Thread]