aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
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
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')
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs4
2 files changed, 14 insertions, 4 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 {
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index 420769c..1b2ff9a 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -111,8 +111,8 @@ namespace OpenSim.Region.Environment.Scenes
111 111
112 float physfps = (m_pfps/statsUpdatesEveryMS); 112 float physfps = (m_pfps/statsUpdatesEveryMS);
113 113
114 if (physfps > 500) 114 //if (physfps > 600)
115 physfps = physfps - (physfps - 500); 115 //physfps = physfps - (physfps - 600);
116 116
117 if (physfps < 0) 117 if (physfps < 0)
118 physfps = 0; 118 physfps = 0;