From 9c81b8a430b7fc8b0181310132f4bc9de414f19d Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 5 Dec 2007 18:45:05 +0000 Subject: From Gary Chernega (IBM) This patch adds x, y, and z offsets to the load-xml command. If you had a prim at 100,100,20 thats where it would get loaded everytime. This patch lets you place it at an offset from 100,100,20.. as such: load-xml -newUI 3 1 2 Loading the prim at 103, 101, 22 --- OpenSim/Region/Application/OpenSimMain.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index b941e2d..9ad6c5f 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -42,6 +42,7 @@ using OpenSim.Region.Environment; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Physics.Manager; +using libsecondlife; using Mono.Addins; using Mono.Addins.Description; @@ -664,6 +665,7 @@ namespace OpenSim break; case "load-xml": + LLVector3 loadOffset = new LLVector3(0, 0, 0); if (cmdparams.Length > 0) { bool generateNewIDS = false; @@ -672,13 +674,20 @@ namespace OpenSim if (cmdparams[1] == "-newUID") { generateNewIDS = true; - } + } + if (cmdparams.Length > 2) + { + loadOffset.X = (float)Convert.ToDecimal(cmdparams[2]); + if (cmdparams.Length > 3) { loadOffset.Y = (float)Convert.ToDecimal(cmdparams[3]); } + if (cmdparams.Length > 4) { loadOffset.Z = (float)Convert.ToDecimal(cmdparams[4]); } + m_log.Error("loadOffsets = <" + loadOffset.X + "," + loadOffset.Y + "," + loadOffset.Z + ">"); + } } - m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS); + m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); } else { - m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false); + m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME, false, loadOffset); } break; -- cgit v1.1