1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 21:45:32 +00:00

Fix falling animation where vec.z is set to zero.

This commit is contained in:
cc9cii 2014-04-13 11:34:59 +10:00
parent 0bef754873
commit e9be6d3f42

View file

@ -1090,13 +1090,14 @@ void CharacterController::update(float duration)
if (inwater || flying)
cls.getCreatureStats(mPtr).land();
// FIXME: The check for vec.z is a hack, but onground is not a reliable
// indicator of whether the actor is on the ground (defaults to false, which
// means this code block will always execute at least once for most, and
// collisions can move z position slightly off zero). A very small value of
// 0.1 is used here, but maybe something larger like 10 should be used.
// Should resolve Bug#1271.
if(!onground && !flying && !inwater && vec.z > 0.1f)
if(!onground && !flying && !inwater
// FIXME: The check for vec.z is a hack, but onground is not a reliable
// indicator of whether the actor is on the ground (defaults to false, which
// means this code block will always execute at least once for most actors,
// and collisions can move z position slightly off zero). A very small value
// of 0.1 is used here, but something larger like 10 may be more suitable.
// Should resolve Bug#1271.
&& (mJumpState == JumpState_Falling || vec.z > 0.1f))
{
// In the air (either getting up —ascending part of jump— or falling).