aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs63
1 files changed, 37 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9545c13..a5af7e1 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2029,11 +2029,6 @@ namespace OpenSim.Region.Framework.Scenes
2029 m_log.DebugFormat("[CompleteMovement]: Missing COF for {0} is {1}", client.AgentId, COF); 2029 m_log.DebugFormat("[CompleteMovement]: Missing COF for {0} is {1}", client.AgentId, COF);
2030 } 2030 }
2031 2031
2032 // Tell the client that we're totally ready
2033 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
2034
2035 m_log.DebugFormat("[CompleteMovement] MoveAgentIntoRegion: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2036
2037 if (!string.IsNullOrEmpty(m_callbackURI)) 2032 if (!string.IsNullOrEmpty(m_callbackURI))
2038 { 2033 {
2039 // We cannot sleep here since this would hold up the inbound packet processing thread, as 2034 // We cannot sleep here since this would hold up the inbound packet processing thread, as
@@ -2054,6 +2049,7 @@ namespace OpenSim.Region.Framework.Scenes
2054 2049
2055 Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); 2050 Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI);
2056 m_callbackURI = null; 2051 m_callbackURI = null;
2052 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2057 } 2053 }
2058// else 2054// else
2059// { 2055// {
@@ -2062,19 +2058,48 @@ namespace OpenSim.Region.Framework.Scenes
2062// client.Name, client.AgentId, m_scene.RegionInfo.RegionName); 2058// client.Name, client.AgentId, m_scene.RegionInfo.RegionName);
2063// } 2059// }
2064 2060
2065 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2061
2062 // Tell the client that we're totally ready
2063 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
2064 m_log.DebugFormat("[CompleteMovement] MoveAgentIntoRegion: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2065
2066 bool isHGTP = (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0;
2067
2068 int delayctnr = Util.EnvironmentTickCount();
2069
2070 if (!IsChildAgent)
2071 {
2072 // verify baked textures and cache
2073 bool cachedbaked = false;
2074
2075 if (IsNPC)
2076 cachedbaked = true;
2077 else
2078 {
2079 if (m_scene.AvatarFactory != null && !isHGTP)
2080 cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
2081
2082 // not sure we need this
2083 if (!cachedbaked)
2084 {
2085 if (m_scene.AvatarFactory != null)
2086 m_scene.AvatarFactory.QueueAppearanceSave(UUID);
2087 }
2088 }
2089 m_log.DebugFormat("[CompleteMovement] Baked check: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2090 }
2066 2091
2067 if(m_teleportFlags > 0) 2092 if(m_teleportFlags > 0)
2068 { 2093 {
2069 gotCrossUpdate = false; // sanity check 2094 gotCrossUpdate = false; // sanity check
2070 Thread.Sleep(500); // let viewers catch us 2095 if(Util.EnvironmentTickCountSubtract(delayctnr)< 500)
2096 Thread.Sleep(500); // let viewers catch us
2071 } 2097 }
2072 2098
2073 if(!gotCrossUpdate) 2099 if(!gotCrossUpdate)
2074 RotateToLookAt(look); 2100 RotateToLookAt(look);
2075 2101
2076 // HG 2102 // HG
2077 bool isHGTP = (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0;
2078 if(isHGTP) 2103 if(isHGTP)
2079 { 2104 {
2080// ControllingClient.SendNameReply(m_uuid, Firstname, Lastname); 2105// ControllingClient.SendNameReply(m_uuid, Firstname, Lastname);
@@ -2101,24 +2126,6 @@ namespace OpenSim.Region.Framework.Scenes
2101 2126
2102 if (!IsChildAgent) 2127 if (!IsChildAgent)
2103 { 2128 {
2104 // verify baked textures and cache
2105 bool cachedbaked = false;
2106
2107 if (IsNPC)
2108 cachedbaked = true;
2109 else
2110 {
2111 if (m_scene.AvatarFactory != null && !isHGTP)
2112 cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
2113
2114 // not sure we need this
2115 if (!cachedbaked)
2116 {
2117 if (m_scene.AvatarFactory != null)
2118 m_scene.AvatarFactory.QueueAppearanceSave(UUID);
2119 }
2120 }
2121
2122 List<ScenePresence> allpresences = m_scene.GetScenePresences(); 2129 List<ScenePresence> allpresences = m_scene.GetScenePresences();
2123 2130
2124 // send avatar object to all presences including us, so they cross it into region 2131 // send avatar object to all presences including us, so they cross it into region
@@ -3110,6 +3117,7 @@ namespace OpenSim.Region.Framework.Scenes
3110 3117
3111 Vector3 standPos = sitPartWorldPosition + adjustmentForSitPose; 3118 Vector3 standPos = sitPartWorldPosition + adjustmentForSitPose;
3112 m_pos = standPos; 3119 m_pos = standPos;
3120
3113 } 3121 }
3114 3122
3115 // We need to wait until we have calculated proper stand positions before sitting up the physical 3123 // We need to wait until we have calculated proper stand positions before sitting up the physical
@@ -3124,6 +3132,7 @@ namespace OpenSim.Region.Framework.Scenes
3124 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); 3132 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
3125 3133
3126 SendAvatarDataToAllAgents(); 3134 SendAvatarDataToAllAgents();
3135 m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on
3127 } 3136 }
3128 3137
3129 // reset to default sitAnimation 3138 // reset to default sitAnimation
@@ -3256,6 +3265,7 @@ namespace OpenSim.Region.Framework.Scenes
3256 // Moved here to avoid a race with default sit anim 3265 // Moved here to avoid a race with default sit anim
3257 // The script event needs to be raised after the default sit anim is set. 3266 // The script event needs to be raised after the default sit anim is set.
3258 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); 3267 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
3268 m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on
3259 } 3269 }
3260 } 3270 }
3261 3271
@@ -3405,6 +3415,7 @@ namespace OpenSim.Region.Framework.Scenes
3405 3415
3406 Animator.SetMovementAnimations("SIT"); 3416 Animator.SetMovementAnimations("SIT");
3407 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); 3417 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
3418 m_scene.EventManager.TriggerParcelPrimCountTainted(); // update select/ sat on
3408 } 3419 }
3409 3420
3410 public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) 3421 public void HandleAgentSit(IClientAPI remoteClient, UUID agentID)