diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-13 15:32:47 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-13 15:32:47 -0400 |
commit | 23f2631d598b6e07450a96ed1ec00670c8867cdd (patch) | |
tree | 20195c1688ad8cb7e8631c97fa5920624f10972c /indra/llcharacter/llkeyframewalkmotion.cpp | |
parent | 54334ff6e377e35c97df3a0fe2a859795ec07b21 (diff) | |
parent | 8ce3323269d95f54e2b768c4c5aa154d4afbbb6b (diff) |
Merge branch 'develop' into nat/edu-channel
Diffstat (limited to 'indra/llcharacter/llkeyframewalkmotion.cpp')
-rw-r--r-- | indra/llcharacter/llkeyframewalkmotion.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index 132fb85785..f8691b5f59 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -83,7 +83,7 @@ LLMotion::LLMotionInitStatus LLKeyframeWalkMotion::onInitialize(LLCharacter *cha //----------------------------------------------------------------------------- // LLKeyframeWalkMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLKeyframeWalkMotion::onActivate() +bool LLKeyframeWalkMotion::onActivate() { mRealTimeLast = 0.0f; mAdjTimeLast = 0.0f; @@ -103,7 +103,7 @@ void LLKeyframeWalkMotion::onDeactivate() //----------------------------------------------------------------------------- // LLKeyframeWalkMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask) +bool LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; // compute time since last update @@ -174,7 +174,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara //----------------------------------------------------------------------------- // LLWalkAdjustMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLWalkAdjustMotion::onActivate() +bool LLWalkAdjustMotion::onActivate() { mAnimSpeed = 0.f; mAdjustedSpeed = 0.f; @@ -191,13 +191,13 @@ BOOL LLWalkAdjustMotion::onActivate() F32 rightAnkleOffset = (mRightAnkleJoint->getWorldPosition() - mCharacter->getCharacterPosition()).magVec(); mAnkleOffset = llmax(leftAnkleOffset, rightAnkleOffset); - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLWalkAdjustMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) +bool LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; // delta_time is guaranteed to be non zero @@ -315,7 +315,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) // need to update *some* joint to keep this animation active mPelvisState->setPosition(mPelvisOffset); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -362,18 +362,18 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac //----------------------------------------------------------------------------- // LLFlyAdjustMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLFlyAdjustMotion::onActivate() +bool LLFlyAdjustMotion::onActivate() { mPelvisState->setPosition(LLVector3::zero); mPelvisState->setRotation(LLQuaternion::DEFAULT); mRoll = 0.f; - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLFlyAdjustMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) +bool LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; LLVector3 ang_vel = mCharacter->getCharacterAngularVelocity() * mCharacter->getTimeDilation(); @@ -383,11 +383,11 @@ BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor; // roll is critically damped interpolation between current roll and angular velocity-derived target roll - mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, U32Milliseconds(100)); + mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, F32Milliseconds(100.f)); LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f)); mPelvisState->setRotation(roll); - return TRUE; + return true; } |