TITANIC: Fixes for unlocking music system

This commit is contained in:
Paul Gilbert 2017-01-12 20:18:20 -05:00
parent 6e04b361b2
commit 92693a9ccd
2 changed files with 8 additions and 2 deletions

View File

@ -548,6 +548,10 @@ void CGameObject::sound8(bool flag) const {
}
void CGameObject::setVisible(bool val) {
if (_name.contains("ylinder")) {
warning("TODO");
}
if (val != _visible) {
_visible = val;
makeDirty();

View File

@ -50,14 +50,16 @@ bool CMusicSystemLock::DropObjectMsg(CDropObjectMsg *msg) {
playMovie(MOVIE_NOTIFY_OBJECT);
}
return true;
return false;
}
bool CMusicSystemLock::MovieEndMsg(CMovieEndMsg *msg) {
CTreeItem *phonograph = findRoom()->findByName("Restaurant Phonograph");
// Toggle the locked status of the music system
CQueryPhonographState queryMsg;
queryMsg.execute(phonograph);
CLockPhonographMsg lockMsg(queryMsg._value);
CLockPhonographMsg lockMsg(!queryMsg._value);
lockMsg.execute(phonograph, nullptr, MSGFLAG_SCAN);
setVisible(false);