aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter/llheadrotmotion.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:48 -0500
committerJacek Antonelli2008-08-15 23:44:48 -0500
commit9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch)
tree2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/llcharacter/llheadrotmotion.cpp
parentSecond Life viewer sources 1.13.2.12 (diff)
downloadmeta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz
Second Life viewer sources 1.13.2.15
Diffstat (limited to '')
-rw-r--r--linden/indra/llcharacter/llheadrotmotion.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/llcharacter/llheadrotmotion.cpp b/linden/indra/llcharacter/llheadrotmotion.cpp
index 3bf7be0..1d1771d 100644
--- a/linden/indra/llcharacter/llheadrotmotion.cpp
+++ b/linden/indra/llcharacter/llheadrotmotion.cpp
@@ -351,31 +351,31 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
351 //calculate jitter 351 //calculate jitter
352 if (mEyeJitterTimer.getElapsedTimeF32() > mEyeJitterTime) 352 if (mEyeJitterTimer.getElapsedTimeF32() > mEyeJitterTime)
353 { 353 {
354 mEyeJitterTime = EYE_JITTER_MIN_TIME + frand(EYE_JITTER_MAX_TIME - EYE_JITTER_MIN_TIME); 354 mEyeJitterTime = EYE_JITTER_MIN_TIME + ll_frand(EYE_JITTER_MAX_TIME - EYE_JITTER_MIN_TIME);
355 mEyeJitterYaw = (frand(2.f) - 1.f) * EYE_JITTER_MAX_YAW; 355 mEyeJitterYaw = (ll_frand(2.f) - 1.f) * EYE_JITTER_MAX_YAW;
356 mEyeJitterPitch = (frand(2.f) - 1.f) * EYE_JITTER_MAX_PITCH; 356 mEyeJitterPitch = (ll_frand(2.f) - 1.f) * EYE_JITTER_MAX_PITCH;
357 // make sure lookaway time count gets updated, because we're resetting the timer 357 // make sure lookaway time count gets updated, because we're resetting the timer
358 mEyeLookAwayTime -= llmax(0.f, mEyeJitterTimer.getElapsedTimeF32()); 358 mEyeLookAwayTime -= llmax(0.f, mEyeJitterTimer.getElapsedTimeF32());
359 mEyeJitterTimer.reset(); 359 mEyeJitterTimer.reset();
360 } 360 }
361 else if (mEyeJitterTimer.getElapsedTimeF32() > mEyeLookAwayTime) 361 else if (mEyeJitterTimer.getElapsedTimeF32() > mEyeLookAwayTime)
362 { 362 {
363 if (frand(1.f) > 0.1f) 363 if (ll_frand() > 0.1f)
364 { 364 {
365 // blink while moving eyes some percentage of the time 365 // blink while moving eyes some percentage of the time
366 mEyeBlinkTime = mEyeBlinkTimer.getElapsedTimeF32(); 366 mEyeBlinkTime = mEyeBlinkTimer.getElapsedTimeF32();
367 } 367 }
368 if (mEyeLookAwayYaw == 0.f && mEyeLookAwayPitch == 0.f) 368 if (mEyeLookAwayYaw == 0.f && mEyeLookAwayPitch == 0.f)
369 { 369 {
370 mEyeLookAwayYaw = (frand(2.f) - 1.f) * EYE_LOOK_AWAY_MAX_YAW; 370 mEyeLookAwayYaw = (ll_frand(2.f) - 1.f) * EYE_LOOK_AWAY_MAX_YAW;
371 mEyeLookAwayPitch = (frand(2.f) - 1.f) * EYE_LOOK_AWAY_MAX_PITCH; 371 mEyeLookAwayPitch = (ll_frand(2.f) - 1.f) * EYE_LOOK_AWAY_MAX_PITCH;
372 mEyeLookAwayTime = EYE_LOOK_BACK_MIN_TIME + frand(EYE_LOOK_BACK_MAX_TIME - EYE_LOOK_BACK_MIN_TIME); 372 mEyeLookAwayTime = EYE_LOOK_BACK_MIN_TIME + ll_frand(EYE_LOOK_BACK_MAX_TIME - EYE_LOOK_BACK_MIN_TIME);
373 } 373 }
374 else 374 else
375 { 375 {
376 mEyeLookAwayYaw = 0.f; 376 mEyeLookAwayYaw = 0.f;
377 mEyeLookAwayPitch = 0.f; 377 mEyeLookAwayPitch = 0.f;
378 mEyeLookAwayTime = EYE_LOOK_AWAY_MIN_TIME + frand(EYE_LOOK_AWAY_MAX_TIME - EYE_LOOK_AWAY_MIN_TIME); 378 mEyeLookAwayTime = EYE_LOOK_AWAY_MIN_TIME + ll_frand(EYE_LOOK_AWAY_MAX_TIME - EYE_LOOK_AWAY_MIN_TIME);
379 } 379 }
380 } 380 }
381 381
@@ -414,7 +414,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
414 if (rightEyeBlinkMorph == 0.f) 414 if (rightEyeBlinkMorph == 0.f)
415 { 415 {
416 mEyesClosed = FALSE; 416 mEyesClosed = FALSE;
417 mEyeBlinkTime = EYE_BLINK_MIN_TIME + frand(EYE_BLINK_MAX_TIME - EYE_BLINK_MIN_TIME); 417 mEyeBlinkTime = EYE_BLINK_MIN_TIME + ll_frand(EYE_BLINK_MAX_TIME - EYE_BLINK_MIN_TIME);
418 mEyeBlinkTimer.reset(); 418 mEyeBlinkTimer.reset();
419 } 419 }
420 } 420 }