mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 10:36:42 +00:00
Automatically knock down when fatigue goes below zero
This commit is contained in:
parent
413bf127de
commit
cd06b2177d
2 changed files with 3 additions and 9 deletions
|
@ -740,15 +740,6 @@ namespace MWClass
|
||||||
fatigue.setCurrent(fatigue.getCurrent() - damage, true);
|
fatigue.setCurrent(fatigue.getCurrent() - damage, true);
|
||||||
getCreatureStats(ptr).setFatigue(fatigue);
|
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
|
void Npc::setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const
|
||||||
|
|
|
@ -207,6 +207,9 @@ namespace MWMechanics
|
||||||
|
|
||||||
mDynamic[index] = value;
|
mDynamic[index] = value;
|
||||||
|
|
||||||
|
if (index == 2 && value.getCurrent() < 0)
|
||||||
|
setKnockedDown(true);
|
||||||
|
|
||||||
if (index==0 && mDynamic[index].getCurrent()<1)
|
if (index==0 && mDynamic[index].getCurrent()<1)
|
||||||
{
|
{
|
||||||
if (!mDead)
|
if (!mDead)
|
||||||
|
|
Loading…
Reference in a new issue