From 2cb222806b596b7233f30b2bab9eb7cca4d619d1 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 27 Dec 2007 05:48:27 +0000 Subject: * Fixed compile issue caused by half-refactoring (sorrry!) --- .../Compiler/Server_API/LSL_BuiltIn_Commands.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index d4f8548..63b4773 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -2878,6 +2878,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler // public int osTerrainSetHeight(int x, int y, double val) { + if (x > 255 || x < 0 || y > 255 || y < 0) + LSLError("osTerrainSetHeight: Coordinate out of bounds"); + if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(x, y, 0))) { World.Terrain.Set(x, y, val); @@ -2891,6 +2894,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public double osTerrainGetHeight(int x, int y) { + if (x > 255 || x < 0 || y > 255 || y < 0) + LSLError("osTerrainGetHeight: Coordinate out of bounds"); + return World.Terrain.GetHeight(x, y); } @@ -2898,7 +2904,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler { if (World.PermissionsMngr.CanRestartSim(m_host.OwnerID)) { - World.Restart((float)ms); + World.Restart((float)seconds); return 1; } else @@ -2936,5 +2942,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler if (throwErrorOnNotImplemented) throw new NotImplementedException("Command not implemented: " + Command); } + + private void LSLError(string msg) + { + throw new Exception("LSL Runtime Error: " + msg); + } } } -- cgit v1.1