aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ChildAgentDataUpdate.cs
diff options
context:
space:
mode:
authorMelanie Thielker2015-11-01 19:11:14 +0100
committerMelanie Thielker2015-11-01 19:11:14 +0100
commit69585a4824a7814bbe543d624de6c3627e0b927b (patch)
tree5d4bb6480906000f019c0d456939b24f5dfd8ab4 /OpenSim/Framework/ChildAgentDataUpdate.cs
parentMerge branch 'master' into avinationmerge (diff)
downloadopensim-SC-69585a4824a7814bbe543d624de6c3627e0b927b.zip
opensim-SC-69585a4824a7814bbe543d624de6c3627e0b927b.tar.gz
opensim-SC-69585a4824a7814bbe543d624de6c3627e0b927b.tar.bz2
opensim-SC-69585a4824a7814bbe543d624de6c3627e0b927b.tar.xz
More plumbing of the EntityTransferContext (not yet complete)
Diffstat (limited to 'OpenSim/Framework/ChildAgentDataUpdate.cs')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs28
1 files changed, 17 insertions, 11 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index a714d86..2fce155 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Framework
61 { 61 {
62 UUID AgentID { get; set; } 62 UUID AgentID { get; set; }
63 63
64 OSDMap Pack(); 64 OSDMap Pack(Object parms = null);
65 void Unpack(OSDMap map, IScene scene); 65 void Unpack(OSDMap map, IScene scene);
66 } 66 }
67 67
@@ -96,7 +96,7 @@ namespace OpenSim.Framework
96 96
97 public Dictionary<ulong, string> ChildrenCapSeeds = null; 97 public Dictionary<ulong, string> ChildrenCapSeeds = null;
98 98
99 public OSDMap Pack() 99 public OSDMap Pack(Object parms = null)
100 { 100 {
101 OSDMap args = new OSDMap(); 101 OSDMap args = new OSDMap();
102 args["message_type"] = OSD.FromString("AgentPosition"); 102 args["message_type"] = OSD.FromString("AgentPosition");
@@ -391,8 +391,18 @@ namespace OpenSim.Framework
391 391
392 public Dictionary<string, UUID> MovementAnimationOverRides = new Dictionary<string, UUID>(); 392 public Dictionary<string, UUID> MovementAnimationOverRides = new Dictionary<string, UUID>();
393 393
394 public virtual OSDMap Pack() 394 public virtual OSDMap Pack(Object parms = null)
395 { 395 {
396 int wearablesCount = -1;
397
398 if (parms != null)
399 {
400 Hashtable p = (Hashtable)parms;
401
402 if (p.ContainsKey("wearablesCount"))
403 wearablesCount = (int)p["wearablesCount"];
404 }
405
396// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); 406// m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
397 407
398 OSDMap args = new OSDMap(); 408 OSDMap args = new OSDMap();
@@ -493,7 +503,7 @@ namespace OpenSim.Framework
493 } 503 }
494 504
495 if (Appearance != null) 505 if (Appearance != null)
496 args["packed_appearance"] = Appearance.Pack(); 506 args["packed_appearance"] = Appearance.Pack(wearablesCount);
497 507
498 //if ((AgentTextures != null) && (AgentTextures.Length > 0)) 508 //if ((AgentTextures != null) && (AgentTextures.Length > 0))
499 //{ 509 //{
@@ -800,11 +810,7 @@ namespace OpenSim.Framework
800 { 810 {
801 OSDArray wears = (OSDArray)(args["wearables"]); 811 OSDArray wears = (OSDArray)(args["wearables"]);
802 812
803 int count = wears.Count; 813 for (int i = 0; i < wears.Count / 2; i++)
804 if (count > AvatarWearable.MAX_WEARABLES)
805 count = AvatarWearable.MAX_WEARABLES;
806
807 for (int i = 0; i < count / 2; i++)
808 { 814 {
809 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]); 815 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
810 Appearance.SetWearable(i, awear); 816 Appearance.SetWearable(i, awear);
@@ -897,9 +903,9 @@ namespace OpenSim.Framework
897 903
898 public class CompleteAgentData : AgentData 904 public class CompleteAgentData : AgentData
899 { 905 {
900 public override OSDMap Pack() 906 public override OSDMap Pack(object parms = null)
901 { 907 {
902 return base.Pack(); 908 return base.Pack(parms);
903 } 909 }
904 910
905 public override void Unpack(OSDMap map, IScene scene) 911 public override void Unpack(OSDMap map, IScene scene)