Summary: dai_find_source_building() ignores move_type
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Tue 17 Jun 2014 01:43:38 AM EEST
                Category: ai
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



When working on patch #4797 for TRUNK (trying to understand why it changes AI
so drastically), I noticed that the old code of dai_find_source_building()
never actually uses move_type restriction passed to it.
Function is supposed to be given *either* unit class of move type, and it even
asserts against giving them both. However, the check of move type is within
block guarded by check that the unit class has been given.
Patch #4797 (if committed) will fix this for trunk. It would be very easy to
fix for stable branches, but as testing patch #4797 that would change AI's
defensive improvement building strategy completely so it's probably better to
keep the bug (that has existed for a long time, and AI strategy has been
considered acceptable) than to risk with such a big change in stable branch.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to