ZVISION: Fix script bug #6794 - "ZVISION: Yoruk's coffin instant death"

Fixes an edge case where the player goes to the dark room with the grue
without holding a torch, and then quickly runs away before the grue's
sound effect finishes. Many thanks to eriktorbjorn for the original
workaround
This commit is contained in:
Filippos Karapetis 2015-02-14 14:55:09 +02:00
parent 14914b2a31
commit 60c06b84b6

View File

@ -480,6 +480,14 @@ ActionMusic::ActionMusic(ZVision *engine, int32 slotkey, const Common::String &l
}
_volume = new ValueSlot(engine->getScriptManager(), volumeBuffer);
}
// WORKAROUND for a script bug in Zork Nemesis, rooms mq70/mq80.
// Fixes an edge case where the player goes to the dark room with the grue
// without holding a torch, and then quickly runs away before the grue's
// sound effect finishes. Fixes script bug #6794.
if (engine->getGameId() == GID_NEMESIS && _slotKey == 14822 && engine->getScriptManager()->getStateValue(_slotKey) == 2)
engine->getScriptManager()->setStateValue(_slotKey, 0);
}
ActionMusic::~ActionMusic() {