MantisBT - VCMI
View Issue Details
0001732VCMIAI - Adventure Mappublic2014-02-26 17:072014-06-02 10:59
xyz 
Warmonger 
normalminorN/A
closedfixed 
0.94f 
0.95 
0001732: Typo in AIUtility.cpp (?)
    for (int x = hpos.x - DIST_LIMIT; x <= hpos.y + DIST_LIMIT; ++x) //get only local objects instead of all possible objects on the map
    {
        for (int y = hpos.y - DIST_LIMIT; y <= hpos.y + DIST_LIMIT; ++y)

Shouldn't first line be "for (int x = hpos.x - DIST_LIMIT; x <= hpos.x + DIST_LIMIT; ++x)"?
No tags attached.
Issue History
2014-02-26 17:07xyzNew Issue
2014-02-26 17:07xyzStatusnew => assigned
2014-02-26 17:07xyzAssigned To => Tow
2014-02-26 17:18WarmongerNote Added: 0004528
2014-02-26 17:30WarmongerNote Added: 0004529
2014-02-26 17:30WarmongerStatusassigned => resolved
2014-02-26 17:30WarmongerFixed in Version => 0.95
2014-02-26 17:30WarmongerResolutionopen => fixed
2014-02-26 17:30WarmongerAssigned ToTow => Warmonger
2014-02-26 17:33WarmongerNote Edited: 0004529bug_revision_view_page.php?bugnote_id=4529#r2539
2014-06-02 10:59KantorNote Added: 0004732
2014-06-02 10:59KantorStatusresolved => closed

Notes
(0004528)
Warmonger   
2014-02-26 17:18   
Oh yes it should, good point :)
(0004529)
Warmonger   
2014-02-26 17:30   
(edited on: 2014-02-26 17:33)
This might seem as a rule-of-thumb piece of code, but actually for y < x (south-east half of map) AI was not very interested in picking nearby objects, which resulted in poor performance.
Fixed in r3776.

(0004732)
Kantor   
2014-06-02 10:59   
This one may be closed.