HDB: Add animLuaEntity()

This commit is contained in:
Nipun Garg 2019-06-20 19:12:56 +05:30 committed by Eugene Sandulenko
parent 3fc0cb74b1
commit 11685a6ba1
2 changed files with 13 additions and 0 deletions

View File

@ -589,6 +589,16 @@ void AI::initAllEnts() {
warning("STUB: initAllEnts: LaserScan required");
}
void AI::animLuaEntity(const char *initName, AIState st) {
for (Common::Array<AIEntity *>::iterator it = _ents->begin(); it != _ents->end(); it++) {
if (Common::matchString((*it)->entityName, initName)) {
(*it)->state = st;
(*it)->animFrame = 0;
(*it)->animDelay = (*it)->animCycle;
}
}
}
// Check to see if we can get this entity
bool AI::getTableEnt(AIType type) {
switch (type) {

View File

@ -462,6 +462,9 @@ public:
void removeEntity(AIEntity *e);
void setEntityGoal(AIEntity *e, int x, int y);
void initAllEnts();
void animLuaEntity(const char *initName, AIState st);
bool getTableEnt(AIType type);
bool walkThroughEnt(AIType type);
void getItemSound(AIType type);