Skip to content
Snippets Groups Projects
Commit 60c410b4 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix double call of recursive search function for volume to avatar

parent 59db5c4b
No related branches found
No related tags found
No related merge requests found
...@@ -907,9 +907,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) ...@@ -907,9 +907,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
// MAINT-7926 Handle volumes in an animated object as a special case // MAINT-7926 Handle volumes in an animated object as a special case
// SL-937: add dynamic box handling for rigged mesh on regular avatars. // SL-937: add dynamic box handling for rigged mesh on regular avatars.
//if (volume->getAvatar() && volume->getAvatar()->isControlAvatar()) //if (volume->getAvatar() && volume->getAvatar()->isControlAvatar())
if (volume->getAvatar()) LLVOAvatar* avatarp = volume->getAvatar();
if (avatarp)
{ {
const LLVector3* av_box = volume->getAvatar()->getLastAnimExtents(); const LLVector3* av_box = avatarp->getLastAnimExtents();
LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin(); LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box); LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment