1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-03 14:52:11 +02:00
This commit is contained in:
Michał W. Urbańczyk 2013-10-13 15:24:02 +00:00
parent c3e75b799e
commit 0e8fa04d9f

View File

@ -2759,8 +2759,11 @@ void AIStatus::heroVisit(const CGObjectInstance *obj, bool started)
objectsBeingVisited.push_back(obj);
else
{
assert(objectsBeingVisited.size() == 1);
objectsBeingVisited.clear();
// There can be more than one object visited at the time (eg. hero visits Subterranean Gate
// causing visit to hero on the other side.
// However, we are guaranteed that start/end visit notification maintain stack order.
assert(!objectsBeingVisited.empty());
objectsBeingVisited.pop_back();
}
cv.notify_all();
}