aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorjustincc2010-12-15 00:35:36 +0000
committerjustincc2010-12-15 00:35:36 +0000
commitb643661938881af6fc782d39e52040ed6d16f03f (patch)
tree162e0667718b2f68e5f4e90cd10f30e6fa374cbb /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentreplace ode.dll with one built without asserts turned on (diff)
parentfix mistake in last change of local.include (diff)
downloadopensim-SC-b643661938881af6fc782d39e52040ed6d16f03f.zip
opensim-SC-b643661938881af6fc782d39e52040ed6d16f03f.tar.gz
opensim-SC-b643661938881af6fc782d39e52040ed6d16f03f.tar.bz2
opensim-SC-b643661938881af6fc782d39e52040ed6d16f03f.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs40
1 files changed, 9 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a1c80e5..62d7011 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1703,7 +1703,8 @@ namespace OpenSim.Region.Framework.Scenes
1703 } 1703 }
1704 // Reset sit target. 1704 // Reset sit target.
1705 if (part.GetAvatarOnSitTarget() == UUID) 1705 if (part.GetAvatarOnSitTarget() == UUID)
1706 part.SetAvatarOnSitTarget(UUID.Zero); 1706 part.SitTargetAvatar = UUID.Zero;
1707 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
1707 1708
1708 m_parentPosition = part.GetWorldPosition(); 1709 m_parentPosition = part.GetWorldPosition();
1709 ControllingClient.SendClearFollowCamProperties(part.ParentUUID); 1710 ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
@@ -1807,11 +1808,12 @@ namespace OpenSim.Region.Framework.Scenes
1807 1808
1808 if (SitTargetisSet && SitTargetUnOccupied) 1809 if (SitTargetisSet && SitTargetUnOccupied)
1809 { 1810 {
1810 part.SetAvatarOnSitTarget(UUID); 1811 part.SitTargetAvatar = UUID;
1811 offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z); 1812 offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z);
1812 sitOrientation = avSitOrientation; 1813 sitOrientation = avSitOrientation;
1813 autopilot = false; 1814 autopilot = false;
1814 } 1815 }
1816 part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
1815 1817
1816 pos = part.AbsolutePosition + offset; 1818 pos = part.AbsolutePosition + offset;
1817 //if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1) 1819 //if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
@@ -2225,33 +2227,6 @@ namespace OpenSim.Region.Framework.Scenes
2225 { 2227 {
2226 // WHAT??? 2228 // WHAT???
2227 m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!"); 2229 m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!");
2228
2229 // we have to reset the user's child agent connections.
2230 // Likely, here they've lost the eventqueue for other regions so border
2231 // crossings will fail at this point unless we reset them.
2232
2233 List<ulong> regions = new List<ulong>(KnownChildRegionHandles);
2234 regions.Remove(m_scene.RegionInfo.RegionHandle);
2235
2236 MakeRootAgent(new Vector3(127f, 127f, 127f), true);
2237
2238 // Async command
2239 if (m_scene.SceneGridService != null)
2240 {
2241 m_scene.SceneGridService.SendCloseChildAgentConnections(UUID, regions);
2242
2243 // Give the above command some time to try and close the connections.
2244 // this is really an emergency.. so sleep, or we'll get all discombobulated.
2245 System.Threading.Thread.Sleep(500);
2246 }
2247
2248 if (m_scene.SceneGridService != null)
2249 {
2250 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
2251 if (m_agentTransfer != null)
2252 m_agentTransfer.EnableChildAgents(this);
2253 }
2254
2255 return; 2230 return;
2256 } 2231 }
2257 2232
@@ -3226,8 +3201,11 @@ namespace OpenSim.Region.Framework.Scenes
3226 Vector3 force = m_forceToApply.Value; 3201 Vector3 force = m_forceToApply.Value;
3227 3202
3228 m_updateflag = true; 3203 m_updateflag = true;
3229// movementvector = force; 3204
3230 Velocity = force; 3205 // The magic constant 0.855f seems to make walking feel less jerky,
3206 // probably because it hackishly accounts for the overall latency of
3207 // these Velocity updates -- Diva
3208 Velocity = force * .855F;
3231 3209
3232 m_forceToApply = null; 3210 m_forceToApply = null;
3233 } 3211 }