summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-06-24 18:29:42 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-06-24 18:29:42 +0300
commit4cf53872eb8cc6d5b950da6aec269811cb2de1e3 (patch)
treeac1a90df399f0a81d268bf790c41a6ed3dff7d59
parente94dfafcc7e1e1de270dc62d3db5854500737544 (diff)
MAINT-5026 FIXED 256 prim linksets made of smaller prims frequently link only 254
-rwxr-xr-xindra/newview/llselectmgr.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index fa7674f772..2a107deb19 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -4920,6 +4920,7 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name,
ESendType send_type)
{
LLSelectNode* node;
+ LLSelectNode* linkset_root = NULL;
LLViewerRegion* last_region;
LLViewerRegion* current_region;
@@ -4927,6 +4928,8 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name,
S32 packets_sent = 0;
S32 objects_in_this_packet = 0;
+ bool link_operation = message_name == "ObjectLink";
+
//clear update override data (allow next update through)
struct f : public LLSelectedNodeFunctor
{
@@ -5035,6 +5038,12 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name,
&& (! gMessageSystem->isSendFull(NULL))
&& (objects_in_this_packet < MAX_OBJECTS_PER_PACKET))
{
+ if (link_operation && linkset_root == NULL)
+ {
+ // linksets over 254 will be split into multiple messages,
+ // but we need to provide same root for all messages or we will get separate linksets
+ linkset_root = node;
+ }
// add another instance of the body of the data
(*pack_body)(node, user_data);
++objects_sent;
@@ -5061,6 +5070,22 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name,
gMessageSystem->newMessage(message_name.c_str());
(*pack_header)(user_data);
+ if (linkset_root != NULL)
+ {
+ if (current_region != last_region)
+ {
+ // root should be in one region with the child, reset it
+ linkset_root = NULL;
+ }
+ else
+ {
+ // add root instance into new message
+ (*pack_body)(linkset_root, user_data);
+ ++objects_sent;
+ ++objects_in_this_packet;
+ }
+ }
+
// don't move to the next object, we still need to add the
// body data.
}