1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +00:00

Don't heal dead actors when resting

This commit is contained in:
scrawl 2013-11-29 20:21:57 +01:00
parent bcf61331ab
commit 0e267b79ec

View file

@ -160,6 +160,8 @@ namespace MWMechanics
void Actors::calculateRestoration (const MWWorld::Ptr& ptr, float duration) void Actors::calculateRestoration (const MWWorld::Ptr& ptr, float duration)
{ {
if (ptr.getClass().getCreatureStats(ptr).isDead())
return;
CreatureStats& stats = MWWorld::Class::get (ptr).getCreatureStats (ptr); CreatureStats& stats = MWWorld::Class::get (ptr).getCreatureStats (ptr);
const MWWorld::Store<ESM::GameSetting>& settings = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>(); const MWWorld::Store<ESM::GameSetting>& settings = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>();