1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fixed movement through teleporters by AI

This commit is contained in:
Ivan Savenko
2023-09-20 22:48:48 +03:00
parent a9dbd08dec
commit 3ea807fb8d
2 changed files with 5 additions and 5 deletions

View File

@ -372,7 +372,7 @@ ObjectInstanceID CGTeleport::getRandomExit(const CGHeroInstance * h) const
bool CGTeleport::isTeleport(const CGObjectInstance * obj)
{
return ((dynamic_cast<const CGTeleport *>(obj)));
return dynamic_cast<const CGTeleport *>(obj) != nullptr;
}
bool CGTeleport::isConnected(const CGTeleport * src, const CGTeleport * dst)