aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/LandObject.cs
diff options
context:
space:
mode:
authorMelanie2009-08-08 01:43:28 +0100
committerMelanie2009-08-08 01:43:28 +0100
commit0b0ed200f66bb8ab3c139d85263e7c8e81117791 (patch)
tree49af5e09fa54c4ef1d441ebd58ab9c6bf4a242fd /OpenSim/Region/CoreModules/World/Land/LandObject.cs
parentChange the default for internal IP address back to 0.0.0.0 (diff)
parentMerge branch 'master' of ssh://MyConnection/var/git/opensim (diff)
downloadopensim-SC_OLD-0b0ed200f66bb8ab3c139d85263e7c8e81117791.zip
opensim-SC_OLD-0b0ed200f66bb8ab3c139d85263e7c8e81117791.tar.gz
opensim-SC_OLD-0b0ed200f66bb8ab3c139d85263e7c8e81117791.tar.bz2
opensim-SC_OLD-0b0ed200f66bb8ab3c139d85263e7c8e81117791.tar.xz
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 715b48d..f41bdac 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -305,8 +305,8 @@ namespace OpenSim.Region.CoreModules.World.Land
305 try 305 try
306 { 306 {
307 over = 307 over =
308 m_scene.LandChannel.GetLandObject(Util.Clamp<int>((int)Math.Round(avatars[i].AbsolutePosition.X), 0, 255), 308 m_scene.LandChannel.GetLandObject(Util.Clamp<int>((int)Math.Round(avatars[i].AbsolutePosition.X), 0, ((int)Constants.RegionSize - 1)),
309 Util.Clamp<int>((int)Math.Round(avatars[i].AbsolutePosition.Y), 0, 255)); 309 Util.Clamp<int>((int)Math.Round(avatars[i].AbsolutePosition.Y), 0, ((int)Constants.RegionSize - 1)));
310 } 310 }
311 catch (Exception) 311 catch (Exception)
312 { 312 {
@@ -455,21 +455,21 @@ namespace OpenSim.Region.CoreModules.World.Land
455 } 455 }
456 } 456 }
457 int tx = min_x * 4; 457 int tx = min_x * 4;
458 if (tx > 255) 458 if (tx > ((int)Constants.RegionSize - 1))
459 tx = 255; 459 tx = ((int)Constants.RegionSize - 1);
460 int ty = min_y * 4; 460 int ty = min_y * 4;
461 if (ty > 255) 461 if (ty > ((int)Constants.RegionSize - 1))
462 ty = 255; 462 ty = ((int)Constants.RegionSize - 1);
463 landData.AABBMin = 463 landData.AABBMin =
464 new Vector3((float) (min_x * 4), (float) (min_y * 4), 464 new Vector3((float) (min_x * 4), (float) (min_y * 4),
465 (float) m_scene.Heightmap[tx, ty]); 465 (float) m_scene.Heightmap[tx, ty]);
466 466
467 tx = max_x * 4; 467 tx = max_x * 4;
468 if (tx > 255) 468 if (tx > ((int)Constants.RegionSize - 1))
469 tx = 255; 469 tx = ((int)Constants.RegionSize - 1);
470 ty = max_y * 4; 470 ty = max_y * 4;
471 if (ty > 255) 471 if (ty > ((int)Constants.RegionSize - 1))
472 ty = 255; 472 ty = ((int)Constants.RegionSize - 1);
473 landData.AABBMax = 473 landData.AABBMax =
474 new Vector3((float) (max_x * 4), (float) (max_y * 4), 474 new Vector3((float) (max_x * 4), (float) (max_y * 4),
475 (float) m_scene.Heightmap[tx, ty]); 475 (float) m_scene.Heightmap[tx, ty]);