1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 18:37:08 +00:00

Player's death now interrupts waiting/sleeping

This commit is contained in:
MiroslavR 2016-07-06 00:15:25 +02:00
parent d4e29e3e0c
commit 41484432b4

View File

@ -191,6 +191,10 @@ namespace MWGui
mProgressBar.setProgress(cur, total); mProgressBar.setProgress(cur, total);
MWBase::Environment::get().getWorld()->advanceTime(1); MWBase::Environment::get().getWorld()->advanceTime(1);
MWBase::Environment::get().getMechanicsManager()->rest(mSleeping); MWBase::Environment::get().getMechanicsManager()->rest(mSleeping);
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
if (player.getClass().getCreatureStats(player).isDead())
stopWaiting();
} }
void WaitDialog::onWaitingInterrupted() void WaitDialog::onWaitingInterrupted()