mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Fix game gang on random map generation
This commit is contained in:
@@ -208,7 +208,7 @@ int CGObjectInstance::getSightRadius() const
|
|||||||
int3 CGObjectInstance::getVisitableOffset() const
|
int3 CGObjectInstance::getVisitableOffset() const
|
||||||
{
|
{
|
||||||
if (!isVisitable())
|
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();
|
return appearance->getVisitableOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ void CGObjectInstance::onHeroVisit( const CGHeroInstance * h ) const
|
|||||||
int3 CGObjectInstance::visitablePos() const
|
int3 CGObjectInstance::visitablePos() const
|
||||||
{
|
{
|
||||||
if (!isVisitable())
|
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();
|
return pos - getVisitableOffset();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user