Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
f8ef8300
Commit
f8ef8300
authored
6 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
MAINT-8554 - encroachment check fix
parent
c65aa5f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llcontrolavatar.cpp
+12
-9
12 additions, 9 deletions
indra/newview/llcontrolavatar.cpp
with
12 additions
and
9 deletions
indra/newview/llcontrolavatar.cpp
+
12
−
9
View file @
f8ef8300
...
@@ -95,7 +95,7 @@ void LLControlAvatar::matchVolumeTransform()
...
@@ -95,7 +95,7 @@ void LLControlAvatar::matchVolumeTransform()
LLVector3
vol_pos
=
mRootVolp
->
getRenderPosition
();
LLVector3
vol_pos
=
mRootVolp
->
getRenderPosition
();
LLVector3
pos_box_offset
;
LLVector3
pos_box_offset
;
pos_
box_offset
.
clear
()
;
LLVector3
box_offset
;
// Fix up position if needed to prevent visual encroachment
// Fix up position if needed to prevent visual encroachment
if
(
box_valid_and_non_zero
(
getLastAnimExtents
()))
// wait for state to settle down
if
(
box_valid_and_non_zero
(
getLastAnimExtents
()))
// wait for state to settle down
...
@@ -116,18 +116,21 @@ void LLControlAvatar::matchVolumeTransform()
...
@@ -116,18 +116,21 @@ void LLControlAvatar::matchVolumeTransform()
if
(
offset_dist
>
MAX_LEGAL_OFFSET
)
if
(
offset_dist
>
MAX_LEGAL_OFFSET
)
{
{
F32
target_dist
=
(
offset_dist
-
MAX_LEGAL_OFFSET
);
F32
target_dist
=
(
offset_dist
-
MAX_LEGAL_OFFSET
);
pos_
box_offset
*
=
target_dist
/
offset_dist
;
box_offset
=
(
target_dist
/
offset_dist
)
*
pos_box_offset
;
}
}
//LL_DEBUGS("FixBox") << getFullname() << " fixup needed for offset "
// << pos_box_offset[0] << "," << pos_box_offset[1] << "," << pos_box_offset[2]
// << " current fixup "
// << mPositionConstraintFixup[0] << "," << mPositionConstraintFixup[1] << "," << mPositionConstraintFixup[2]
// << " dist " << offset_dist << LL_ENDL;
}
}
mPositionConstraintFixup
=
pos_box_offset
;
mPositionConstraintFixup
=
box_offset
;
// Currently if you're doing something like playing an
// animation that moves the pelvis (on an avatar or
// animated object), the name tag and debug text will be
// left behind. Ideally setPosition() would follow the
// skeleton around in a smarter way, so name tags,
// complexity info and such line up better. Should defer
// this until avatars also get fixed.
setPositionAgent
(
vol_pos
);
setPositionAgent
(
vol_pos
+
mPositionConstraintFixup
);
LLQuaternion
obj_rot
=
mRootVolp
->
getRotation
();
LLQuaternion
obj_rot
=
mRootVolp
->
getRotation
();
LLQuaternion
result_rot
=
obj_rot
;
LLQuaternion
result_rot
=
obj_rot
;
setRotation
(
result_rot
);
setRotation
(
result_rot
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment