aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Špalek2009-11-21 18:18:09 +0000
committerRobert Špalek2009-11-21 18:18:09 +0000
commit9297e62aed73f313f932276f392e68e17cfc04b6 (patch)
treeaf3606ca54b4086e6ed72b3c633297798e3d7964
parent33c31067987fcfbbd9b53d0f5d66075e8cd38645 (diff)
downloadscummvm-rg350-9297e62aed73f313f932276f392e68e17cfc04b6.tar.gz
scummvm-rg350-9297e62aed73f313f932276f392e68e17cfc04b6.tar.bz2
scummvm-rg350-9297e62aed73f313f932276f392e68e17cfc04b6.zip
Fixed re-entering the same room using a different gate
svn-id: r46044
-rw-r--r--engines/draci/game.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 5e124892df..a170cc2948 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -432,7 +432,7 @@ void Game::advanceAnimationsAndTestLoopExit() {
// A script has scheduled changing the room (either triggered
// by the user clicking on something or run at the end of a
// gate script in the intro).
- if ((_loopStatus == kStatusOrdinary || _loopStatus == kStatusGate) && _newRoom != getRoomNum()) {
+ if ((_loopStatus == kStatusOrdinary || _loopStatus == kStatusGate) && (_newRoom != getRoomNum() || _newGate != _variables[0] - 1)) {
setExitLoop(true);
}
@@ -1161,7 +1161,14 @@ void Game::deleteObjectAnimations() {
}
bool Game::enterNewRoom() {
- if (_newRoom == getRoomNum() && !isReloaded()) {
+ if ((_newRoom == getRoomNum() && _newGate == _variables[0] - 1) && !isReloaded()) {
+ // Re-entering the same room via a different gate is correct
+ // and the room needs to be reloaded (used in the ballroom when
+ // propping the chair by the brick).
+ // TODO: 1. don't use _variables but a new named attribute. 2.
+ // investigate whether the optimization with shortcut is
+ // needed; maybe reloading the room always is the right thing
+ // to do.
_vm->_script->endCurrentProgram(false);
return true;
}