aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs39
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs9
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 ///