Hooked up the RestRegionPlugin Get Region/xxx/terrain so it outputs xml containing the terrain heightmap rather than the old "terrain not implemented" message.

The format of the terrain data is: the floats encoded in Base64 and serialised into xml. So I think far from ideal, but as the support for outputting that format was already there...
Still need to hook up a method for remotely loading this data.
0.6.6-post-fixes
MW 2009-05-21 10:54:49 +00:00
parent e4d68964dd
commit 8e6289b8ca
1 changed files with 6 additions and 2 deletions

View File

@ -181,8 +181,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
protected string RegionTerrain(OSHttpResponse httpResponse, Scene scene) protected string RegionTerrain(OSHttpResponse httpResponse, Scene scene)
{ {
return Failure(httpResponse, OSHttpStatusCode.ServerErrorNotImplemented, httpResponse.SendChunked = true;
"GET", "terrain not implemented"); httpResponse.ContentType = "text/xml";
return scene.Heightmap.SaveToXmlString();
//return Failure(httpResponse, OSHttpStatusCode.ServerErrorNotImplemented,
// "GET", "terrain not implemented");
} }
protected string RegionStats(OSHttpResponse httpResponse, Scene scene) protected string RegionStats(OSHttpResponse httpResponse, Scene scene)