aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-funcs.cpp13
-rw-r--r--engines/hdb/ai.h1
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);