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

[Freeciv-Dev] Re: cities should not un-hide squares (PR#416)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jeff Mallatt <jjm@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: cities should not un-hide squares (PR#416)
From: Thue <thue@xxxxxxx>
Date: Sun, 25 Jun 2000 18:53:57 +0200

Den søn, 25 jun 2000 skrev Jeff Mallatt:
> 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.

The map_{un}fog_pseudo_city_area() functions are there because it was
practical to use the functionality after the city was removed. no need to
remove them.

> However, I'm still learning the Fog code, so I'm not sure if this is the
> correct approach.
> 
> jjm

Here is a patch. But I really like it the way it currently is. We need to
make it a ruleset variable anyway, as the area is always shown in civ ctp
(and SMAC?), and I would like it to keep working like it is in current CVS
in freeciv mode. It is much nicer! :)

I don't think it should go in so close to 1.11, and the patch is not
terribly tested ...

-Thue

Attachment: diff
Description: Text document


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