aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-funcs.cpp10
-rw-r--r--engines/hdb/ai.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index b07399ffa1..b6cafe1ec2 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -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) {
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index cb24cac02e..171979940d 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -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);