HDB: Add checkForTouchplate()

This commit is contained in:
Nipun Garg 2019-07-03 22:41:07 +05:30 committed by Eugene Sandulenko
parent 1cd0a8d936
commit ffe05e989b
2 changed files with 8 additions and 0 deletions

View file

@ -661,6 +661,13 @@ void AI::setLuaAnimFrame(const char *initName, AIState st, int frame) {
}
}
int AI::checkForTouchplate(int x, int y) {
int tileIndex = g_hdb->_map->getMapBGTileIndex(x, y);
if (tileIndex == _touchplateOff || tileIndex == _templeTouchpOff)
return tileIndex;
return 0;
}
void AI::removeEntity(AIEntity *e) {
_ents->erase(&e);
}