1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

Fix game gang on random map generation

This commit is contained in:
Ivan Savenko 2024-10-11 15:02:14 +00:00
parent e221cdccab
commit d1e7cb72c2

View File

@ -208,7 +208,7 @@ int CGObjectInstance::getSightRadius() const
int3 CGObjectInstance::getVisitableOffset() const
{
if (!isVisitable())
throw std::runtime_error("Attempt to access visitable offset of a non-visitable object!");
logGlobal->debug("Attempt to access visitable offset on a non-visitable object!");
return appearance->getVisitableOffset();
}
@ -308,7 +308,7 @@ void CGObjectInstance::onHeroVisit( const CGHeroInstance * h ) const
int3 CGObjectInstance::visitablePos() const
{
if (!isVisitable())
throw std::runtime_error("Attempt to access visitable position on a non-visitable object!");
logGlobal->debug("Attempt to access visitable position on a non-visitable object!");
return pos - getVisitableOffset();
}