aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorUbitUmarov2016-07-26 21:39:47 +0100
committerUbitUmarov2016-07-26 21:39:47 +0100
commit52decfcc16bab0332798745d59c43277f1c034b6 (patch)
treea07e3791dbf9309e010e59de725b4242d2de1079 /OpenSim/Framework
parent add a public SetGroupPowers to clientView (diff)
downloadopensim-SC_OLD-52decfcc16bab0332798745d59c43277f1c034b6.zip
opensim-SC_OLD-52decfcc16bab0332798745d59c43277f1c034b6.tar.gz
opensim-SC_OLD-52decfcc16bab0332798745d59c43277f1c034b6.tar.bz2
opensim-SC_OLD-52decfcc16bab0332798745d59c43277f1c034b6.tar.xz
reduce some grid services calls on region crossings, sending more information on the agent update ( groups v2 needs change )
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs78
1 files changed, 25 insertions, 53 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 72c2c34..663d0ef 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -353,6 +353,10 @@ namespace OpenSim.Framework
353 public UUID PreyAgent; 353 public UUID PreyAgent;
354 public Byte AgentAccess; 354 public Byte AgentAccess;
355 public UUID ActiveGroupID; 355 public UUID ActiveGroupID;
356 public string ActiveGroupName;
357 public string ActiveGroupTitle = null;
358 public UUID agentCOF;
359 public bool isCrossingUpdate;
356 360
357 public AgentGroupData[] Groups; 361 public AgentGroupData[] Groups;
358 public Dictionary<ulong, string> ChildrenCapSeeds = null; 362 public Dictionary<ulong, string> ChildrenCapSeeds = null;
@@ -374,12 +378,6 @@ namespace OpenSim.Framework
374 MethodBase.GetCurrentMethod().DeclaringType); 378 MethodBase.GetCurrentMethod().DeclaringType);
375// DEBUG OFF 379// DEBUG OFF
376 380
377/*
378 public byte[] AgentTextures;
379 public byte[] VisualParams;
380 public UUID[] Wearables;
381 public AvatarAttachment[] Attachments;
382*/
383 // Scripted 381 // Scripted
384 public ControllerData[] Controllers; 382 public ControllerData[] Controllers;
385 383
@@ -393,8 +391,6 @@ namespace OpenSim.Framework
393 391
394 public virtual OSDMap Pack(EntityTransferContext ctx) 392 public virtual OSDMap Pack(EntityTransferContext ctx)
395 { 393 {
396 int wearablesCount = -1;
397
398// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); 394// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
399 395
400 OSDMap args = new OSDMap(); 396 OSDMap args = new OSDMap();
@@ -433,8 +429,14 @@ namespace OpenSim.Framework
433 args["prey_agent"] = OSD.FromUUID(PreyAgent); 429 args["prey_agent"] = OSD.FromUUID(PreyAgent);
434 args["agent_access"] = OSD.FromString(AgentAccess.ToString()); 430 args["agent_access"] = OSD.FromString(AgentAccess.ToString());
435 431
432 args["agent_cof"] = OSD.FromUUID(agentCOF);
433 args["crossingupdate"] = OSD.FromBoolean(isCrossingUpdate);
434
436 args["active_group_id"] = OSD.FromUUID(ActiveGroupID); 435 args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
437 436 args["active_group_name"] = OSD.FromString(ActiveGroupName);
437 if(ActiveGroupTitle != null)
438 args["active_group_title"] = OSD.FromString(ActiveGroupTitle);
439
438 if ((Groups != null) && (Groups.Length > 0)) 440 if ((Groups != null) && (Groups.Length > 0))
439 { 441 {
440 OSDArray groups = new OSDArray(Groups.Length); 442 OSDArray groups = new OSDArray(Groups.Length);
@@ -497,48 +499,6 @@ namespace OpenSim.Framework
497 if (Appearance != null) 499 if (Appearance != null)
498 args["packed_appearance"] = Appearance.Pack(ctx); 500 args["packed_appearance"] = Appearance.Pack(ctx);
499 501
500 //if ((AgentTextures != null) && (AgentTextures.Length > 0))
501 //{
502 // OSDArray textures = new OSDArray(AgentTextures.Length);
503 // foreach (UUID uuid in AgentTextures)
504 // textures.Add(OSD.FromUUID(uuid));
505 // args["agent_textures"] = textures;
506 //}
507
508 // The code to pack textures, visuals, wearables and attachments
509 // should be removed; packed appearance contains the full appearance
510 // This is retained for backward compatibility only
511
512/* then lets remove
513 if (Appearance.Texture != null)
514 {
515 byte[] rawtextures = Appearance.Texture.GetBytes();
516 args["texture_entry"] = OSD.FromBinary(rawtextures);
517 }
518
519 if ((Appearance.VisualParams != null) && (Appearance.VisualParams.Length > 0))
520 args["visual_params"] = OSD.FromBinary(Appearance.VisualParams);
521
522 // We might not pass this in all cases...
523 if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
524 {
525 OSDArray wears = new OSDArray(Appearance.Wearables.Length);
526 foreach (AvatarWearable awear in Appearance.Wearables)
527 wears.Add(awear.Pack());
528
529 args["wearables"] = wears;
530 }
531
532 List<AvatarAttachment> attachments = Appearance.GetAttachments();
533 if ((attachments != null) && (attachments.Count > 0))
534 {
535 OSDArray attachs = new OSDArray(attachments.Count);
536 foreach (AvatarAttachment att in attachments)
537 attachs.Add(att.Pack());
538 args["attachments"] = attachs;
539 }
540 // End of code to remove
541*/
542 if ((Controllers != null) && (Controllers.Length > 0)) 502 if ((Controllers != null) && (Controllers.Length > 0))
543 { 503 {
544 OSDArray controls = new OSDArray(Controllers.Length); 504 OSDArray controls = new OSDArray(Controllers.Length);
@@ -662,10 +622,22 @@ namespace OpenSim.Framework
662 if (args["agent_access"] != null) 622 if (args["agent_access"] != null)
663 Byte.TryParse(args["agent_access"].AsString(), out AgentAccess); 623 Byte.TryParse(args["agent_access"].AsString(), out AgentAccess);
664 624
665 if (args["active_group_id"] != null) 625 if (args.ContainsKey("agent_cof") && args["agent_cof"] != null)
626 agentCOF = args["agent_cof"].AsUUID();
627
628 if (args.ContainsKey("crossingupdate") && args["crossingupdate"] != null)
629 isCrossingUpdate = args["crossingupdate"].AsBoolean();
630
631 if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
666 ActiveGroupID = args["active_group_id"].AsUUID(); 632 ActiveGroupID = args["active_group_id"].AsUUID();
667 633
668 if ((args["groups"] != null) && (args["groups"]).Type == OSDType.Array) 634 if (args.ContainsKey("active_group_name") && args["active_group_name"] != null)
635 ActiveGroupName = args["active_group_name"].AsString();
636
637 if(args.ContainsKey("active_group_title") && args["active_group_title"] != null)
638 ActiveGroupTitle = args["active_group_title"].AsString();
639
640 if (args.ContainsKey("groups") && (args["groups"] != null) && (args["groups"]).Type == OSDType.Array)
669 { 641 {
670 OSDArray groups = (OSDArray)(args["groups"]); 642 OSDArray groups = (OSDArray)(args["groups"]);
671 Groups = new AgentGroupData[groups.Count]; 643 Groups = new AgentGroupData[groups.Count];