diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 16 |
2 files changed, 25 insertions, 10 deletions
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; |