diff options
author | Adam Frisby | 2008-01-12 03:17:28 +0000 |
---|---|---|
committer | Adam Frisby | 2008-01-12 03:17:28 +0000 |
commit | bf8ffc7a0ca9411bd12b96d19075058e79b6c5e3 (patch) | |
tree | 961ff0cb5e226019cdffecb5be1c2e88c6531eeb | |
parent | Set svn:eol-style. (diff) | |
download | opensim-SC-bf8ffc7a0ca9411bd12b96d19075058e79b6c5e3.zip opensim-SC-bf8ffc7a0ca9411bd12b96d19075058e79b6c5e3.tar.gz opensim-SC-bf8ffc7a0ca9411bd12b96d19075058e79b6c5e3.tar.bz2 opensim-SC-bf8ffc7a0ca9411bd12b96d19075058e79b6c5e3.tar.xz |
* For your enjoyment, some RAdmin improvements, namely a new LoadHeightmap method.
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 39 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 9 |
2 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 0f99c70..cce58c2 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -66,6 +66,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
66 | m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); | 66 | m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); |
67 | m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); | 67 | m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); |
68 | m_httpd.AddXmlRPCHandler("admin_restart", XmlRpcRestartMethod); | 68 | m_httpd.AddXmlRPCHandler("admin_restart", XmlRpcRestartMethod); |
69 | m_httpd.AddXmlRPCHandler("admin_load_heightmap", XmlRpcLoadHeightmapMethod); | ||
69 | } | 70 | } |
70 | } | 71 | } |
71 | catch (NullReferenceException) | 72 | catch (NullReferenceException) |
@@ -135,6 +136,44 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
135 | return response; | 136 | return response; |
136 | } | 137 | } |
137 | 138 | ||
139 | public XmlRpcResponse XmlRpcLoadHeightmapMethod(XmlRpcRequest request) | ||
140 | { | ||
141 | XmlRpcResponse response = new XmlRpcResponse(); | ||
142 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
143 | |||
144 | Hashtable responseData = new Hashtable(); | ||
145 | if (requiredPassword != "" && | ||
146 | (!requestData.Contains("password") || (string)requestData["password"] != requiredPassword)) | ||
147 | { | ||
148 | responseData["accepted"] = "false"; | ||
149 | response.Value = responseData; | ||
150 | } | ||
151 | else | ||
152 | { | ||
153 | string file = (string)requestData["filename"]; | ||
154 | LLUUID regionID = LLUUID.Parse((string)requestData["regionid"]); | ||
155 | MainLog.Instance.Verbose("RADMIN", "Terrain Loading: " + file); | ||
156 | |||
157 | responseData["accepted"] = "true"; | ||
158 | |||
159 | Scene region = null; | ||
160 | |||
161 | if (m_app.SceneManager.TryGetScene(regionID, out region)) | ||
162 | { | ||
163 | region.LoadWorldMap(file); | ||
164 | responseData["success"] = "true"; | ||
165 | } | ||
166 | else | ||
167 | { | ||
168 | responseData["success"] = "false"; | ||
169 | responseData["error"] = "1: Unable to get a scene with that name."; | ||
170 | } | ||
171 | response.Value = responseData; | ||
172 | } | ||
173 | |||
174 | return response; | ||
175 | } | ||
176 | |||
138 | public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) | 177 | public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) |
139 | { | 178 | { |
140 | MainLog.Instance.Verbose("RADMIN", "Received Shutdown Administrator Request"); | 179 | MainLog.Instance.Verbose("RADMIN", "Received Shutdown Administrator Request"); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d8733f4..5278202 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -775,6 +775,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
775 | } | 775 | } |
776 | 776 | ||
777 | /// <summary> | 777 | /// <summary> |
778 | /// Loads a world map from a specified R32 file | ||
779 | /// </summary> | ||
780 | /// <param name="filename">A working R32 file</param> | ||
781 | public void LoadWorldMap(string filename) | ||
782 | { | ||
783 | Terrain.LoadFromFileF32(filename); | ||
784 | } | ||
785 | |||
786 | /// <summary> | ||
778 | /// Loads the World heightmap | 787 | /// Loads the World heightmap |
779 | /// </summary> | 788 | /// </summary> |
780 | /// | 789 | /// |