bugFreeciv - Bugs: bug #22208, dai_find_source_building() ignores...

Show feedback again

bug #22208: dai_find_source_building() ignores move_type parameter

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Mon Jun 16 22:43:38 2014  
Category: aiSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: None
Planned Release: Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Tue Jun 17 20:23:20 2014, comment #2:

I concur that this isn't used, and that the example fix would be correct. Given the oddities I encountered trying not to pass move type, I'm unsure if the AI behaviour wouldn't change in unanticipated ways if this bug was fixed, and agree that it's not appropriate for 2.4 or earlier (and patch #4797 or similar is better for 2.6+). My feeling is not to apply it for 2_5, just for continuity of AI behaviour, but if others' experience indicates it safe, I'm not utterly opposed.

Emmet Hikory <persia>
Project Member
Mon Jun 16 23:01:45 2014, comment #1:

Example fix for S2_5

(file #21058)

Marko Lindqvist <cazfi>
Project Administrator
Mon Jun 16 22:43:38 2014, original submission:

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.

Marko Lindqvist <cazfi>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jun 16 23:01:45 2014cazfiAttached File-=>Added MoveTypeFindSourceBuilding-S2_5.patch, #21058
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup