From a8256ee3c1a108f8ea88c98cec6274618fbb5c80 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Wed, 19 Jun 2019 17:35:27 +0530 Subject: HDB: Complete locateEntity() --- engines/hdb/ai-funcs.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 2592861e08..22c8040c8f 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -25,7 +25,11 @@ namespace HDB { AIEntity *AI::locateEntity(const char *luaName) { - warning("STUB: AI::locateEntity required"); + for (Common::Array::iterator it = _ents->begin(); it != _ents->end(); it++) { + if (Common::matchString((*it)->entityName, luaName)) { + return *it; + } + } return NULL; } -- cgit v1.2.3