1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-14 01:19:59 +00:00

Fix so that keepPlayerAlive() will not run twice

This commit is contained in:
Allofich 2016-06-27 21:24:45 +09:00
parent 19a20a6871
commit 1602eb3de8

View File

@ -1574,15 +1574,7 @@ namespace MWMechanics
MWWorld::Ptr player = getPlayer();
CreatureStats& stats = player.getClass().getCreatureStats(player);
if (stats.isDead())
{
MWMechanics::DynamicStat<float> stat (stats.getHealth());
if (stat.getModified()<1)
{
stat.setModified(1, 0);
stats.setHealth(stat);
}
stats.resurrect();
}
}
bool MechanicsManager::isReadyToBlock(const MWWorld::Ptr &ptr) const