Added const cast Entity::CastToBot()

This commit is contained in:
Uleat committed 2019-06-21 06:00:58 -04:00
1 parent ca874cb861
commit e903b06c22
4 files changed
+29 -12

No files matched your search

+11
View File
@@ -286,6 +286,17 @@ Bot *Entity::CastToBot()
#endif
return static_cast<Bot *>(this);
}
const Bot *Entity::CastToBot() const
{
#ifdef _EQDEBUG
if (!IsBot()) {
std::cout << "CastToBot error" << std::endl;
return 0;
}
#endif
return static_cast<const Bot *>(this);
}
#endif
EntityList::EntityList()