diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index fd4ba71..5c6996f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -298,7 +298,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
298 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); | 298 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); |
299 | 299 | ||
300 | m_host.AddScriptLPS(1); | 300 | m_host.AddScriptLPS(1); |
301 | if (x > 255 || x < 0 || y > 255 || y < 0) | 301 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) |
302 | OSSLError("osTerrainSetHeight: Coordinate out of bounds"); | 302 | OSSLError("osTerrainSetHeight: Coordinate out of bounds"); |
303 | 303 | ||
304 | if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) | 304 | if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) |
@@ -317,7 +317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
317 | CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight"); | 317 | CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight"); |
318 | 318 | ||
319 | m_host.AddScriptLPS(1); | 319 | m_host.AddScriptLPS(1); |
320 | if (x > 255 || x < 0 || y > 255 || y < 0) | 320 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) |
321 | OSSLError("osTerrainGetHeight: Coordinate out of bounds"); | 321 | OSSLError("osTerrainGetHeight: Coordinate out of bounds"); |
322 | 322 | ||
323 | return World.Heightmap[x, y]; | 323 | return World.Heightmap[x, y]; |