diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 35 |
2 files changed, 19 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ff1e922..a0a2882 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4625,12 +4625,8 @@ Label_GroupsDone: | |||
4625 | // however to avoid a race condition crossing borders.. | 4625 | // however to avoid a race condition crossing borders.. |
4626 | if (childAgentUpdate.IsChildAgent) | 4626 | if (childAgentUpdate.IsChildAgent) |
4627 | { | 4627 | { |
4628 | uint rRegionX = (uint)(cAgentData.RegionHandle >> 40); | ||
4629 | uint rRegionY = (((uint)(cAgentData.RegionHandle)) >> 8); | ||
4630 | uint tRegionX = RegionInfo.RegionLocX; | ||
4631 | uint tRegionY = RegionInfo.RegionLocY; | ||
4632 | //Send Data to ScenePresence | 4628 | //Send Data to ScenePresence |
4633 | childAgentUpdate.UpdateChildAgent(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); | 4629 | childAgentUpdate.UpdateChildAgent(cAgentData); |
4634 | // Not Implemented: | 4630 | // Not Implemented: |
4635 | //TODO: Do we need to pass the message on to one of our neighbors? | 4631 | //TODO: Do we need to pass the message on to one of our neighbors? |
4636 | } | 4632 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4413d26..c80fba2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4846,7 +4846,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4846 | /// This updates important decision making data about a child agent | 4846 | /// This updates important decision making data about a child agent |
4847 | /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region | 4847 | /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region |
4848 | /// </summary> | 4848 | /// </summary> |
4849 | public void UpdateChildAgent(AgentPosition cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) | 4849 | public void UpdateChildAgent(AgentPosition cAgentData) |
4850 | { | 4850 | { |
4851 | if (!IsChildAgent) | 4851 | if (!IsChildAgent) |
4852 | return; | 4852 | return; |
@@ -4854,6 +4854,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4854 | GodController.SetState(cAgentData.GodData); | 4854 | GodController.SetState(cAgentData.GodData); |
4855 | 4855 | ||
4856 | RegionHandle = cAgentData.RegionHandle; | 4856 | RegionHandle = cAgentData.RegionHandle; |
4857 | uint rRegionX = (uint)(RegionHandle >> 40); | ||
4858 | uint rRegionY = (((uint)RegionHandle) >> 8); | ||
4859 | uint tRegionX = m_scene.RegionInfo.RegionLocX; | ||
4860 | uint tRegionY = m_scene.RegionInfo.RegionLocY; | ||
4857 | 4861 | ||
4858 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); | 4862 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); |
4859 | int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; | 4863 | int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; |
@@ -4863,11 +4867,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
4863 | 4867 | ||
4864 | DrawDistance = cAgentData.Far; | 4868 | DrawDistance = cAgentData.Far; |
4865 | 4869 | ||
4866 | if (cAgentData.Position != marker) // UGH!! | 4870 | m_pos = cAgentData.Position + offset; |
4867 | m_pos = cAgentData.Position + offset; | ||
4868 | |||
4869 | CameraPosition = cAgentData.Center + offset; | 4871 | CameraPosition = cAgentData.Center + offset; |
4870 | 4872 | ||
4873 | if (cAgentData.ChildrenCapSeeds != null && cAgentData.ChildrenCapSeeds.Count > 0) | ||
4874 | { | ||
4875 | if (Scene.CapsModule != null) | ||
4876 | { | ||
4877 | Scene.CapsModule.SetChildrenSeed(UUID, cAgentData.ChildrenCapSeeds); | ||
4878 | } | ||
4879 | |||
4880 | KnownRegions = cAgentData.ChildrenCapSeeds; | ||
4881 | } | ||
4882 | |||
4871 | if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) | 4883 | if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) |
4872 | { | 4884 | { |
4873 | // some scaling factor | 4885 | // some scaling factor |
@@ -4880,24 +4892,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4880 | 4892 | ||
4881 | x = x * x + y * y; | 4893 | x = x * x + y * y; |
4882 | 4894 | ||
4883 | const float distScale = 0.4f / Constants.RegionSize / Constants.RegionSize; | 4895 | float factor = 1.0f - x * 0.3f / Constants.RegionSize / Constants.RegionSize; |
4884 | float factor = 1.0f - distScale * x; | ||
4885 | if (factor < 0.2f) | 4896 | if (factor < 0.2f) |
4886 | factor = 0.2f; | 4897 | factor = 0.2f; |
4887 | 4898 | ||
4888 | ControllingClient.SetChildAgentThrottle(cAgentData.Throttles,factor); | 4899 | ControllingClient.SetChildAgentThrottle(cAgentData.Throttles,factor); |
4889 | } | 4900 | } |
4890 | 4901 | ||
4891 | if(cAgentData.ChildrenCapSeeds != null && cAgentData.ChildrenCapSeeds.Count >0) | ||
4892 | { | ||
4893 | if (Scene.CapsModule != null) | ||
4894 | { | ||
4895 | Scene.CapsModule.SetChildrenSeed(UUID, cAgentData.ChildrenCapSeeds); | ||
4896 | } | ||
4897 | |||
4898 | KnownRegions = cAgentData.ChildrenCapSeeds; | ||
4899 | } | ||
4900 | |||
4901 | //cAgentData.AVHeight; | 4902 | //cAgentData.AVHeight; |
4902 | //m_velocity = cAgentData.Velocity; | 4903 | //m_velocity = cAgentData.Velocity; |
4903 | checkRePrioritization(); | 4904 | checkRePrioritization(); |
@@ -5029,7 +5030,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5029 | } | 5030 | } |
5030 | 5031 | ||
5031 | if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0) | 5032 | if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0) |
5032 | ControllingClient.SetChildAgentThrottle(cAgent.Throttles); | 5033 | ControllingClient.SetChildAgentThrottle(cAgent.Throttles, 1.0f); |
5033 | 5034 | ||
5034 | m_headrotation = cAgent.HeadRotation; | 5035 | m_headrotation = cAgent.HeadRotation; |
5035 | Rotation = cAgent.BodyRotation; | 5036 | Rotation = cAgent.BodyRotation; |