diff options
author | teravus | 2013-08-07 23:33:23 -0500 |
---|---|---|
committer | teravus | 2013-08-07 23:33:23 -0500 |
commit | 4e86674a3a671561c3a9c85925308f2004fcc922 (patch) | |
tree | 9e7019b5fe2d6fb16e0c5f4ffa1c5c7a1b7a8de0 /OpenSim | |
parent | * This makes in-world terrain editing smoother, even in MegaRegions. This ... (diff) | |
download | opensim-SC-4e86674a3a671561c3a9c85925308f2004fcc922.zip opensim-SC-4e86674a3a671561c3a9c85925308f2004fcc922.tar.gz opensim-SC-4e86674a3a671561c3a9c85925308f2004fcc922.tar.bz2 opensim-SC-4e86674a3a671561c3a9c85925308f2004fcc922.tar.xz |
* Added set water height <height> [<x>] [<y>] console command following the set terrain heights console command as an example.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs index 4d49794..173b603 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs | |||
@@ -76,6 +76,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3, all corners = -1.", | 76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3, all corners = -1.", |
77 | consoleSetTerrainHeights); | 77 | consoleSetTerrainHeights); |
78 | 78 | ||
79 | m_module.Scene.AddCommand("Regions", m_module, "set water height", | ||
80 | "set water height <height> [<x>] [<y>]", | ||
81 | "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " + | ||
82 | "Specify -1 in <x> or <y> to wildcard that coordinate.", | ||
83 | consoleSetWaterHeight); | ||
84 | |||
85 | |||
79 | m_module.Scene.AddCommand( | 86 | m_module.Scene.AddCommand( |
80 | "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); | 87 | "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); |
81 | } | 88 | } |
@@ -121,7 +128,29 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
121 | } | 128 | } |
122 | } | 129 | } |
123 | } | 130 | } |
124 | 131 | protected void consoleSetWaterHeight(string module, string[] args) | |
132 | { | ||
133 | string heightstring = args[3]; | ||
134 | |||
135 | int x = (args.Length > 4 ? int.Parse(args[4]) : -1); | ||
136 | int y = (args.Length > 5 ? int.Parse(args[5]) : -1); | ||
137 | |||
138 | if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x) | ||
139 | { | ||
140 | if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y) | ||
141 | { | ||
142 | double selectedheight = double.Parse(heightstring); | ||
143 | |||
144 | m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " + | ||
145 | string.Format(" {0}", selectedheight)); | ||
146 | m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight; | ||
147 | |||
148 | m_module.Scene.RegionInfo.RegionSettings.Save(); | ||
149 | m_module.TriggerRegionInfoChange(); | ||
150 | m_module.sendRegionHandshakeToAll(); | ||
151 | } | ||
152 | } | ||
153 | } | ||
125 | protected void consoleSetTerrainHeights(string module, string[] args) | 154 | protected void consoleSetTerrainHeights(string module, string[] args) |
126 | { | 155 | { |
127 | string num = args[3]; | 156 | string num = args[3]; |