diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 60 |
1 files changed, 22 insertions, 38 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cd9dcf5..2965903 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1170,18 +1170,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1170 | 1170 | ||
1171 | if (ParentID == 0) | 1171 | if (ParentID == 0) |
1172 | { | 1172 | { |
1173 | if (m_scene.TestBorderCross(pos, Cardinals.E)) | ||
1174 | { | ||
1175 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); | ||
1176 | pos.X = crossedBorder.BorderLine.Z - 1; | ||
1177 | } | ||
1178 | |||
1179 | if (m_scene.TestBorderCross(pos, Cardinals.N)) | ||
1180 | { | ||
1181 | Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.N); | ||
1182 | pos.Y = crossedBorder.BorderLine.Z - 1; | ||
1183 | } | ||
1184 | |||
1185 | CheckAndAdjustLandingPoint(ref pos); | 1173 | CheckAndAdjustLandingPoint(ref pos); |
1186 | 1174 | ||
1187 | if (pos.X < 0f || pos.Y < 0f || pos.Z < 0f) | 1175 | if (pos.X < 0f || pos.Y < 0f || pos.Z < 0f) |
@@ -3867,32 +3855,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
3867 | // m_log.DebugFormat( | 3855 | // m_log.DebugFormat( |
3868 | // "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", | 3856 | // "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", |
3869 | // pos2, Name, Scene.Name); | 3857 | // pos2, Name, Scene.Name); |
3870 | 3858 | ||
3871 | if( Scene.TestBorderCross(pos2, Cardinals.E) || | 3859 | if (Scene.PositionIsInCurrentRegion(pos2)) |
3872 | Scene.TestBorderCross(pos2, Cardinals.W) || | 3860 | return; |
3873 | Scene.TestBorderCross(pos2, Cardinals.N) || | 3861 | |
3874 | Scene.TestBorderCross(pos2, Cardinals.S) | 3862 | if (!CrossToNewRegion() && m_requestedSitTargetUUID == UUID.Zero) |
3875 | ) | 3863 | { |
3876 | { | 3864 | // we don't have entity transfer module |
3877 | if (!CrossToNewRegion() && m_requestedSitTargetUUID == UUID.Zero) | 3865 | Vector3 pos = AbsolutePosition; |
3878 | { | 3866 | float px = pos.X; |
3879 | // we don't have entity transfer module | 3867 | if (px < 0) |
3880 | Vector3 pos = AbsolutePosition; | 3868 | pos.X += Velocity.X * 2; |
3881 | float px = pos.X; | 3869 | else if (px > m_scene.RegionInfo.RegionSizeX) |
3882 | if (px < 0) | 3870 | pos.X -= Velocity.X * 2; |
3883 | pos.X += Velocity.X * 2; | 3871 | |
3884 | else if (px > m_scene.RegionInfo.RegionSizeX) | 3872 | float py = pos.Y; |
3885 | pos.X -= Velocity.X * 2; | 3873 | if (py < 0) |
3886 | 3874 | pos.Y += Velocity.Y * 2; | |
3887 | float py = pos.Y; | 3875 | else if (py > m_scene.RegionInfo.RegionSizeY) |
3888 | if (py < 0) | 3876 | pos.Y -= Velocity.Y * 2; |
3889 | pos.Y += Velocity.Y * 2; | 3877 | |
3890 | else if (py > m_scene.RegionInfo.RegionSizeY) | 3878 | Velocity = Vector3.Zero; |
3891 | pos.Y -= Velocity.Y * 2; | 3879 | AbsolutePosition = pos; |
3892 | |||
3893 | Velocity = Vector3.Zero; | ||
3894 | AbsolutePosition = pos; | ||
3895 | } | ||
3896 | } | 3880 | } |
3897 | } | 3881 | } |
3898 | 3882 | ||