diff --git a/apps/openmw/mwgui/waitdialog.cpp b/apps/openmw/mwgui/waitdialog.cpp index e159a826e..359f26dee 100644 --- a/apps/openmw/mwgui/waitdialog.cpp +++ b/apps/openmw/mwgui/waitdialog.cpp @@ -223,10 +223,14 @@ namespace MWGui bool full = (stats.getFatigue().getCurrent() >= stats.getFatigue().getModified()) && (stats.getHealth().getCurrent() >= stats.getHealth().getModified()) && (stats.getMagicka().getCurrent() >= stats.getMagicka().getModified()); + MWMechanics::NpcStats& npcstats = MWWorld::Class::get(player).getNpcStats(player); + bool werewolf = npcstats.isWerewolf(); mUntilHealedButton->setVisible(canRest && !full); mWaitButton->setCaptionWithReplacing (canRest ? "#{sRest}" : "#{sWait}"); - mRestText->setCaptionWithReplacing (canRest ? "#{sRestMenu3}" : "#{sRestIllegal}"); + mRestText->setCaptionWithReplacing (canRest ? "#{sRestMenu3}" + : (werewolf ? "#{sWerewolfRestMessage}" + : "#{sRestIllegal}")); mSleeping = canRest; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 3b76beb43..e0e7e1093 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1645,13 +1645,15 @@ namespace MWWorld { Ptr::CellStore *currentCell = mWorldScene->getCurrentCell(); - RefData &refdata = mPlayer->getPlayer().getRefData(); + Ptr player = mPlayer->getPlayer(); + RefData &refdata = player.getRefData(); Ogre::Vector3 playerPos(refdata.getPosition().pos); const OEngine::Physic::PhysicActor *physactor = mPhysEngine->getCharacter(refdata.getHandle()); if((!physactor->getOnGround()&&physactor->getCollisionMode()) || isUnderwater(currentCell, playerPos)) return 2; - if((currentCell->mCell->mData.mFlags&ESM::Cell::NoSleep)) + if((currentCell->mCell->mData.mFlags&ESM::Cell::NoSleep) || + Class::get(player).getNpcStats(player).isWerewolf()) return 1; return 0;