aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-05 00:07:08 +0530
committerEugene Sandulenko2019-09-03 17:17:11 +0200
commit64cd74d1b2c728696ce9e475dc6e883f1a48e1fe (patch)
tree0e00caff5c188cc37c81df3b4d5a405ff0e2203d /engines
parentbcbe095ef8d172680318632c5d20ccf78b9c0e80 (diff)
downloadscummvm-rg350-64cd74d1b2c728696ce9e475dc6e883f1a48e1fe.tar.gz
scummvm-rg350-64cd74d1b2c728696ce9e475dc6e883f1a48e1fe.tar.bz2
scummvm-rg350-64cd74d1b2c728696ce9e475dc6e883f1a48e1fe.zip
HDB: Add aiDiverterAction()
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-bots.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/hdb/ai-bots.cpp b/engines/hdb/ai-bots.cpp
index f0b6f35aa2..628a14777b 100644
--- a/engines/hdb/ai-bots.cpp
+++ b/engines/hdb/ai-bots.cpp
@@ -1264,7 +1264,19 @@ void aiDiverterInit2(AIEntity *e) {
}
void aiDiverterAction(AIEntity *e) {
- warning("STUB: AI: aiDiverterAction required");
+ if (e->goalX) {
+ g_hdb->_ai->animateEntity(e);
+ warning("STUB: Set Laser Rescan to true");
+
+ // have to reset the state because we might have been moved...
+ switch (e->dir2) {
+ case DIR_DOWN: e->state = STATE_DIVERTER_BL; e->draw = e->standdownGfx[0]; break;
+ case DIR_UP: e->state = STATE_DIVERTER_BR; e->draw = e->standupGfx[0]; break;
+ case DIR_LEFT: e->state = STATE_DIVERTER_TL; e->draw = e->standleftGfx[0]; break;
+ case DIR_RIGHT: e->state = STATE_DIVERTER_TR; e->draw = e->standrightGfx[0]; break;
+ case DIR_NONE: break;
+ }
+ }
}
void aiDiverterDraw(AIEntity *e, int mx, int my) {