summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-10-27 15:10:26 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-10-27 15:10:26 +0100
commitc025939e42d4c26054ff4a6eeded4b7849c74070 (patch)
tree08855a8ede4ec12e3a66aa797ad60b98ff608639 /indra/newview/llviewermessage.cpp
parent96bc66a55778d25fa36ca42092f0ce3ca57bb3ce (diff)
MAINT-7857 - shadow fix for animated objects.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 70202e4bc6..fad59aadf4 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5075,6 +5075,18 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
}
}
+// AXON Move to llviewerobject
+void recursiveMarkForUpdate(LLViewerObject *vobj, BOOL priority)
+{
+ for (LLViewerObject::child_list_t::const_iterator iter = vobj->getChildren().begin();
+ iter != vobj->getChildren().end(); iter++)
+ {
+ LLViewerObject* child = (LLViewerObject*)*iter;
+ child->markForUpdate(priority);
+ }
+ vobj->markForUpdate(priority);
+}
+
void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
{
LLUUID animation_id;
@@ -5113,11 +5125,32 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data)
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList);
LL_DEBUGS("AXON") << "handle object animation here, num_blocks " << num_blocks << LL_ENDL;
+#if 1
if (!avatarp->mPlaying)
{
avatarp->mPlaying = true;
avatarp->updateVolumeGeom();
+ recursiveMarkForUpdate(avatarp->mRootVolp,TRUE);
}
+#else
+ if (num_blocks > 0 && !avatarp->mPlaying)
+ {
+ avatarp->mPlaying = true;
+ avatarp->updateVolumeGeom();
+ // AXON FIXME need to update all objects in the linkset, not just the one where animation is playing
+ recursiveMarkForUpdate(avatarp->mRootVolp,TRUE);
+ }
+ else if (num_blocks == 0 && avatarp->mPlaying)
+ {
+ // AXON this will cause meshes to go back to static when no
+ // animations are signalled. Probably don't want to leave this
+ // way but helpful for testing.
+ avatarp->mPlaying = false;
+ avatarp->updateVolumeGeom();
+ // AXON FIXME need to update all objects in the linkset, not just the one where animation is playing
+ recursiveMarkForUpdate(avatarp->mRootVolp,TRUE);
+ }
+#endif
volp->mObjectSignaledAnimations.clear();