1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Automatically knock down when fatigue goes below zero

This commit is contained in:
scrawl 2014-01-13 02:55:18 +01:00
parent 413bf127de
commit cd06b2177d
2 changed files with 3 additions and 9 deletions

View File

@ -740,15 +740,6 @@ namespace MWClass
fatigue.setCurrent(fatigue.getCurrent() - damage, true);
getCreatureStats(ptr).setFatigue(fatigue);
}
if (object.isEmpty())
{
// Hand-to-hand automatically knocks down when running out of fatigue
if (getCreatureStats(ptr).getFatigue().getCurrent() < 0)
{
getCreatureStats(ptr).setKnockedDown(true);
}
}
}
void Npc::setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const

View File

@ -207,6 +207,9 @@ namespace MWMechanics
mDynamic[index] = value;
if (index == 2 && value.getCurrent() < 0)
setKnockedDown(true);
if (index==0 && mDynamic[index].getCurrent()<1)
{
if (!mDead)