diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 79 |
1 files changed, 25 insertions, 54 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 72c2c34..74f18bf 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 byte CrossingFlags; | ||
356 | 360 | ||
357 | public AgentGroupData[] Groups; | 361 | public AgentGroupData[] Groups; |
358 | public Dictionary<ulong, string> ChildrenCapSeeds = null; | 362 | public Dictionary<ulong, string> ChildrenCapSeeds = null; |
@@ -361,7 +365,6 @@ namespace OpenSim.Framework | |||
361 | public Animation AnimState = null; | 365 | public Animation AnimState = null; |
362 | public Byte MotionState = 0; | 366 | public Byte MotionState = 0; |
363 | 367 | ||
364 | public UUID GranterID; | ||
365 | public UUID ParentPart; | 368 | public UUID ParentPart; |
366 | public Vector3 SitOffset; | 369 | public Vector3 SitOffset; |
367 | 370 | ||
@@ -374,12 +377,6 @@ namespace OpenSim.Framework | |||
374 | MethodBase.GetCurrentMethod().DeclaringType); | 377 | MethodBase.GetCurrentMethod().DeclaringType); |
375 | // DEBUG OFF | 378 | // DEBUG OFF |
376 | 379 | ||
377 | /* | ||
378 | public byte[] AgentTextures; | ||
379 | public byte[] VisualParams; | ||
380 | public UUID[] Wearables; | ||
381 | public AvatarAttachment[] Attachments; | ||
382 | */ | ||
383 | // Scripted | 380 | // Scripted |
384 | public ControllerData[] Controllers; | 381 | public ControllerData[] Controllers; |
385 | 382 | ||
@@ -393,8 +390,6 @@ namespace OpenSim.Framework | |||
393 | 390 | ||
394 | public virtual OSDMap Pack(EntityTransferContext ctx) | 391 | public virtual OSDMap Pack(EntityTransferContext ctx) |
395 | { | 392 | { |
396 | int wearablesCount = -1; | ||
397 | |||
398 | // m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); | 393 | // m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); |
399 | 394 | ||
400 | OSDMap args = new OSDMap(); | 395 | OSDMap args = new OSDMap(); |
@@ -433,8 +428,14 @@ namespace OpenSim.Framework | |||
433 | args["prey_agent"] = OSD.FromUUID(PreyAgent); | 428 | args["prey_agent"] = OSD.FromUUID(PreyAgent); |
434 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); | 429 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); |
435 | 430 | ||
431 | args["agent_cof"] = OSD.FromUUID(agentCOF); | ||
432 | args["crossingflags"] = OSD.FromInteger(CrossingFlags); | ||
433 | |||
436 | args["active_group_id"] = OSD.FromUUID(ActiveGroupID); | 434 | args["active_group_id"] = OSD.FromUUID(ActiveGroupID); |
437 | 435 | args["active_group_name"] = OSD.FromString(ActiveGroupName); | |
436 | if(ActiveGroupTitle != null) | ||
437 | args["active_group_title"] = OSD.FromString(ActiveGroupTitle); | ||
438 | |||
438 | if ((Groups != null) && (Groups.Length > 0)) | 439 | if ((Groups != null) && (Groups.Length > 0)) |
439 | { | 440 | { |
440 | OSDArray groups = new OSDArray(Groups.Length); | 441 | OSDArray groups = new OSDArray(Groups.Length); |
@@ -497,48 +498,6 @@ namespace OpenSim.Framework | |||
497 | if (Appearance != null) | 498 | if (Appearance != null) |
498 | args["packed_appearance"] = Appearance.Pack(ctx); | 499 | args["packed_appearance"] = Appearance.Pack(ctx); |
499 | 500 | ||
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)) | 501 | if ((Controllers != null) && (Controllers.Length > 0)) |
543 | { | 502 | { |
544 | OSDArray controls = new OSDArray(Controllers.Length); | 503 | OSDArray controls = new OSDArray(Controllers.Length); |
@@ -662,10 +621,22 @@ namespace OpenSim.Framework | |||
662 | if (args["agent_access"] != null) | 621 | if (args["agent_access"] != null) |
663 | Byte.TryParse(args["agent_access"].AsString(), out AgentAccess); | 622 | Byte.TryParse(args["agent_access"].AsString(), out AgentAccess); |
664 | 623 | ||
665 | if (args["active_group_id"] != null) | 624 | if (args.ContainsKey("agent_cof") && args["agent_cof"] != null) |
625 | agentCOF = args["agent_cof"].AsUUID(); | ||
626 | |||
627 | if (args.ContainsKey("crossingflags") && args["crossingflags"] != null) | ||
628 | CrossingFlags = (byte)args["crossingflags"].AsInteger(); | ||
629 | |||
630 | if (args.ContainsKey("active_group_id") && args["active_group_id"] != null) | ||
666 | ActiveGroupID = args["active_group_id"].AsUUID(); | 631 | ActiveGroupID = args["active_group_id"].AsUUID(); |
667 | 632 | ||
668 | if ((args["groups"] != null) && (args["groups"]).Type == OSDType.Array) | 633 | if (args.ContainsKey("active_group_name") && args["active_group_name"] != null) |
634 | ActiveGroupName = args["active_group_name"].AsString(); | ||
635 | |||
636 | if(args.ContainsKey("active_group_title") && args["active_group_title"] != null) | ||
637 | ActiveGroupTitle = args["active_group_title"].AsString(); | ||
638 | |||
639 | if (args.ContainsKey("groups") && (args["groups"] != null) && (args["groups"]).Type == OSDType.Array) | ||
669 | { | 640 | { |
670 | OSDArray groups = (OSDArray)(args["groups"]); | 641 | OSDArray groups = (OSDArray)(args["groups"]); |
671 | Groups = new AgentGroupData[groups.Count]; | 642 | Groups = new AgentGroupData[groups.Count]; |