diff options
author | Martin Kiewitz | 2016-01-30 23:54:41 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-01-30 23:54:41 +0100 |
commit | 26cb39beeefa03c7d0343b60b058334752527a08 (patch) | |
tree | 1459d4979c9f4c20afe9cf2eb9398d7358582837 /engines/agi | |
parent | cb3b5d5e31570d6b6757e6b5e414414972d1b5d6 (diff) | |
download | scummvm-rg350-26cb39beeefa03c7d0343b60b058334752527a08.tar.gz scummvm-rg350-26cb39beeefa03c7d0343b60b058334752527a08.tar.bz2 scummvm-rg350-26cb39beeefa03c7d0343b60b058334752527a08.zip |
AGI: Ego motion type change on newroom only agi3
Ego motion type change on newRoom() was only done for AGI3
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/cycle.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 3d9803e6e3..060dcd356c 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -89,7 +89,9 @@ void AgiEngine::newRoom(int16 newRoomNr) { break; } - if (getVersion() < 0x2000) { + uint16 agiVersion = getVersion(); + + if (agiVersion < 0x2000) { warning("STUB: NewRoom(%d)", newRoomNr); screenObjEgo->flags &= ~fDidntMove; @@ -98,9 +100,12 @@ void AgiEngine::newRoom(int16 newRoomNr) { setView(screenObjEgo, screenObjEgo->currentViewNr); } else { - if (screenObjEgo->motionType == kMotionEgo) { - screenObjEgo->motionType = kMotionNormal; - _game.vars[VM_VAR_EGO_DIRECTION] = 0; + if (agiVersion >= 0x3000) { + // this was only done in AGI3 + if (screenObjEgo->motionType == kMotionEgo) { + screenObjEgo->motionType = kMotionNormal; + _game.vars[VM_VAR_EGO_DIRECTION] = 0; + } } _game.vars[VM_VAR_BORDER_TOUCH_EGO] = 0; |