Summary: Unit can move into city where it should not be able
to exist
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat Sep 17 18:04:36 2011
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: In Progress
             Assigned to: jtn
        Originator Email: 
             Open/Closed: Open
                 Release: 2.3.0
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.3.1,2.4.0



Found while working on bug #16383:

If a transport (A) is transporting a unit (B) in the middle of terrain that B
is not native to, and is next to a city surrounded by such terrain, B can move
into the city, even though can_exist_at_tile() says it should not be able to
stay there (there must be at least one native tile adjacent to the city).

The result is assertion failures every turn (at least).

Patch attached. In unit_move_to_tile_test(), step 4, the
is_allied_city_tile() test is causing trouble, and not doing any good;
city-ness is already taken into account in can_exist_at_tile() in the same
condition, and allied-city-ness is dealt with in step 8 below.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to