mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Automatically knock down when fatigue goes below zero
This commit is contained in:
parent
413bf127de
commit
cd06b2177d
@ -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…
x
Reference in New Issue
Block a user