aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/LandManagement/LandManager.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-13 07:14:54 +0000
committerTeravus Ovares2008-01-13 07:14:54 +0000
commitd9e45332022b18b50f00353588afd4bbe3392870 (patch)
treedcc39ec2e123052bc25f6b529dfd0821c47e4908 /OpenSim/Region/Environment/LandManagement/LandManager.cs
parentThank you very much, Kinoc for implementing llGetSubString and llDeleteSubStr... (diff)
downloadopensim-SC_OLD-d9e45332022b18b50f00353588afd4bbe3392870.zip
opensim-SC_OLD-d9e45332022b18b50f00353588afd4bbe3392870.tar.gz
opensim-SC_OLD-d9e45332022b18b50f00353588afd4bbe3392870.tar.bz2
opensim-SC_OLD-d9e45332022b18b50f00353588afd4bbe3392870.tar.xz
* Fixed an overflow in the land manager
* Did some goofy math undoing in the Sim Stats Reporter * More reduction to the amount of calls per second to UnManaged ODE code * Added a significant amount of comments to ODE
Diffstat (limited to 'OpenSim/Region/Environment/LandManagement/LandManager.cs')
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index 22e7fc9..3969932 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -243,8 +243,18 @@ namespace OpenSim.Region.Environment.LandManagement
243 /// <returns>Land object at the point supplied</returns> 243 /// <returns>Land object at the point supplied</returns>
244 public Land getLandObject(float x_float, float y_float) 244 public Land getLandObject(float x_float, float y_float)
245 { 245 {
246 int x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float)/Convert.ToDouble(4.0))); 246 int x;
247 int y = Convert.ToInt32(Math.Floor(Convert.ToDouble(y_float)/Convert.ToDouble(4.0))); 247 int y;
248
249 try
250 {
251 x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / Convert.ToDouble(4.0)));
252 y = Convert.ToInt32(Math.Floor(Convert.ToDouble(y_float) / Convert.ToDouble(4.0)));
253 }
254 catch (System.OverflowException)
255 {
256 return null;
257 }
248 258
249 if (x >= 64 || y >= 64 || x < 0 || y < 0) 259 if (x >= 64 || y >= 64 || x < 0 || y < 0)
250 { 260 {