diff options
author | John Hurliman | 2009-09-30 15:28:23 -0700 |
---|---|---|
committer | John Hurliman | 2009-09-30 15:28:23 -0700 |
commit | acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009 (patch) | |
tree | 305349e1bd0a5849fd7f96483e24d5e07b24b8f4 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | * Adding Scale to EntityBase * Fixing the incorrect initialization of EntityB... (diff) | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.zip opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.gz opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.bz2 opensim-SC-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.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.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 23fe2d3..0e1b8d9 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 | { |
@@ -775,7 +776,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
775 | // Moved this from SendInitialData to ensure that m_appearance is initialized | 776 | // Moved this from SendInitialData to ensure that m_appearance is initialized |
776 | // before the inventory is processed in MakeRootAgent. This fixes a race condition | 777 | // before the inventory is processed in MakeRootAgent. This fixes a race condition |
777 | // related to the handling of attachments | 778 | // related to the handling of attachments |
778 | //m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); | 779 | //m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); |
779 | if (m_scene.TestBorderCross(pos, Cardinals.E)) | 780 | if (m_scene.TestBorderCross(pos, Cardinals.E)) |
780 | { | 781 | { |
781 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); | 782 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); |
@@ -1234,7 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1234 | if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) | 1235 | if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) |
1235 | { | 1236 | { |
1236 | StandUp(); | 1237 | StandUp(); |
1237 | } | 1238 | } |
1238 | 1239 | ||
1239 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1240 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1240 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); | 1241 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); |
@@ -1488,7 +1489,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1488 | { | 1489 | { |
1489 | // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); | 1490 | // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); |
1490 | // m_log.DebugFormat( | 1491 | // m_log.DebugFormat( |
1491 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); | 1492 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); |
1492 | 1493 | ||
1493 | AddNewMovement(agent_control_v3, q); | 1494 | AddNewMovement(agent_control_v3, q); |
1494 | 1495 | ||
@@ -2269,7 +2270,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2269 | { | 2270 | { |
2270 | //Record the time we enter this state so we know whether to "land" or not | 2271 | //Record the time we enter this state so we know whether to "land" or not |
2271 | m_animPersistUntil = DateTime.Now.Ticks; | 2272 | m_animPersistUntil = DateTime.Now.Ticks; |
2272 | return "FALLDOWN"; | 2273 | return "FALLDOWN"; // this falling animation is invoked too frequently when capsule tilt correction is used - why? |
2273 | } | 2274 | } |
2274 | } | 2275 | } |
2275 | } | 2276 | } |
@@ -2305,7 +2306,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2305 | /// Rotate the avatar to the given rotation and apply a movement in the given relative vector | 2306 | /// Rotate the avatar to the given rotation and apply a movement in the given relative vector |
2306 | /// </summary> | 2307 | /// </summary> |
2307 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> | 2308 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> |
2308 | /// <param name="rotation">The direction in which this avatar should now face. | 2309 | /// <param name="rotation">The direction in which this avatar should now face. |
2309 | public void AddNewMovement(Vector3 vec, Quaternion rotation) | 2310 | public void AddNewMovement(Vector3 vec, Quaternion rotation) |
2310 | { | 2311 | { |
2311 | if (m_isChildAgent) | 2312 | if (m_isChildAgent) |
@@ -2648,7 +2649,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2648 | /// Tell the client for this scene presence what items it should be wearing now | 2649 | /// Tell the client for this scene presence what items it should be wearing now |
2649 | /// </summary> | 2650 | /// </summary> |
2650 | public void SendWearables() | 2651 | public void SendWearables() |
2651 | { | 2652 | { |
2652 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 2653 | ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
2653 | } | 2654 | } |
2654 | 2655 | ||
@@ -2934,8 +2935,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2934 | else if (dir > 3 && dir < 7) // Heading Sout | 2935 | else if (dir > 3 && dir < 7) // Heading Sout |
2935 | neighboury--; | 2936 | neighboury--; |
2936 | 2937 | ||
2937 | ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); | 2938 | int x = (int)(neighbourx * Constants.RegionSize); |
2938 | SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); | 2939 | int y = (int)(neighboury * Constants.RegionSize); |
2940 | GridRegion neighbourRegion = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, x, y); | ||
2939 | 2941 | ||
2940 | if (neighbourRegion == null) | 2942 | if (neighbourRegion == null) |
2941 | { | 2943 | { |
@@ -3173,7 +3175,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3173 | else | 3175 | else |
3174 | { | 3176 | { |
3175 | wears[i++] = UUID.Zero; | 3177 | wears[i++] = UUID.Zero; |
3176 | wears[i++] = UUID.Zero; | 3178 | wears[i++] = UUID.Zero; |
3177 | } | 3179 | } |
3178 | } | 3180 | } |
3179 | cAgent.Wearables = wears; | 3181 | cAgent.Wearables = wears; |
@@ -3485,7 +3487,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3485 | 3487 | ||
3486 | public bool HasAttachments() | 3488 | public bool HasAttachments() |
3487 | { | 3489 | { |
3488 | return m_attachments.Count > 0; | 3490 | return m_attachments.Count > 0; |
3489 | } | 3491 | } |
3490 | 3492 | ||
3491 | public bool HasScriptedAttachments() | 3493 | public bool HasScriptedAttachments() |