aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5842932..eec51e6 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1232,31 +1232,31 @@ namespace OpenSim.Region.Environment.Scenes
1232 ulong newRegionHandle = 0; 1232 ulong newRegionHandle = 0;
1233 LLVector3 pos = position; 1233 LLVector3 pos = position;
1234 1234
1235 if (position.X > 257f) 1235 if (position.X > Constants.RegionSize + 0.1f)
1236 { 1236 {
1237 pos.X = ((pos.X - 256)); 1237 pos.X = ((pos.X - Constants.RegionSize));
1238 1238
1239 newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * 256), (uint)(thisy * 256)); 1239 newRegionHandle = Util.UIntsToLong((uint)((thisx + 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
1240 1240
1241 // x + 1 1241 // x + 1
1242 } 1242 }
1243 else if (position.X < -1f) 1243 else if (position.X < -0.1f)
1244 { 1244 {
1245 pos.X = ((pos.X + 256)); 1245 pos.X = ((pos.X + Constants.RegionSize));
1246 newRegionHandle = Util.UIntsToLong((uint)((thisx - 1) * 256), (uint)(thisy * 256)); 1246 newRegionHandle = Util.UIntsToLong((uint)((thisx - 1) * Constants.RegionSize), (uint)(thisy * Constants.RegionSize));
1247 // x - 1 1247 // x - 1
1248 } 1248 }
1249 1249
1250 if (position.Y > 257f) 1250 if (position.Y > Constants.RegionSize + 0.1f)
1251 { 1251 {
1252 pos.Y = ((pos.Y - 256)); 1252 pos.Y = ((pos.Y - Constants.RegionSize));
1253 newRegionHandle = Util.UIntsToLong((uint)(thisx * 256), (uint)((thisy + 1) * 256)); 1253 newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy + 1) * Constants.RegionSize));
1254 // y + 1 1254 // y + 1
1255 } 1255 }
1256 else if (position.Y < -1f) 1256 else if (position.Y < -1f)
1257 { 1257 {
1258 pos.Y = ((pos.Y + 256)); 1258 pos.Y = ((pos.Y + Constants.RegionSize));
1259 newRegionHandle = Util.UIntsToLong((uint)(thisx * 256), (uint)((thisy - 1) * 256)); 1259 newRegionHandle = Util.UIntsToLong((uint)(thisx * Constants.RegionSize), (uint)((thisy - 1) * Constants.RegionSize));
1260 // y - 1 1260 // y - 1
1261 } 1261 }
1262 1262