On Wed, Feb 16, 2005 at 11:23:14PM +0100, Guillaume Melquiond wrote: > In fact, we know of one critical bug. The AI will put all its units in > the same place, leading to their disintegration (#11550). Some would > say it is a feature, I consider it a critical bug. It happened once or > twice in each of the game I played recently, so it is really common > unfortunately.
silene, thanks for your replay posted to #11550. Using this replay, see today's IRC logs for #wesnoth-dev for diagnosis by me, sanna and forcemstr on what looks like the cause of at least one manifestation of this problem. This replay generates messages like warning ai: unit moving to attack has ended up unexpectedly at 16,9 when moving to 15,9 moved from 19,13 on stderr when there is unit merging going on. Seems to be remaining level 0 ZOC issues, causing the check in ai_ai.cpp:415 to terminate a perfectly valid path early. Instead of emits_zoc() as with the lv0-ZOC removal silene did, the code is still just calling stone(). There seems to be no code to check if there happens to be another unit there already, so the early termination causes the unit to land on top of a unit already there. There is also a similar issue with playturn.cpp:2489, which is also failing to ignore level 0 ZOC when calculating the possible moves indication, and just considering stone() status. This was reported by sanna on IRC. Changing stone() to !emits_zoc() in the two lines referenced above seems to fix silene's replay. However, I think I'm still seeing the unit merging problem with the Crelanu's Book replay posted to #11550, and am seeing no warnings of the form above, so another bug probably still lurks. -- [EMAIL PROTECTED]
