aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorAdam Frisby2008-03-06 15:49:53 +0000
committerAdam Frisby2008-03-06 15:49:53 +0000
commita3601165029f8484988b5c322798a341ff1e9400 (patch)
tree4b761e7d0694dffb0b67018915fc240e7bbaa154 /OpenSim/Region/ScriptEngine
parent* Killed 4 more warnings (at 16 now) (diff)
downloadopensim-SC_OLD-a3601165029f8484988b5c322798a341ff1e9400.zip
opensim-SC_OLD-a3601165029f8484988b5c322798a341ff1e9400.tar.gz
opensim-SC_OLD-a3601165029f8484988b5c322798a341ff1e9400.tar.bz2
opensim-SC_OLD-a3601165029f8484988b5c322798a341ff1e9400.tar.xz
* Disabled ancient TerrainEngine.
* Enabled new TerrainModule. (The king is dead, long live the king!) * Use the console command: "script terrain save file.r32" / "script terrain load file.r32" to load/save terrain. Now uses the extension to determine file format. * MANY of the old terrain features do not have a replacement function in the new module yet, this needs to be corrected, but has not been done so far. This being said, the new module is faster and more efficient and should be a good replacement.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs60
1 files changed, 3 insertions, 57 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index d516aa5..9c7f868 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -1851,61 +1851,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1851 double dsize; 1851 double dsize;
1852 if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0))) 1852 if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)))
1853 { 1853 {
1854 switch (brush) 1854 NotImplemented("llModifyLand");
1855 {
1856 case 1:
1857 dsize = 2;
1858 break;
1859 case 2:
1860 dsize = 4;
1861 break;
1862 case 3:
1863 dsize = 8;
1864 break;
1865 default:
1866 if (brush < 0)
1867 {
1868 dsize = (double)(-1 * brush);
1869 }
1870 else
1871 {
1872 LSLError("Invalid brush size");
1873 dsize = 0; // Should cease execution, but get unassigned local variable dsize on compile.
1874 }
1875 break;
1876 }
1877 switch (action)
1878 {
1879 case 0:
1880 if (World.Terrain.GetHeight((int)m_host.AbsolutePosition.X, (int)m_host.AbsolutePosition.Y) < m_host.AbsolutePosition.Z)
1881 {
1882 World.Terrain.FlattenTerrain(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, dsize, 1);
1883 }
1884 break;
1885 case 1:
1886 if (World.Terrain.GetHeight((int)m_host.AbsolutePosition.X, (int)m_host.AbsolutePosition.Y) < (double)m_host.AbsolutePosition.Z)
1887 {
1888 World.Terrain.RaiseTerrain(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, dsize, 0.1);
1889 }
1890 break;
1891 case 2:
1892 if (World.Terrain.GetHeight((int)m_host.AbsolutePosition.X, (int)m_host.AbsolutePosition.Y) > 0)
1893 {
1894 World.Terrain.LowerTerrain(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, dsize, 1);
1895 }
1896 break;
1897 case 3:
1898 World.Terrain.SmoothTerrain(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, dsize, 1);
1899 break;
1900 case 4:
1901 World.Terrain.NoiseTerrain(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, dsize, 1);
1902 break;
1903 case 5:
1904 World.Terrain.RevertTerrain(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, dsize, 1);
1905 break;
1906 default:
1907 break;
1908 }
1909 } 1855 }
1910 } 1856 }
1911 1857
@@ -4162,7 +4108,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4162 4108
4163 if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(x, y, 0))) 4109 if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(x, y, 0)))
4164 { 4110 {
4165 World.Terrain.Set(x, y, val); 4111 World.Heightmap[x, y] = val;
4166 return 1; 4112 return 1;
4167 } 4113 }
4168 else 4114 else
@@ -4177,7 +4123,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4177 if (x > 255 || x < 0 || y > 255 || y < 0) 4123 if (x > 255 || x < 0 || y > 255 || y < 0)
4178 LSLError("osTerrainGetHeight: Coordinate out of bounds"); 4124 LSLError("osTerrainGetHeight: Coordinate out of bounds");
4179 4125
4180 return World.Terrain.GetHeight(x, y); 4126 return World.Heightmap[x, y];
4181 } 4127 }
4182 4128
4183 public int osRegionRestart(double seconds) 4129 public int osRegionRestart(double seconds)