diff options
author | Nipun Garg | 2019-07-06 00:59:39 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:12 +0200 |
commit | 48546f3c8d24babf477c05671ec384706ab23654 (patch) | |
tree | cf4eebf7bc3ced30c77a6946da7c5895915e972f /engines | |
parent | 22ca561f4af1d524ab5519903e49f743020b48a4 (diff) | |
download | scummvm-rg350-48546f3c8d24babf477c05671ec384706ab23654.tar.gz scummvm-rg350-48546f3c8d24babf477c05671ec384706ab23654.tar.bz2 scummvm-rg350-48546f3c8d24babf477c05671ec384706ab23654.zip |
HDB: Add laserScan()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 13 | ||||
-rw-r--r-- | engines/hdb/ai.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index fd44017e5e..266a71c405 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -2044,6 +2044,19 @@ void AI::clearDiverters() { } } +void AI::laserScan() { + AIEntity *e; + + clearDiverters(); + g_hdb->_map->clearLaserBeams(); + + for (uint i = 0; i < _ents->size(); i++) { + e = _ents->operator[](i); + if (e->type == AI_LASER) + aiLaserAction(e); + } +} + void AI::floatEntity(AIEntity *e, AIState state) { for (Common::Array<AIEntity *>::iterator it = _ents->begin(); it != _ents->end(); it++) { if (e == *it) { diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index be55122754..44e4f69807 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -837,6 +837,7 @@ public: bool checkPlayerTileCollision(int x, int y); bool checkPlayerCollision(int x, int y, int border); void clearDiverters(); + void laserScan(); // List functions void addToActionList(int actionIndex, int x, int y, char *funcLuaInit, char *funcLuaUse); |