mirror of
https://github.com/overte-org/overte.git
synced 2025-07-15 14:16:37 +02:00
Simplify boolean statements, revise several settle anims
This commit is contained in:
parent
02045a9fdf
commit
055d5cdf9b
6 changed files with 11 additions and 9 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5452,7 +5452,7 @@
|
||||||
"children": [
|
"children": [
|
||||||
],
|
],
|
||||||
"data": {
|
"data": {
|
||||||
"endFrame": 34,
|
"endFrame": 40,
|
||||||
"loopFlag": false,
|
"loopFlag": false,
|
||||||
"startFrame": 1,
|
"startFrame": 1,
|
||||||
"timeScale": 1,
|
"timeScale": 1,
|
||||||
|
|
|
@ -1457,15 +1457,17 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
|
||||||
_animVars.set("isInputBackward", false);
|
_animVars.set("isInputBackward", false);
|
||||||
_animVars.set("isInputRight", false);
|
_animVars.set("isInputRight", false);
|
||||||
_animVars.set("isInputLeft", false);
|
_animVars.set("isInputLeft", false);
|
||||||
_animVars.set("isNotInput", true);
|
|
||||||
|
|
||||||
if (_isMovingWithMomentum) {
|
// directly reflects input
|
||||||
_animVars.set("isNotInputSlow", true);
|
_animVars.set("isNotInput", true);
|
||||||
_animVars.set("isNotInputNoMomentum", false);
|
|
||||||
} else {
|
// no input + speed drops to SLOW_SPEED_THRESHOLD
|
||||||
_animVars.set("isNotInputSlow", false);
|
// (don't transition run->idle - slow to walk first)
|
||||||
_animVars.set("isNotInputNoMomentum", true);
|
_animVars.set("isNotInputSlow", _isMovingWithMomentum);
|
||||||
}
|
|
||||||
|
// no input + speed didn't get above HAS_MOMENTUM_THRESHOLD since last idle
|
||||||
|
// (brief inputs and movement adjustments)
|
||||||
|
_animVars.set("isNotInputNoMomentum", !_isMovingWithMomentum);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue