Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: another vision range patch (PR#4674)
Home

[Freeciv-Dev] Re: another vision range patch (PR#4674)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: another vision range patch (PR#4674)
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Mon, 28 Jul 2003 06:53:08 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Dnia 2003.07.28 07:58, Jason Short napisa³(a):
> 
> This much larger patch:
> 
>    - Adds get_unit_vision_range and get_unit_vision_range_at.
>    - Removes unit_profits_of_watchtower and get_watchtower_vision.
>    - Rewrites code to use the new functions.
>    - Replaces old unit_type.vision_range calculations.
>    - Fixes several unrelated bugs.
> 
> The unrelated bugs actually look pretty severe.  For instance when a
> watchtower is pillaged the server iterates over all units on the tile
> to
> update their vision.  However it doesn't update the vision for the
> unit's owner's but rather for the pillaging unit's owner.  In the rare
> 
> case where these differ the results would likely be disasterous.  This
> 
> same type of bug occurs in several places.
> 
> Nonetheless the correctness of this patch is not obvious and it should
> 
> probably be broken up and the changes made piece-by-piece.  I think
> vision_range-2.diff is a good start.
> 
> An additional (dis)advantage is that the only assumption left is that
> only for fortresses will watchtower vision apply.  Other arbitrary
> assumptions (like is_ground_unit()) are removed - giving more correct
> code but also some spurious fog/unfogs.
> 

missuderstand something ... why do you remove FORTRESS check from 
get_unit_vision_range_at(...) ?  IMHO this should br primary check !

Rafal




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