Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim

This commit is contained in:
Melanie
2009-08-08 01:43:28 +01:00
22 changed files with 55 additions and 50 deletions

View File

@@ -299,7 +299,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight");
m_host.AddScriptLPS(1);
if (x > 255 || x < 0 || y > 255 || y < 0)
if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0)
OSSLError("osTerrainSetHeight: Coordinate out of bounds");
if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
@@ -318,7 +318,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.None, "osTerrainGetHeight");
m_host.AddScriptLPS(1);
if (x > 255 || x < 0 || y > 255 || y < 0)
if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0)
OSSLError("osTerrainGetHeight: Coordinate out of bounds");
return World.Heightmap[x, y];

View File

@@ -31,6 +31,7 @@ using System.Threading;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.ScriptEngine.Interfaces;
using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
@@ -443,12 +444,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
}
private void Save()
{
if (Position.x > 255)
Position.x = 255;
if (Position.x > ((int)Constants.RegionSize - 1))
Position.x = ((int)Constants.RegionSize - 1);
if (Position.x < 0)
Position.x = 0;
if (Position.y > 255)
Position.y = 255;
if (Position.y > ((int)Constants.RegionSize - 1))
Position.y = ((int)Constants.RegionSize - 1);
if (Position.y < 0)
Position.y = 0;
if (Position.z > 768)