Summary: citytools.c::find_closest_city is broken since SVN
revision 17354
                 Project: Freeciv
            Submitted by: roywephy
            Submitted on: Sunday 05/23/2010 at 17:16
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: tr...@17354
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



The function 'find_closest_city' is broken since svn rev. 17354:
The logic for the flags 'only_ocean', 'only_continent', 'only_enemy' is not
correct. For example the function will never return the city if
(only_continent=FALSE and the city is not on the same continent) 
This manifests itself for example when trying to disband a city (which gives
then the error message that one cannot disband the last city left even if it
is not the last city)
I attached a proposal for a patch which can tell better what I mean.
I was not sure (only_continent AND con=0) should return TRUE and how the
'map_is_known' and 'map_get_player_cite->identity' work together. So please
check this.


File Attachments:

Date: Sunday 05/23/2010 at 17:16  Name: citytools.c.patch  Size: 981B   By:
patch proposal


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to