aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ChildAgentDataUpdate.cs
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Framework/ChildAgentDataUpdate.cs
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Framework/ChildAgentDataUpdate.cs')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs60
1 files changed, 49 insertions, 11 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index dfe60aa..1504f21 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -171,9 +171,10 @@ namespace OpenSim.Framework
171 /// Soon to be decommissioned 171 /// Soon to be decommissioned
172 /// </summary> 172 /// </summary>
173 /// <param name="cAgent"></param> 173 /// <param name="cAgent"></param>
174 public void CopyFrom(ChildAgentDataUpdate cAgent) 174 public void CopyFrom(ChildAgentDataUpdate cAgent, UUID sid)
175 { 175 {
176 AgentID = new UUID(cAgent.AgentID); 176 AgentID = new UUID(cAgent.AgentID);
177 SessionID = sid;
177 178
178 // next: ??? 179 // next: ???
179 Size = new Vector3(); 180 Size = new Vector3();
@@ -229,12 +230,14 @@ namespace OpenSim.Framework
229 230
230 public class ControllerData 231 public class ControllerData
231 { 232 {
233 public UUID ObjectID;
232 public UUID ItemID; 234 public UUID ItemID;
233 public uint IgnoreControls; 235 public uint IgnoreControls;
234 public uint EventControls; 236 public uint EventControls;
235 237
236 public ControllerData(UUID item, uint ignore, uint ev) 238 public ControllerData(UUID obj, UUID item, uint ignore, uint ev)
237 { 239 {
240 ObjectID = obj;
238 ItemID = item; 241 ItemID = item;
239 IgnoreControls = ignore; 242 IgnoreControls = ignore;
240 EventControls = ev; 243 EventControls = ev;
@@ -248,6 +251,7 @@ namespace OpenSim.Framework
248 public OSDMap PackUpdateMessage() 251 public OSDMap PackUpdateMessage()
249 { 252 {
250 OSDMap controldata = new OSDMap(); 253 OSDMap controldata = new OSDMap();
254 controldata["object"] = OSD.FromUUID(ObjectID);
251 controldata["item"] = OSD.FromUUID(ItemID); 255 controldata["item"] = OSD.FromUUID(ItemID);
252 controldata["ignore"] = OSD.FromInteger(IgnoreControls); 256 controldata["ignore"] = OSD.FromInteger(IgnoreControls);
253 controldata["event"] = OSD.FromInteger(EventControls); 257 controldata["event"] = OSD.FromInteger(EventControls);
@@ -258,6 +262,8 @@ namespace OpenSim.Framework
258 262
259 public void UnpackUpdateMessage(OSDMap args) 263 public void UnpackUpdateMessage(OSDMap args)
260 { 264 {
265 if (args["object"] != null)
266 ObjectID = args["object"].AsUUID();
261 if (args["item"] != null) 267 if (args["item"] != null)
262 ItemID = args["item"].AsUUID(); 268 ItemID = args["item"].AsUUID();
263 if (args["ignore"] != null) 269 if (args["ignore"] != null)
@@ -286,7 +292,13 @@ namespace OpenSim.Framework
286 public Vector3 AtAxis; 292 public Vector3 AtAxis;
287 public Vector3 LeftAxis; 293 public Vector3 LeftAxis;
288 public Vector3 UpAxis; 294 public Vector3 UpAxis;
289 public bool ChangedGrid; 295
296 /// <summary>
297 /// Signal on a V2 teleport that Scene.IncomingChildAgentDataUpdate(AgentData ad) should wait for the
298 /// scene presence to become root (triggered when the viewer sends a CompleteAgentMovement UDP packet after
299 /// establishing the connection triggered by it's receipt of a TeleportFinish EQ message).
300 /// </summary>
301 public bool SenderWantsToWaitForRoot;
290 302
291 public float Far; 303 public float Far;
292 public float Aspect; 304 public float Aspect;
@@ -310,6 +322,8 @@ namespace OpenSim.Framework
310 public Animation AnimState = null; 322 public Animation AnimState = null;
311 323
312 public UUID GranterID; 324 public UUID GranterID;
325 public UUID ParentPart;
326 public Vector3 SitOffset;
313 327
314 // Appearance 328 // Appearance
315 public AvatarAppearance Appearance; 329 public AvatarAppearance Appearance;
@@ -355,8 +369,9 @@ namespace OpenSim.Framework
355 args["left_axis"] = OSD.FromString(LeftAxis.ToString()); 369 args["left_axis"] = OSD.FromString(LeftAxis.ToString());
356 args["up_axis"] = OSD.FromString(UpAxis.ToString()); 370 args["up_axis"] = OSD.FromString(UpAxis.ToString());
357 371
358 372 //backwards compatibility
359 args["changed_grid"] = OSD.FromBoolean(ChangedGrid); 373 args["changed_grid"] = OSD.FromBoolean(SenderWantsToWaitForRoot);
374 args["wait_for_root"] = OSD.FromBoolean(SenderWantsToWaitForRoot);
360 args["far"] = OSD.FromReal(Far); 375 args["far"] = OSD.FromReal(Far);
361 args["aspect"] = OSD.FromReal(Aspect); 376 args["aspect"] = OSD.FromReal(Aspect);
362 377
@@ -428,9 +443,18 @@ namespace OpenSim.Framework
428 // We might not pass this in all cases... 443 // We might not pass this in all cases...
429 if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) 444 if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
430 { 445 {
431 OSDArray wears = new OSDArray(Appearance.Wearables.Length); 446 int wearsCount;
432 foreach (AvatarWearable awear in Appearance.Wearables) 447 if(Appearance.PackLegacyWearables)
433 wears.Add(awear.Pack()); 448 wearsCount = AvatarWearable.LEGACY_VERSION_MAX_WEARABLES;
449 else
450 wearsCount = AvatarWearable.MAX_WEARABLES;
451
452 if(wearsCount > Appearance.Wearables.Length)
453 wearsCount = Appearance.Wearables.Length;
454
455 OSDArray wears = new OSDArray(wearsCount);
456 for(int i = 0; i < wearsCount ; i++)
457 wears.Add(Appearance.Wearables[i].Pack());
434 458
435 args["wearables"] = wears; 459 args["wearables"] = wears;
436 } 460 }
@@ -480,6 +504,10 @@ namespace OpenSim.Framework
480 } 504 }
481 args["attach_objects"] = attObjs; 505 args["attach_objects"] = attObjs;
482 } 506 }
507
508 args["parent_part"] = OSD.FromUUID(ParentPart);
509 args["sit_offset"] = OSD.FromString(SitOffset.ToString());
510
483 return args; 511 return args;
484 } 512 }
485 513
@@ -525,8 +553,8 @@ namespace OpenSim.Framework
525 if (args["up_axis"] != null) 553 if (args["up_axis"] != null)
526 Vector3.TryParse(args["up_axis"].AsString(), out AtAxis); 554 Vector3.TryParse(args["up_axis"].AsString(), out AtAxis);
527 555
528 if (args["changed_grid"] != null) 556 if (args.ContainsKey("wait_for_root") && args["wait_for_root"] != null)
529 ChangedGrid = args["changed_grid"].AsBoolean(); 557 SenderWantsToWaitForRoot = args["wait_for_root"].AsBoolean();
530 558
531 if (args["far"] != null) 559 if (args["far"] != null)
532 Far = (float)(args["far"].AsReal()); 560 Far = (float)(args["far"].AsReal());
@@ -646,7 +674,12 @@ namespace OpenSim.Framework
646 if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array) 674 if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
647 { 675 {
648 OSDArray wears = (OSDArray)(args["wearables"]); 676 OSDArray wears = (OSDArray)(args["wearables"]);
649 for (int i = 0; i < wears.Count / 2; i++) 677
678 int count = wears.Count;
679 if (count > AvatarWearable.MAX_WEARABLES)
680 count = AvatarWearable.MAX_WEARABLES;
681
682 for (int i = 0; i < count / 2; i++)
650 { 683 {
651 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]); 684 AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
652 Appearance.SetWearable(i,awear); 685 Appearance.SetWearable(i,awear);
@@ -711,6 +744,11 @@ namespace OpenSim.Framework
711 } 744 }
712 } 745 }
713 } 746 }
747
748 if (args["parent_part"] != null)
749 ParentPart = args["parent_part"].AsUUID();
750 if (args["sit_offset"] != null)
751 Vector3.TryParse(args["sit_offset"].AsString(), out SitOffset);
714 } 752 }
715 753
716 public AgentData() 754 public AgentData()