diff options
author | Peter Kohaut | 2017-03-23 00:57:35 +0100 |
---|---|---|
committer | Peter Kohaut | 2017-03-23 00:57:35 +0100 |
commit | 710b48a6ff43da0546a824dc38fb77c6c9c5b576 (patch) | |
tree | a13bc7d580501232b58df294d441742ee7da8d81 /engines/bladerunner/actor.cpp | |
parent | 52476b0778d4e02a67b61793b9ebeb1725658b40 (diff) | |
download | scummvm-rg350-710b48a6ff43da0546a824dc38fb77c6c9c5b576.tar.gz scummvm-rg350-710b48a6ff43da0546a824dc38fb77c6c9c5b576.tar.bz2 scummvm-rg350-710b48a6ff43da0546a824dc38fb77c6c9c5b576.zip |
BLADERUNNER: Fixed function for changing actors goal
Diffstat (limited to 'engines/bladerunner/actor.cpp')
-rw-r--r-- | engines/bladerunner/actor.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp index 37429283dc..597dc60454 100644 --- a/engines/bladerunner/actor.cpp +++ b/engines/bladerunner/actor.cpp @@ -1006,12 +1006,14 @@ int Actor::getAnimationMode() { } void Actor::setGoal(int goalNumber) { - if (goalNumber == _goalNumber) { + int oldGoalNumber = _goalNumber; + _goalNumber = goalNumber; + if (goalNumber == oldGoalNumber) { return; - } + } - _vm->_aiScripts->GoalChanged(_id, _goalNumber, goalNumber); - _vm->_script->ActorChangedGoal(_id, goalNumber, _goalNumber, _vm->_scene->getSetId() == _setId); + _vm->_aiScripts->GoalChanged(_id, oldGoalNumber, goalNumber); + _vm->_script->ActorChangedGoal(_id, goalNumber, oldGoalNumber, _vm->_scene->getSetId() == _setId); } int Actor::getGoal() { |