mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +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": [
|
||||
],
|
||||
"data": {
|
||||
"endFrame": 34,
|
||||
"endFrame": 40,
|
||||
"loopFlag": false,
|
||||
"startFrame": 1,
|
||||
"timeScale": 1,
|
||||
|
|
|
@ -1457,15 +1457,17 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
|
|||
_animVars.set("isInputBackward", false);
|
||||
_animVars.set("isInputRight", false);
|
||||
_animVars.set("isInputLeft", false);
|
||||
_animVars.set("isNotInput", true);
|
||||
|
||||
if (_isMovingWithMomentum) {
|
||||
_animVars.set("isNotInputSlow", true);
|
||||
_animVars.set("isNotInputNoMomentum", false);
|
||||
} else {
|
||||
_animVars.set("isNotInputSlow", false);
|
||||
_animVars.set("isNotInputNoMomentum", true);
|
||||
}
|
||||
// directly reflects input
|
||||
_animVars.set("isNotInput", true);
|
||||
|
||||
// no input + speed drops to SLOW_SPEED_THRESHOLD
|
||||
// (don't transition run->idle - slow to walk first)
|
||||
_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 {
|
||||
|
|
Loading…
Reference in a new issue