aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
3 files changed, 29 insertions, 15 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 663d0ef..74f18bf 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -356,7 +356,7 @@ namespace OpenSim.Framework
356 public string ActiveGroupName; 356 public string ActiveGroupName;
357 public string ActiveGroupTitle = null; 357 public string ActiveGroupTitle = null;
358 public UUID agentCOF; 358 public UUID agentCOF;
359 public bool isCrossingUpdate; 359 public byte CrossingFlags;
360 360
361 public AgentGroupData[] Groups; 361 public AgentGroupData[] Groups;
362 public Dictionary<ulong, string> ChildrenCapSeeds = null; 362 public Dictionary<ulong, string> ChildrenCapSeeds = null;
@@ -365,7 +365,6 @@ namespace OpenSim.Framework
365 public Animation AnimState = null; 365 public Animation AnimState = null;
366 public Byte MotionState = 0; 366 public Byte MotionState = 0;
367 367
368 public UUID GranterID;
369 public UUID ParentPart; 368 public UUID ParentPart;
370 public Vector3 SitOffset; 369 public Vector3 SitOffset;
371 370
@@ -430,7 +429,7 @@ namespace OpenSim.Framework
430 args["agent_access"] = OSD.FromString(AgentAccess.ToString()); 429 args["agent_access"] = OSD.FromString(AgentAccess.ToString());
431 430
432 args["agent_cof"] = OSD.FromUUID(agentCOF); 431 args["agent_cof"] = OSD.FromUUID(agentCOF);
433 args["crossingupdate"] = OSD.FromBoolean(isCrossingUpdate); 432 args["crossingflags"] = OSD.FromInteger(CrossingFlags);
434 433
435 args["active_group_id"] = OSD.FromUUID(ActiveGroupID); 434 args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
436 args["active_group_name"] = OSD.FromString(ActiveGroupName); 435 args["active_group_name"] = OSD.FromString(ActiveGroupName);
@@ -625,8 +624,8 @@ namespace OpenSim.Framework
625 if (args.ContainsKey("agent_cof") && args["agent_cof"] != null) 624 if (args.ContainsKey("agent_cof") && args["agent_cof"] != null)
626 agentCOF = args["agent_cof"].AsUUID(); 625 agentCOF = args["agent_cof"].AsUUID();
627 626
628 if (args.ContainsKey("crossingupdate") && args["crossingupdate"] != null) 627 if (args.ContainsKey("crossingflags") && args["crossingflags"] != null)
629 isCrossingUpdate = args["crossingupdate"].AsBoolean(); 628 CrossingFlags = (byte)args["crossingflags"].AsInteger();
630 629
631 if (args.ContainsKey("active_group_id") && args["active_group_id"] != null) 630 if (args.ContainsKey("active_group_id") && args["active_group_id"] != null)
632 ActiveGroupID = args["active_group_id"].AsUUID(); 631 ActiveGroupID = args["active_group_id"].AsUUID();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index d556fd1..a52c0d6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -346,9 +346,6 @@ namespace OpenSim.Region.Framework.Scenes
346 get { return RootPart.VolumeDetectActive; } 346 get { return RootPart.VolumeDetectActive; }
347 } 347 }
348 348
349 private Vector3 lastPhysGroupPos;
350 private Quaternion lastPhysGroupRot;
351
352 /// <summary> 349 /// <summary>
353 /// Is this entity set to be saved in persistent storage? 350 /// Is this entity set to be saved in persistent storage?
354 /// </summary> 351 /// </summary>
@@ -702,10 +699,23 @@ namespace OpenSim.Region.Framework.Scenes
702 699
703 foreach (ScenePresence av in sog.m_sittingAvatars) 700 foreach (ScenePresence av in sog.m_sittingAvatars)
704 { 701 {
702 byte cflags = 1;
703
705 avtocrossInfo avinfo = new avtocrossInfo(); 704 avtocrossInfo avinfo = new avtocrossInfo();
706 SceneObjectPart parentPart = sogScene.GetSceneObjectPart(av.ParentID); 705 SceneObjectPart parentPart = sogScene.GetSceneObjectPart(av.ParentID);
707 if (parentPart != null) 706 if (parentPart != null)
707 {
708 av.ParentUUID = parentPart.UUID; 708 av.ParentUUID = parentPart.UUID;
709 if(parentPart.SitTargetAvatar == av.UUID)
710 cflags = 7; // low 3 bits set
711 else
712 cflags = 3;
713 }
714
715 // 1 is crossing
716 // 2 is sitting
717 // 4 is sitting at sittarget
718 av.crossingFlags = cflags;
709 719
710 avinfo.av = av; 720 avinfo.av = av;
711 avinfo.ParentID = av.ParentID; 721 avinfo.ParentID = av.ParentID;
@@ -750,7 +760,7 @@ namespace OpenSim.Region.Framework.Scenes
750 av.ParentUUID = UUID.Zero; 760 av.ParentUUID = UUID.Zero;
751 // In any case 761 // In any case
752 av.IsInTransit = false; 762 av.IsInTransit = false;
753 763 av.crossingFlags = 0;
754 m_log.DebugFormat("[SCENE OBJECT]: Crossing agent {0} {1} completed.", av.Firstname, av.Lastname); 764 m_log.DebugFormat("[SCENE OBJECT]: Crossing agent {0} {1} completed.", av.Firstname, av.Lastname);
755 } 765 }
756 else 766 else
@@ -768,6 +778,7 @@ namespace OpenSim.Region.Framework.Scenes
768 ScenePresence av = avinfo.av; 778 ScenePresence av = avinfo.av;
769 av.ParentUUID = UUID.Zero; 779 av.ParentUUID = UUID.Zero;
770 av.ParentID = avinfo.ParentID; 780 av.ParentID = avinfo.ParentID;
781 av.crossingFlags = 0;
771 } 782 }
772 } 783 }
773 avsToCross.Clear(); 784 avsToCross.Clear();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c375450..3167282 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -570,6 +570,7 @@ namespace OpenSim.Region.Framework.Scenes
570 570
571 public bool haveGroupInformation; 571 public bool haveGroupInformation;
572 public bool gotCrossUpdate; 572 public bool gotCrossUpdate;
573 public byte crossingFlags;
573 574
574 public string Grouptitle 575 public string Grouptitle
575 { 576 {
@@ -1231,8 +1232,10 @@ namespace OpenSim.Region.Framework.Scenes
1231 else 1232 else
1232 { 1233 {
1233 part.AddSittingAvatar(this); 1234 part.AddSittingAvatar(this);
1234 if (part.SitTargetPosition != Vector3.Zero) 1235 // if not actually on the target invalidate it
1235 part.SitTargetAvatar = UUID; 1236 if(gotCrossUpdate && (crossingFlags & 0x04) == 0)
1237 part.SitTargetAvatar = UUID.Zero;
1238
1236 ParentID = part.LocalId; 1239 ParentID = part.LocalId;
1237 ParentPart = part; 1240 ParentPart = part;
1238 m_pos = PrevSitOffset; 1241 m_pos = PrevSitOffset;
@@ -1505,6 +1508,7 @@ namespace OpenSim.Region.Framework.Scenes
1505 { 1508 {
1506 haveGroupInformation = false; 1509 haveGroupInformation = false;
1507 gotCrossUpdate = false; 1510 gotCrossUpdate = false;
1511 crossingFlags = 0;
1508 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; 1512 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd;
1509 1513
1510 RegionHandle = newRegionHandle; 1514 RegionHandle = newRegionHandle;
@@ -2212,6 +2216,7 @@ namespace OpenSim.Region.Framework.Scenes
2212 2216
2213 haveGroupInformation = true; 2217 haveGroupInformation = true;
2214 gotCrossUpdate = false; 2218 gotCrossUpdate = false;
2219 crossingFlags = 0;
2215 2220
2216 m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd; 2221 m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd;
2217 2222
@@ -4552,11 +4557,10 @@ namespace OpenSim.Region.Framework.Scenes
4552 if (Scene.AttachmentsModule != null) 4557 if (Scene.AttachmentsModule != null)
4553 Scene.AttachmentsModule.CopyAttachments(this, cAgent); 4558 Scene.AttachmentsModule.CopyAttachments(this, cAgent);
4554 4559
4555 cAgent.isCrossingUpdate = isCrossUpdate; 4560 cAgent.CrossingFlags = isCrossUpdate ? crossingFlags : (byte)0;
4556 4561
4557 if(isCrossUpdate && haveGroupInformation) 4562 if(isCrossUpdate && haveGroupInformation)
4558 { 4563 {
4559
4560 cAgent.agentCOF = COF; 4564 cAgent.agentCOF = COF;
4561 cAgent.ActiveGroupID = ControllingClient.ActiveGroupId; 4565 cAgent.ActiveGroupID = ControllingClient.ActiveGroupId;
4562 cAgent.ActiveGroupName = ControllingClient.ActiveGroupName; 4566 cAgent.ActiveGroupName = ControllingClient.ActiveGroupName;
@@ -4705,8 +4709,8 @@ namespace OpenSim.Region.Framework.Scenes
4705 } 4709 }
4706 } 4710 }
4707 4711
4708 gotCrossUpdate = cAgent.isCrossingUpdate; 4712 crossingFlags = cAgent.CrossingFlags;
4709 4713 gotCrossUpdate = (crossingFlags != 0);
4710 4714
4711 lock (m_originRegionIDAccessLock) 4715 lock (m_originRegionIDAccessLock)
4712 m_originRegionID = cAgent.RegionID; 4716 m_originRegionID = cAgent.RegionID;