aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/motion.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-01-31 01:04:53 +0100
committerMartin Kiewitz2016-01-31 01:04:53 +0100
commit428df3e6cb1e3d37c6b596ecd7049c1430905667 (patch)
tree11aec8931289faef5ac718cd61b59435d6abdaa7 /engines/agi/motion.cpp
parent26cb39beeefa03c7d0343b60b058334752527a08 (diff)
downloadscummvm-rg350-428df3e6cb1e3d37c6b596ecd7049c1430905667.tar.gz
scummvm-rg350-428df3e6cb1e3d37c6b596ecd7049c1430905667.tar.bz2
scummvm-rg350-428df3e6cb1e3d37c6b596ecd7049c1430905667.zip
AGI: copying between var + ego screen obj fixed
We copied the wrong way see cycle.cpp This fixes the fan game 13th disciple. bug #3563 Also cleanup playercontrol variable is now a boolean
Diffstat (limited to 'engines/agi/motion.cpp')
-rw-r--r--engines/agi/motion.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/agi/motion.cpp b/engines/agi/motion.cpp
index 3f85059b56..4af8a48518 100644
--- a/engines/agi/motion.cpp
+++ b/engines/agi/motion.cpp
@@ -58,7 +58,7 @@ void AgiEngine::changePos(ScreenObjEntry *screenObj) {
screenObj->flags |= fMotion;
screenObj->direction = 0;
if (isEgoView(screenObj))
- _game.vars[VM_VAR_EGO_DIRECTION] = 0;
+ setVar(VM_VAR_EGO_DIRECTION, 0);
}
}
@@ -70,7 +70,7 @@ void AgiEngine::motionWander(ScreenObjEntry *screenObj) {
screenObj->direction = _rnd->getRandomNumber(8);
if (isEgoView(screenObj)) {
- _game.vars[VM_VAR_EGO_DIRECTION] = screenObj->direction;
+ setVar(VM_VAR_EGO_DIRECTION, screenObj->direction);
}
while (screenObj->wander_count < 6) {
@@ -147,7 +147,7 @@ void AgiEngine::motionMoveObj(ScreenObjEntry *screenObj) {
// Update V6 if ego
if (isEgoView(screenObj))
- _game.vars[VM_VAR_EGO_DIRECTION] = screenObj->direction;
+ setVar(VM_VAR_EGO_DIRECTION, screenObj->direction);
if (screenObj->direction == 0)
motionMoveObjStop(screenObj);
@@ -216,7 +216,7 @@ void AgiEngine::motionMoveObjStop(ScreenObjEntry *screenObj) {
screenObj->motionType = kMotionNormal;
if (isEgoView(screenObj)) {
_game.playerControl = true;
- _game.vars[VM_VAR_EGO_DIRECTION] = 0;
+ setVar(VM_VAR_EGO_DIRECTION, 0);
}
}