mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Removed CGHeroInstance::getPosition pseudo-override
Now access to hero visible position is always done via visitablePos
This commit is contained in:
@ -2008,7 +2008,7 @@ CGPath * CPlayerInterface::getAndVerifyPath(const CGHeroInstance * h)
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(h->getPosition(false) == path.startPos());
|
||||
assert(h->visitablePos() == path.startPos());
|
||||
//update the hero path in case of something has changed on map
|
||||
if (LOCPLINT->cb->getPathsInfo(h)->getPath(path, path.endPos()))
|
||||
return &path;
|
||||
@ -2112,7 +2112,7 @@ void CPlayerInterface::acceptTurn()
|
||||
void CPlayerInterface::tryDiggging(const CGHeroInstance * h)
|
||||
{
|
||||
int msgToShow = -1;
|
||||
const bool isBlocked = CGI->mh->hasObjectHole(h->getPosition(false)); // Don't dig in the pit.
|
||||
const bool isBlocked = CGI->mh->hasObjectHole(h->visitablePos()); // Don't dig in the pit.
|
||||
|
||||
const auto diggingStatus = isBlocked
|
||||
? EDiggingStatus::TILE_OCCUPIED
|
||||
|
Reference in New Issue
Block a user