MantisBT - VCMI
View Issue Details
0001030VCMIAI - Adventure Mappublic2012-07-06 15:242014-05-30 17:41
Warmonger 
Warmonger 
normalmajorsometimes
closedfixed 
PCWindows 7SP1
 
0.9 
0001030: Objects visitable once per hero show as "Not visited" to AI.
AI will attempt to revisit objects like Mercenary camp or Learning STone over and over again and get stuck in the process.
However, it may be not AI bug as such, as log shows that these objects are actually marked as "Not visited".

I think that only second (blue) player suffers from this issue, first (red) does not. They are both AI in my maps.
No tags attached.
Issue History
2012-07-06 15:24WarmongerNew Issue
2012-07-06 15:24WarmongerStatusnew => assigned
2012-07-06 15:24WarmongerAssigned To => Tow
2012-07-06 15:36WarmongerDescription Updatedbug_revision_view_page.php?rev_id=1766#r1766
2012-07-19 14:56WarmongerAssigned ToTow => Warmonger
2012-07-19 16:32WarmongerNote Added: 0002802
2012-07-19 16:32WarmongerStatusassigned => resolved
2012-07-19 16:32WarmongerFixed in Version => 0.9
2012-07-19 16:32WarmongerResolutionopen => fixed
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0002802)
Warmonger   
2012-07-19 16:32   
Fixed in r2793.

Apparently i was caused by excessive polymorhpism:

In expression
if (obj->wasVisited(h))
heroPtr is evaluated as numeric value, resulting in call
wasVisited (ui8 player)

while

if (obj->wasVisited(*h))
calls
wasVisited (const CGHeroInstance * h)