diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0aeb69a..258ca20 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -534,10 +534,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
534 | // in the sim unless the avatar is on a sit target. While | 534 | // in the sim unless the avatar is on a sit target. While |
535 | // on a sit target, m_pos will contain the desired offset | 535 | // on a sit target, m_pos will contain the desired offset |
536 | // without the parent rotation applied. | 536 | // without the parent rotation applied. |
537 | SceneObjectPart sitPart = ParentPart; | 537 | if (ParentPart != null) |
538 | 538 | { | |
539 | if (sitPart != null) | 539 | SceneObjectPart rootPart = ParentPart.ParentGroup.RootPart; |
540 | return sitPart.AbsolutePosition + (m_pos * sitPart.GetWorldRotation()); | 540 | // if (sitPart != null) |
541 | // return sitPart.AbsolutePosition + (m_pos * sitPart.GetWorldRotation()); | ||
542 | if (rootPart != null) | ||
543 | return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation()); | ||
544 | } | ||
541 | } | 545 | } |
542 | 546 | ||
543 | return m_pos; | 547 | return m_pos; |
@@ -1275,6 +1279,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1275 | 1279 | ||
1276 | m_log.DebugFormat("[SCENE PRESENCE]: Making {0} a child agent in {1}", Name, Scene.RegionInfo.RegionName); | 1280 | m_log.DebugFormat("[SCENE PRESENCE]: Making {0} a child agent in {1}", Name, Scene.RegionInfo.RegionName); |
1277 | 1281 | ||
1282 | // Reset the m_originRegionID as it has dual use as a flag to signal that the UpdateAgent() call orignating | ||
1283 | // from the source simulator has completed on a V2 teleport. | ||
1284 | lock (m_originRegionIDAccessLock) | ||
1285 | m_originRegionID = UUID.Zero; | ||
1286 | |||
1278 | // Reset these so that teleporting in and walking out isn't seen | 1287 | // Reset these so that teleporting in and walking out isn't seen |
1279 | // as teleporting back | 1288 | // as teleporting back |
1280 | TeleportFlags = TeleportFlags.Default; | 1289 | TeleportFlags = TeleportFlags.Default; |
@@ -3853,8 +3862,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3853 | 3862 | ||
3854 | private void CopyFrom(AgentData cAgent) | 3863 | private void CopyFrom(AgentData cAgent) |
3855 | { | 3864 | { |
3856 | lock (m_originRegionIDAccessLock) | ||
3857 | m_originRegionID = cAgent.RegionID; | ||
3858 | 3865 | ||
3859 | m_callbackURI = cAgent.CallbackURI; | 3866 | m_callbackURI = cAgent.CallbackURI; |
3860 | // m_log.DebugFormat( | 3867 | // m_log.DebugFormat( |
@@ -3928,6 +3935,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3928 | 3935 | ||
3929 | if (Scene.AttachmentsModule != null) | 3936 | if (Scene.AttachmentsModule != null) |
3930 | Scene.AttachmentsModule.CopyAttachments(cAgent, this); | 3937 | Scene.AttachmentsModule.CopyAttachments(cAgent, this); |
3938 | |||
3939 | lock (m_originRegionIDAccessLock) | ||
3940 | m_originRegionID = cAgent.RegionID; | ||
3941 | |||
3931 | } | 3942 | } |
3932 | 3943 | ||
3933 | public bool CopyAgent(out IAgentData agent) | 3944 | public bool CopyAgent(out IAgentData agent) |