[Scummvm-cvs-logs] SF.net SVN: scummvm:[46044] scummvm/trunk/engines/draci/game.cpp
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Sat Nov 21 19:18:10 CET 2009
Revision: 46044
http://scummvm.svn.sourceforge.net/scummvm/?rev=46044&view=rev
Author: spalek
Date: 2009-11-21 18:18:09 +0000 (Sat, 21 Nov 2009)
Log Message:
-----------
Fixed re-entering the same room using a different gate
Modified Paths:
--------------
scummvm/trunk/engines/draci/game.cpp
Modified: scummvm/trunk/engines/draci/game.cpp
===================================================================
--- scummvm/trunk/engines/draci/game.cpp 2009-11-21 17:29:36 UTC (rev 46043)
+++ scummvm/trunk/engines/draci/game.cpp 2009-11-21 18:18:09 UTC (rev 46044)
@@ -432,7 +432,7 @@
// 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 @@
}
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list