diff options
author | Peter Kohaut | 2017-03-20 22:55:31 +0100 |
---|---|---|
committer | Peter Kohaut | 2017-03-20 22:55:31 +0100 |
commit | dd7498544f60ecf32d89c19b95eee105fbfb79ab (patch) | |
tree | a2c3b9fae78c1de665b75e64d992031c8b263fe2 /engines/bladerunner/actor.cpp | |
parent | ccc6cbfb9106d17777422aa4b3c10d19d5330328 (diff) | |
download | scummvm-rg350-dd7498544f60ecf32d89c19b95eee105fbfb79ab.tar.gz scummvm-rg350-dd7498544f60ecf32d89c19b95eee105fbfb79ab.tar.bz2 scummvm-rg350-dd7498544f60ecf32d89c19b95eee105fbfb79ab.zip |
BLADERUNNER: added Runciter character (petshop owner)
Diffstat (limited to 'engines/bladerunner/actor.cpp')
-rw-r--r-- | engines/bladerunner/actor.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 96a76bf4be..bdcef02e92 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -530,16 +530,16 @@ void Actor::setSetId(int setId) { if (_setId > 0) { for (i = 0; i < (int)_vm->_gameInfo->getActorCount(); i++) { if (_vm->_actors[i]->_id != _id && _vm->_actors[i]->_setId == _setId) { - // TODO: _vm->_aiScripts->OtherAgentExitedThisScene( i, _id); + _vm->_aiScripts->OtherAgentExitedThisScene(i, _id); } } } _setId = setId; - // TODO: _vm->_aiScripts->EnteredScene(_id, set); + _vm->_aiScripts->EnteredScene(_id, _setId); if (_setId > 0) { for (i = 0; i < (int)_vm->_gameInfo->getActorCount(); i++) { if (_vm->_actors[i]->_id != _id && _vm->_actors[i]->_setId == _setId) { - // TODO: _vm->_aiScripts->OtherAgentEnteredThisScene(i, _id); + _vm->_aiScripts->OtherAgentEnteredThisScene(i, _id); } } } @@ -851,11 +851,11 @@ int Actor::getAnimationMode() { } void Actor::setGoal(int goalNumber) { - if (goalNumber == _goalNumber) + if (goalNumber == _goalNumber) { return; + } - //TODO: _vm->actorScript->GoalChanged(_id, _goalNumber, goalNumber); - + _vm->_aiScripts->GoalChanged(_id, _goalNumber, goalNumber); _vm->_script->ActorChangedGoal(_id, goalNumber, _goalNumber, _vm->_scene->getSetId() == _setId); } @@ -943,6 +943,12 @@ int Actor::countdownTimerGetRemainingTime(int timerId) { return _timersRemain[timerId]; } +void Actor::countdownTimersUpdate() { + for (int i = 0; i <= 6; i++) { + countdownTimerUpdate(i); + } +} + void Actor::countdownTimerUpdate(int timerId) { if (_timersRemain[timerId] == 0) return; @@ -959,7 +965,14 @@ void Actor::countdownTimerUpdate(int timerId) { case 0: case 1: case 2: - // AI timers, call AI dll + if (!_vm->_aiScripts->IsInsideScript() && !_vm->_script->IsInsideScript()) { + _vm->_aiScripts->TimerExpired(this->_id, timerId); + this->_timersRemain[timerId] = 0; + //return false; + } else { + this->_timersRemain[timerId] = 1; + //return true; + } break; case 3: // Movement track timer |