aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2014-10-28 13:52:00 +0000
committerUbitUmarov2014-10-28 13:52:00 +0000
commite4d84d8ff6595d124485921e36d62508660c996f (patch)
tree7bdbe694b17672e6b93731b088a0ef2a04e67c15 /OpenSim/Region/Framework/Scenes
parent fix parcel proprieties update sending (diff)
downloadopensim-SC-e4d84d8ff6595d124485921e36d62508660c996f.zip
opensim-SC-e4d84d8ff6595d124485921e36d62508660c996f.tar.gz
opensim-SC-e4d84d8ff6595d124485921e36d62508660c996f.tar.bz2
opensim-SC-e4d84d8ff6595d124485921e36d62508660c996f.tar.xz
try to make a avatar usesable if its siting part didn't cross, or crossed
back. This situation points to that sitted avatars should be sent in same http connection that crosses the object
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs98
1 files changed, 12 insertions, 86 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 56c3b52..c58847b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1126,7 +1126,7 @@ namespace OpenSim.Region.Framework.Scenes
1126 ParentID = 0; 1126 ParentID = 0;
1127 ParentPart = null; 1127 ParentPart = null;
1128 PrevSitOffset = Vector3.Zero; 1128 PrevSitOffset = Vector3.Zero;
1129 ClearControls(); 1129 HandleForceReleaseControls(ControllingClient, UUID); // needs testing
1130 IsLoggingIn = false; 1130 IsLoggingIn = false;
1131 } 1131 }
1132 else 1132 else
@@ -1211,6 +1211,7 @@ namespace OpenSim.Region.Framework.Scenes
1211 } 1211 }
1212 AbsolutePosition = pos; 1212 AbsolutePosition = pos;
1213 1213
1214
1214 if (m_teleportFlags == TeleportFlags.Default) 1215 if (m_teleportFlags == TeleportFlags.Default)
1215 { 1216 {
1216 Vector3 vel = Velocity; 1217 Vector3 vel = Velocity;
@@ -1221,6 +1222,7 @@ namespace OpenSim.Region.Framework.Scenes
1221 else 1222 else
1222 AddToPhysicalScene(isFlying); 1223 AddToPhysicalScene(isFlying);
1223 1224
1225
1224 if (ForceFly) 1226 if (ForceFly)
1225 { 1227 {
1226 Flying = true; 1228 Flying = true;
@@ -3862,91 +3864,15 @@ namespace OpenSim.Region.Framework.Scenes
3862 pos2.Y += vel.Y * timeStep; 3864 pos2.Y += vel.Y * timeStep;
3863 pos2.Z += vel.Z * timeStep; 3865 pos2.Z += vel.Z * timeStep;
3864 3866
3865 // m_log.DebugFormat( 3867// m_log.DebugFormat(
3866 // "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", 3868// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
3867 // pos2, Name, Scene.Name); 3869// pos2, Name, Scene.Name);
3868/* 3870
3869 // Checks if where it's headed exists a region 3871 if( Scene.TestBorderCross(pos2, Cardinals.E) ||
3870 int neighbor = 0; 3872 Scene.TestBorderCross(pos2, Cardinals.W) ||
3871 int[] fix = new int[2]; 3873 Scene.TestBorderCross(pos2, Cardinals.N) ||
3872 3874 Scene.TestBorderCross(pos2, Cardinals.S)
3873 bool needsTransit = false; 3875 )
3874 if (m_scene.TestBorderCross(pos2, Cardinals.W))
3875 {
3876 if (m_scene.TestBorderCross(pos2, Cardinals.S))
3877 {
3878 needsTransit = true;
3879 neighbor = m_scene.HaveNeighbor(Cardinals.SW, ref fix);
3880 }
3881 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
3882 {
3883 needsTransit = true;
3884 neighbor = m_scene.HaveNeighbor(Cardinals.NW, ref fix);
3885 }
3886 else
3887 {
3888 needsTransit = true;
3889 neighbor = m_scene.HaveNeighbor(Cardinals.W, ref fix);
3890 }
3891 }
3892 else if (m_scene.TestBorderCross(pos2, Cardinals.E))
3893 {
3894 if (m_scene.TestBorderCross(pos2, Cardinals.S))
3895 {
3896 needsTransit = true;
3897 neighbor = m_scene.HaveNeighbor(Cardinals.SE, ref fix);
3898 }
3899 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
3900 {
3901 needsTransit = true;
3902 neighbor = m_scene.HaveNeighbor(Cardinals.NE, ref fix);
3903 }
3904 else
3905 {
3906 needsTransit = true;
3907 neighbor = m_scene.HaveNeighbor(Cardinals.E, ref fix);
3908 }
3909 }
3910 else if (m_scene.TestBorderCross(pos2, Cardinals.S))
3911 {
3912 needsTransit = true;
3913 neighbor = m_scene.HaveNeighbor(Cardinals.S, ref fix);
3914 }
3915 else if (m_scene.TestBorderCross(pos2, Cardinals.N))
3916 {
3917 needsTransit = true;
3918 neighbor = m_scene.HaveNeighbor(Cardinals.N, ref fix);
3919 }
3920
3921 // Makes sure avatar does not end up outside region
3922
3923 if (neighbor <= 0)
3924 {
3925 if (needsTransit)
3926 {
3927 CrossToNewRegionFail();
3928 }
3929 }
3930 else if (neighbor > 0)
3931 {
3932 if (!CrossToNewRegion())
3933 {
3934 CrossToNewRegionFail();
3935 }
3936 }
3937 */
3938 bool needsTransit = false;
3939
3940 if (pos2.X < 0)
3941 needsTransit = true;
3942 else if (pos2.X > m_scene.RegionInfo.RegionSizeX)
3943 needsTransit = true;
3944 else if (pos2.Y < 0)
3945 needsTransit = true;
3946 else if (pos2.Y > m_scene.RegionInfo.RegionSizeY)
3947 needsTransit = true;
3948
3949 if (needsTransit)
3950 { 3876 {
3951 if (!CrossToNewRegion() && m_requestedSitTargetUUID == UUID.Zero) 3877 if (!CrossToNewRegion() && m_requestedSitTargetUUID == UUID.Zero)
3952 { 3878 {