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.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6772f75..66fefa3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -36,6 +36,7 @@ using OpenSim.Framework.Communications.Cache;
36using OpenSim.Region.Framework.Interfaces; 36using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes.Types; 37using OpenSim.Region.Framework.Scenes.Types;
38using OpenSim.Region.Physics.Manager; 38using OpenSim.Region.Physics.Manager;
39using GridRegion = OpenSim.Services.Interfaces.GridRegion;
39 40
40namespace OpenSim.Region.Framework.Scenes 41namespace 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
@@ -2305,14 +2306,14 @@ 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)
2312 { 2313 {
2313 m_log.Debug("DEBUG: AddNewMovement: child agent, Making root agent!"); 2314 m_log.Debug("DEBUG: AddNewMovement: child agent, Making root agent!");
2314 2315
2315 // we have to reset the user's child agent connections. 2316 // we have to reset the user's child agent connections.
2316 // Likely, here they've lost the eventqueue for other regions so border 2317 // Likely, here they've lost the eventqueue for other regions so border
2317 // crossings will fail at this point unless we reset them. 2318 // crossings will fail at this point unless we reset them.
2318 2319
@@ -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()