Automatically knock down when fatigue goes below zero

actorid
scrawl 11 years ago
parent 413bf127de
commit cd06b2177d

@ -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

@ -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)

Loading…
Cancel
Save