aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land/LandObject.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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]);