aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-02-14 12:16:33 +0000
committerAdam Frisby2008-02-14 12:16:33 +0000
commitf3afa68a2af6ad5999e6efe3e4725cb17293108d (patch)
tree4253a44bee39976d6b3dd6813439f5966cf12632 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Exposed AddHandlers in response to mantis #534. Thanks, kmeisthax! (diff)
downloadopensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.zip
opensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.tar.gz
opensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.tar.bz2
opensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.tar.xz
* Made new Framework.Constants class, added RegionSize member.
* Converted all instances of "256" spotted to use RegionSize instead. Some approximations used for border crossings (ie 255.9f) are still using that value, but should be updated to use something based on RegionSize. * Moving Terrain to a RegionModule, implemented ITerrainChannel and TerrainModule - nonfunctional, but will be soon.
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