diff options
author | Ricky Curtice <kf6kjg+hg@gmail.com> | 2011-03-12 23:39:10 -0800 |
---|---|---|
committer | Ricky Curtice <kf6kjg+hg@gmail.com> | 2011-03-12 23:39:10 -0800 |
commit | 9bac314ba0d8b6bd35c8d2e27ce99a28b924dea6 (patch) | |
tree | 313a2608ab5049ac26bc81f0110e47324c8146fb /indra/newview/llviewermessage.cpp | |
parent | d4d292258e31eee6d639106147758f39deae63e3 (diff) |
Switched to using *_SQUARED constants instead of multiplied constants, and cleaned up a few other minor issues noted during review.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 947408f125..4dd5a3f6f1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -122,6 +122,7 @@ // const F32 BIRD_AUDIBLE_RADIUS = 32.0f; const F32 SIT_DISTANCE_FROM_TARGET = 0.25f; +const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f; static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting. // Determine how quickly residents' scripts can issue question dialogs @@ -4748,7 +4749,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) BOOL force_mouselook; mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook); - if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > 0.0001f) + if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > CAMERA_POSITION_THRESHOLD_SQUARED) { gAgentCamera.setSitCamera(sitObjectID, camera_eye, camera_at); } |