diff options
author | Jaromir Wysoglad | 2019-07-01 10:45:20 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | a4ca2a838f739a53894e05100acf468788eca21b (patch) | |
tree | 455ef1ce7715287ee4dc3a8a3948bf8f858f331a /engines/supernova/supernova2/state.cpp | |
parent | b0e386b0147129017e8a0ed531332585f086aa11 (diff) | |
download | scummvm-rg350-a4ca2a838f739a53894e05100acf468788eca21b.tar.gz scummvm-rg350-a4ca2a838f739a53894e05100acf468788eca21b.tar.bz2 scummvm-rg350-a4ca2a838f739a53894e05100acf468788eca21b.zip |
SUPERNOVA: When dead return back to main loop ASAP
Diffstat (limited to 'engines/supernova/supernova2/state.cpp')
-rw-r--r-- | engines/supernova/supernova2/state.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/engines/supernova/supernova2/state.cpp b/engines/supernova/supernova2/state.cpp index 1b2d28a234..01f425d3ee 100644 --- a/engines/supernova/supernova2/state.cpp +++ b/engines/supernova/supernova2/state.cpp @@ -296,6 +296,7 @@ void GameManager2::initState() { int16 startPuzzleTab[15] = {12, 3, 14, 1, 11, 0, 2, 13, 9, 5, 4, 10, 7, 6, 8}; for (int i = 0; i < 15; i++) _state._puzzleTab[i] = startPuzzleTab[i]; + _dead = false; } void GameManager2::initRooms() { @@ -728,6 +729,10 @@ void GameManager2::executeRoom() { _vm->_sound->playSiren(); if (_processInput && !_vm->_screen->isMessageShown() && _guiEnabled) { handleInput(); + if (_dead) { + _dead = false; + return; + } if (_mouseClicked) { Common::Event event; event.type = Common::EVENT_MOUSEMOVE; @@ -750,6 +755,10 @@ void GameManager2::executeRoom() { drawMapExits(); else drawClock(); + if (_dead) { + _dead = false; + return; + } drawInventory(); drawStatus(); drawCommandBox(); @@ -1331,6 +1340,7 @@ void GameManager2::drawClock() { //arrow(); _state._alarmCracked = false; caught(); + return; } for (int i = 0; i < 3; i++) { Object *o = r->getObject(i); @@ -1363,7 +1373,7 @@ void GameManager2::crack(int time) { zv = z; drawClock(); t++; - } while (t < time && _state._alarmOn == _alarmBefore); + } while (t < time && _state._alarmOn == _alarmBefore && !_dead); _cracking = false; _vm->_screen->changeCursor(ResourceManager::kCursorNormal); if (_state._alarmOn == _alarmBefore) @@ -1373,6 +1383,8 @@ void GameManager2::crack(int time) { bool GameManager2::crackDoor(int time) { _vm->renderMessage(kStringMuseum15); crack(time); + if (_dead) + return false; if (_state._alarmOn != _alarmBefore) { waitOnInput(_messageDuration); _vm->removeMessage(); |