diff options
Merge branch 'master' into diva-textures
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ea5240e..3996cdc 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -36,6 +36,7 @@ using OpenSim.Framework.Communications.Cache; | |||
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes.Types; | 37 | using OpenSim.Region.Framework.Scenes.Types; |
38 | using OpenSim.Region.Physics.Manager; | 38 | using OpenSim.Region.Physics.Manager; |
39 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
39 | 40 | ||
40 | namespace OpenSim.Region.Framework.Scenes | 41 | namespace OpenSim.Region.Framework.Scenes |
41 | { | 42 | { |
@@ -777,7 +778,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
777 | // Moved this from SendInitialData to ensure that m_appearance is initialized | 778 | // Moved this from SendInitialData to ensure that m_appearance is initialized |
778 | // before the inventory is processed in MakeRootAgent. This fixes a race condition | 779 | // before the inventory is processed in MakeRootAgent. This fixes a race condition |
779 | // related to the handling of attachments | 780 | // related to the handling of attachments |
780 | //m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); | 781 | //m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); |
781 | if (m_scene.TestBorderCross(pos, Cardinals.E)) | 782 | if (m_scene.TestBorderCross(pos, Cardinals.E)) |
782 | { | 783 | { |
783 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); | 784 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); |
@@ -1236,7 +1237,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1236 | if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) | 1237 | if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) |
1237 | { | 1238 | { |
1238 | StandUp(); | 1239 | StandUp(); |
1239 | } | 1240 | } |
1240 | 1241 | ||
1241 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1242 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1242 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); | 1243 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); |
@@ -1490,7 +1491,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1490 | { | 1491 | { |
1491 | // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); | 1492 | // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); |
1492 | // m_log.DebugFormat( | 1493 | // m_log.DebugFormat( |
1493 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); | 1494 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); |
1494 | 1495 | ||
1495 | AddNewMovement(agent_control_v3, q); | 1496 | AddNewMovement(agent_control_v3, q); |
1496 | 1497 | ||
@@ -2271,7 +2272,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2271 | { | 2272 | { |
2272 | //Record the time we enter this state so we know whether to "land" or not | 2273 | //Record the time we enter this state so we know whether to "land" or not |
2273 | m_animPersistUntil = DateTime.Now.Ticks; | 2274 | m_animPersistUntil = DateTime.Now.Ticks; |
2274 | return "FALLDOWN"; | 2275 | return "FALLDOWN"; // this falling animation is invoked too frequently when capsule tilt correction is used - why? |
2275 | } | 2276 | } |
2276 | } | 2277 | } |
2277 | } | 2278 | } |
@@ -2307,14 +2308,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2307 | /// Rotate the avatar to the given rotation and apply a movement in the given relative vector | 2308 | /// Rotate the avatar to the given rotation and apply a movement in the given relative vector |
2308 | /// </summary> | 2309 | /// </summary> |
2309 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> | 2310 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> |
2310 | /// <param name="rotation">The direction in which this avatar should now face. | 2311 | /// <param name="rotation">The direction in which this avatar should now face. |
2311 | public void AddNewMovement(Vector3 vec, Quaternion rotation) | 2312 | public void AddNewMovement(Vector3 vec, Quaternion rotation) |
2312 | { | 2313 | { |
2313 | if (m_isChildAgent) | 2314 | if (m_isChildAgent) |
2314 | { | 2315 | { |
2315 | m_log.Debug("DEBUG: AddNewMovement: child agent, Making root agent!"); | 2316 | m_log.Debug("DEBUG: AddNewMovement: child agent, Making root agent!"); |
2316 | 2317 | ||
2317 | // we have to reset the user's child agent connections. | 2318 | // we have to reset the user's child agent connections. |
2318 | // Likely, here they've lost the eventqueue for other regions so border | 2319 | // Likely, here they've lost the eventqueue for other regions so border |
2319 | // crossings will fail at this point unless we reset them. | 2320 | // crossings will fail at this point unless we reset them. |
2320 | 2321 | ||
@@ -2650,7 +2651,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2650 | /// Tell the client for this scene presence what items it should be wearing now | 2651 | /// Tell the client for this scene presence what items it should be wearing now |
2651 | /// </summary> | 2652 | /// </summary> |
2652 | public void SendWearables() | 2653 | public void SendWearables() |
2653 | { | 2654 | { |
2654 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 2655 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
2655 | } | 2656 | } |
2656 | 2657 | ||
@@ -2959,8 +2960,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2959 | else if (dir > 3 && dir < 7) // Heading Sout | 2960 | else if (dir > 3 && dir < 7) // Heading Sout |
2960 | neighboury--; | 2961 | neighboury--; |
2961 | 2962 | ||
2962 | ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); | 2963 | int x = (int)(neighbourx * Constants.RegionSize); |
2963 | SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); | 2964 | int y = (int)(neighboury * Constants.RegionSize); |
2965 | GridRegion neighbourRegion = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, x, y); | ||
2964 | 2966 | ||
2965 | if (neighbourRegion == null) | 2967 | if (neighbourRegion == null) |
2966 | { | 2968 | { |
@@ -3198,7 +3200,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3198 | else | 3200 | else |
3199 | { | 3201 | { |
3200 | wears[i++] = UUID.Zero; | 3202 | wears[i++] = UUID.Zero; |
3201 | wears[i++] = UUID.Zero; | 3203 | wears[i++] = UUID.Zero; |
3202 | } | 3204 | } |
3203 | } | 3205 | } |
3204 | cAgent.Wearables = wears; | 3206 | cAgent.Wearables = wears; |
@@ -3510,7 +3512,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3510 | 3512 | ||
3511 | public bool HasAttachments() | 3513 | public bool HasAttachments() |
3512 | { | 3514 | { |
3513 | return m_attachments.Count > 0; | 3515 | return m_attachments.Count > 0; |
3514 | } | 3516 | } |
3515 | 3517 | ||
3516 | public bool HasScriptedAttachments() | 3518 | public bool HasScriptedAttachments() |