Added const cast Entity::CastToBot()

This commit is contained in:
Uleat
2019-06-21 06:00:58 -04:00
parent ca874cb861
commit e903b06c22
4 changed files with 29 additions and 12 deletions
+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()