From 41484432b485a608989ca9db931b06a1a5fe5ec4 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Wed, 6 Jul 2016 00:15:25 +0200 Subject: [PATCH] Player's death now interrupts waiting/sleeping --- apps/openmw/mwgui/waitdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwgui/waitdialog.cpp b/apps/openmw/mwgui/waitdialog.cpp index e8ac63bf6..bb7d7460f 100644 --- a/apps/openmw/mwgui/waitdialog.cpp +++ b/apps/openmw/mwgui/waitdialog.cpp @@ -191,6 +191,10 @@ namespace MWGui mProgressBar.setProgress(cur, total); MWBase::Environment::get().getWorld()->advanceTime(1); MWBase::Environment::get().getMechanicsManager()->rest(mSleeping); + + MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr(); + if (player.getClass().getCreatureStats(player).isDead()) + stopWaiting(); } void WaitDialog::onWaitingInterrupted()