diff options
author | Peter Kohaut | 2017-09-10 20:19:02 +0200 |
---|---|---|
committer | Peter Kohaut | 2017-09-10 20:55:30 +0200 |
commit | f79d8cc1fe852e6172519efc51c75449dfc7c8f1 (patch) | |
tree | 4e02ac28680977b4a1a8868e2f1e58b302bf93a9 /engines/bladerunner/script/ai.cpp | |
parent | e0aa906804942c04db6b3febed159846b7bcfb51 (diff) | |
download | scummvm-rg350-f79d8cc1fe852e6172519efc51c75449dfc7c8f1.tar.gz scummvm-rg350-f79d8cc1fe852e6172519efc51c75449dfc7c8f1.tar.bz2 scummvm-rg350-f79d8cc1fe852e6172519efc51c75449dfc7c8f1.zip |
BLADERUNNER: Added music support & added Maggie
added async walking
named some of the game flags & variables
renamed aesc to screen effects
Diffstat (limited to 'engines/bladerunner/script/ai.cpp')
-rw-r--r-- | engines/bladerunner/script/ai.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/bladerunner/script/ai.cpp b/engines/bladerunner/script/ai.cpp index c695886a61..ade27e417f 100644 --- a/engines/bladerunner/script/ai.cpp +++ b/engines/bladerunner/script/ai.cpp @@ -41,6 +41,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorsCount) : _vm(vm), _inScrip _AIScripts[kActorRunciter] = new AIScriptRunciter(_vm); _AIScripts[kActorOfficerLeary] = new AIScriptOfficerLeary(_vm); _AIScripts[kActorLeon] = new AIScriptLeon(_vm); + _AIScripts[kActorMaggie] = new AIScriptMaggie(_vm); } AIScripts::~AIScripts() { @@ -100,6 +101,20 @@ void AIScripts::ReceivedClue(int actor, int clueId, int fromActorId) { _inScriptCounter--; } +void AIScripts::ClickedByPlayer(int actor) { + assert(actor < _actorsCount); + + if(_vm->_actors[actor]->inCombat()) { + return; + } + + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->ClickedByPlayer(); + } + _inScriptCounter--; +} + void AIScripts::EnteredScene(int actor, int setId) { assert(actor < _actorsCount); _inScriptCounter++; |