aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/television.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-17 19:57:42 -0400
committerPaul Gilbert2017-08-17 19:57:42 -0400
commitee458e557eeb1c5efea03fc3e6180808b0fe5ecd (patch)
treea77411ff14b41c730e95b822c2f3ffb71959efb7 /engines/titanic/game/television.cpp
parent7b0db9e1ec5bb4769bd6ba2f850f618a1ed2a673 (diff)
downloadscummvm-rg350-ee458e557eeb1c5efea03fc3e6180808b0fe5ecd.tar.gz
scummvm-rg350-ee458e557eeb1c5efea03fc3e6180808b0fe5ecd.tar.bz2
scummvm-rg350-ee458e557eeb1c5efea03fc3e6180808b0fe5ecd.zip
TITANIC: Fix magazine being winnable multiple times
Diffstat (limited to 'engines/titanic/game/television.cpp')
-rw-r--r--engines/titanic/game/television.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp
index 1380b441d7..80404fa9d3 100644
--- a/engines/titanic/game/television.cpp
+++ b/engines/titanic/game/television.cpp
@@ -236,23 +236,31 @@ bool CTelevision::MovieEndMsg(CMovieEndMsg *msg) {
}
if (_channelNum == 3 && compareRoomNameTo("SGTState") && getPassengerClass() == THIRD_CLASS) {
- // You may be a winner
- CProximity prox1, prox2;
- prox1._soundType = prox2._soundType = Audio::Mixer::kSpeechSoundType;
- playSound("z#47.wav", prox1);
- _soundHandle = playSound("b#20.wav", prox2);
- CMagazine *magazine = dynamic_cast<CMagazine *>(getRoot()->findByName("Magazine"));
+ // WORKAROUND: The original allowed the magazine to be "won" multiple times. We
+ // now search for magazine within the room (which is it's initial, hidden location).
+ // That way, when it's 'Won', it's no longer present and can't be won again
+ CMagazine *magazine = dynamic_cast<CMagazine *>(findRoom()->findByName("Magazine"));
if (magazine) {
+ // You may be a winner
+ CProximity prox1, prox2;
+ prox1._soundType = prox2._soundType = Audio::Mixer::kSpeechSoundType;
+ playSound("z#47.wav", prox1);
+ _soundHandle = playSound("b#20.wav", prox2);
+
+ // Get the room flags for the SGT floor we're on
CPetControl *pet = getPetControl();
uint roomFlags = pet->getRoomFlags();
- debugC(kDebugScripts, "Assigned room - %d", roomFlags);
+ // Send the magazine to the SuccUBus
+ debugC(DEBUG_INTERMEDIATE, kDebugScripts, "Assigned room - %d", roomFlags);
magazine->addMail(roomFlags);
magazine->sendMail(roomFlags, roomFlags);
- }
- loadFrame(561);
+ loadFrame(561);
+ } else {
+ petDisplayMessage(NOTHING_ON_CHANNEL);
+ }
} else if (_channelNum == 2) {
loadFrame(_seasonFrame);
} else if (_channelNum == 4 && _channel4Glyph) {