aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-12-19 12:19:07 +0100
committerThierry Crozat2018-01-23 02:15:44 +0000
commitbb8dbdfc682290f3d4da5a9eb50455485351f5c8 (patch)
tree0a9db733996268abbf834dd944e3d9f63b5d182a
parentb76ac8331ff269210f8a9face931ec39cdb50f5d (diff)
downloadscummvm-rg350-bb8dbdfc682290f3d4da5a9eb50455485351f5c8.tar.gz
scummvm-rg350-bb8dbdfc682290f3d4da5a9eb50455485351f5c8.tar.bz2
scummvm-rg350-bb8dbdfc682290f3d4da5a9eb50455485351f5c8.zip
SUPERNOVA: Fixes game freeze in bcorrdior
Most of the time _objectState[MAX_OBJECT - 1] was used for showing/hiding the GUI, here it was to indicate if the player is currently hidden behind a pillar though.
-rw-r--r--engines/supernova/rooms.cpp7
-rw-r--r--engines/supernova/state.cpp2
-rw-r--r--engines/supernova/state.h1
3 files changed, 6 insertions, 4 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp
index 8bbb170500..2ec0836687 100644
--- a/engines/supernova/rooms.cpp
+++ b/engines/supernova/rooms.cpp
@@ -2729,8 +2729,9 @@ void AxacussBcorridor::onEntrance() {
bool AxacussBcorridor::interact(Action verb, Object &obj1, Object &obj2) {
if (obj1.hasProperty(EXIT) ||
- ((verb == ACTION_USE) && obj1.hasProperty(COMBINABLE) && obj2.hasProperty(EXIT)))
- _gm->_guiEnabled = false;
+ ((verb == ACTION_USE) && obj1.hasProperty(COMBINABLE) && obj2.hasProperty(EXIT))) {
+ _gm->_state._playerHidden = false;
+ }
if ((verb == ACTION_CLOSE) && (obj1._id >= DOOR1) && (obj1._id <= DOOR4) && obj1.hasProperty(OPENED)) {
_vm->renderImage(_gm->invertSection(obj1._id - DOOR1 + 1));
@@ -2794,7 +2795,7 @@ bool AxacussBcorridor::interact(Action verb, Object &obj1, Object &obj2) {
return false;
} else if ((verb == ACTION_WALK) && ((obj1._id == PILLAR1) || (obj1._id == PILLAR2))) {
_vm->renderMessage(kStringAxacussBcorridor_1);
- _gm->_guiEnabled = true;
+ _gm->_state._playerHidden = true;
} else
return false;
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index e199e15d47..6821065214 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -1091,7 +1091,7 @@ void GameManager::guardWalkEvent() {
walk(18);
}
- if (!_currentRoom->isSectionVisible(kMaxSection - 1)) {
+ if (!_state._playerHidden) {
if (_state._origin & 1)
walk(10);
else
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index e61519cfbb..50a0ce18d8 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -56,6 +56,7 @@ struct GameState {
bool _powerOff;
bool _dream;
bool _nameSeen[4];
+ bool _playerHidden;
};
class Inventory {