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 16 Jun 2014 10:43:38 PM UTC  
 
Category: aiSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: None
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 17 Jun 2014 08:23:20 PM UTC, 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 16 Jun 2014 11:01:45 PM UTC, comment #1:

Example fix for S2_5

(file #21058)

Marko Lindqvist <cazfi>
Project Administrator
Mon 16 Jun 2014 10:43:38 PM UTC, 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):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

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

    Back to the top


    Powered by Savane 3.1-cleanup