mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-03 14:52:11 +02:00
Fixed #1487.
This commit is contained in:
parent
c3e75b799e
commit
0e8fa04d9f
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user