diff options
author | Nipun Garg | 2019-06-19 23:58:39 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:50 +0200 |
commit | cf7c1f35e632bf666a5745533f605d2fe431e6f1 (patch) | |
tree | d0f2ada0c07bd64374e67680ebad5e3ff4afda3f /engines/hdb/hdb.cpp | |
parent | 6338805ac1c0d0dc0464975d7e1f6d4035c628a0 (diff) | |
download | scummvm-rg350-cf7c1f35e632bf666a5745533f605d2fe431e6f1.tar.gz scummvm-rg350-cf7c1f35e632bf666a5745533f605d2fe431e6f1.tar.bz2 scummvm-rg350-cf7c1f35e632bf666a5745533f605d2fe431e6f1.zip |
HDB: Remove 'Process Gettable Item' stub
Diffstat (limited to 'engines/hdb/hdb.cpp')
-rw-r--r-- | engines/hdb/hdb.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp index 3d769f9eb2..c17c1dc90f 100644 --- a/engines/hdb/hdb.cpp +++ b/engines/hdb/hdb.cpp @@ -156,7 +156,23 @@ void HDBGame::useEntity(AIEntity *e) { added = false; if (_ai->getTableEnt(e->type)) { - warning("STUB: HDBGame::useEntity Process Gettable Entity"); + memcpy(&temp, e, sizeof(AIEntity)); + + _ai->getItemSound(e->type); + + added = _ai->addToInventory(e); + if (added) { + e = &temp; + + if (temp.aiUse) { + temp.aiUse(&temp); + } + + if (temp.luaFuncUse[0]) { + _lua->callFunction(temp.luaFuncUse, 0); + } + } + } else { // These should be run over or run through if (_ai->walkThroughEnt(e->type) || e->type == AI_NONE) { |