mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Fix falling animation where vec.z is set to zero.
This commit is contained in:
parent
0bef754873
commit
e9be6d3f42
1 changed files with 8 additions and 7 deletions
|
@ -1090,13 +1090,14 @@ void CharacterController::update(float duration)
|
||||||
if (inwater || flying)
|
if (inwater || flying)
|
||||||
cls.getCreatureStats(mPtr).land();
|
cls.getCreatureStats(mPtr).land();
|
||||||
|
|
||||||
// FIXME: The check for vec.z is a hack, but onground is not a reliable
|
if(!onground && !flying && !inwater
|
||||||
// indicator of whether the actor is on the ground (defaults to false, which
|
// FIXME: The check for vec.z is a hack, but onground is not a reliable
|
||||||
// means this code block will always execute at least once for most, and
|
// indicator of whether the actor is on the ground (defaults to false, which
|
||||||
// collisions can move z position slightly off zero). A very small value of
|
// means this code block will always execute at least once for most actors,
|
||||||
// 0.1 is used here, but maybe something larger like 10 should be used.
|
// and collisions can move z position slightly off zero). A very small value
|
||||||
// Should resolve Bug#1271.
|
// of 0.1 is used here, but something larger like 10 may be more suitable.
|
||||||
if(!onground && !flying && !inwater && vec.z > 0.1f)
|
// Should resolve Bug#1271.
|
||||||
|
&& (mJumpState == JumpState_Falling || vec.z > 0.1f))
|
||||||
{
|
{
|
||||||
// In the air (either getting up —ascending part of jump— or falling).
|
// In the air (either getting up —ascending part of jump— or falling).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue