mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Workaround for hero & town issue. Game still crashes elsewhere, though.
This commit is contained in:
@@ -523,7 +523,14 @@ void CGTownInstance::onHeroVisit(const CGHeroInstance * h) const
|
||||
|
||||
void CGTownInstance::onHeroLeave(const CGHeroInstance * h) const
|
||||
{
|
||||
cb->stopHeroVisitCastle(this, h);
|
||||
//FIXME: find out why this issue appears on random maps
|
||||
if (visitingHero == h)
|
||||
{
|
||||
cb->stopHeroVisitCastle(this, h);
|
||||
logGlobal->warnStream() << h->name << " correctly left town " << name;
|
||||
}
|
||||
else
|
||||
logGlobal->warnStream() << "Warning, " << h->name << " tries to leave the town " << name << " but hero is not inside.";
|
||||
}
|
||||
|
||||
std::string CGTownInstance::getObjectName() const
|
||||
|
||||
Reference in New Issue
Block a user