aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/neighborhood
diff options
context:
space:
mode:
authorMatthew Hoops2013-07-28 14:31:46 -0400
committerMatthew Hoops2013-07-28 14:32:23 -0400
commitd969b1b11b7c5d95d933b34f99f14b59f7de4bbb (patch)
tree3e72b6659fcbd7e42e4e33bd25badedd51243822 /engines/pegasus/neighborhood
parent8320a556d4f2d90aede5a8a8a4ae13bd213927dd (diff)
downloadscummvm-rg350-d969b1b11b7c5d95d933b34f99f14b59f7de4bbb.tar.gz
scummvm-rg350-d969b1b11b7c5d95d933b34f99f14b59f7de4bbb.tar.bz2
scummvm-rg350-d969b1b11b7c5d95d933b34f99f14b59f7de4bbb.zip
PEGASUS: Fix gas canister removal not stopping the air timer
This bug was also in the original
Diffstat (limited to 'engines/pegasus/neighborhood')
-rw-r--r--engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp2
-rw-r--r--engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp2
-rw-r--r--engines/pegasus/neighborhood/norad/norad.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp b/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp
index 169f75f7d2..3491f161c7 100644
--- a/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp
+++ b/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp
@@ -201,7 +201,7 @@ void NoradAlphaFillingStation::showIntakeInProgress(uint16 numSeconds) {
if (item->getObjectID() == kGasCanister) {
GameState.setNoradGassed(true);
- ((NoradAlpha *)getOwner())->loadAmbientLoops();
+ ((NoradAlpha *)getOwner())->checkAirMask();
getOwner()->restoreStriding(kNorad03, kEast, kAltNoradAlphaNormal);
}
} else {
diff --git a/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp b/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp
index e4a5e26473..6a24113465 100644
--- a/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp
+++ b/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp
@@ -576,7 +576,7 @@ void NoradAlpha::takeItemFromRoom(Item *item) {
if (_fillingStationItem == item) {
_fillingStationItem = 0;
GameState.setNoradGassed(false);
- loadAmbientLoops();
+ checkAirMask();
((NoradAlphaFillingStation *)_currentInteraction)->newFillingItem(0);
forceStridingStop(kNorad03, kEast, kAltNoradAlphaNormal);
}
diff --git a/engines/pegasus/neighborhood/norad/norad.cpp b/engines/pegasus/neighborhood/norad/norad.cpp
index 578f062dea..53b3ff9add 100644
--- a/engines/pegasus/neighborhood/norad/norad.cpp
+++ b/engines/pegasus/neighborhood/norad/norad.cpp
@@ -241,7 +241,9 @@ void Norad::setUpAirMask() {
}
void Norad::checkAirMask() {
- if (g_airMask && g_airMask->isAirFilterOn()) {
+ // WORKAROUND: The original game forgot to handle the case where the canister would
+ // be removed, leading to the timer remaining active.
+ if (!GameState.getNoradGassed() || (g_airMask && g_airMask->isAirFilterOn())) {
_airMaskTimer.stop();
} else if (GameState.getNoradGassed() && !_airMaskTimer.isRunning()) {
_airMaskTimer.setTime(0);