aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authordiva2009-02-18 01:49:18 +0000
committerdiva2009-02-18 01:49:18 +0000
commit3f25128e77af2a53e765436454b8fddeb8f88894 (patch)
tree461d17a9e357e262a08583789617749986978881 /OpenSim/Region/Application
parentMakes SP.CopyFrom a bit more robust with respect to sims in older versions wh... (diff)
downloadopensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.zip
opensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.tar.gz
opensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.tar.bz2
opensim-SC-3f25128e77af2a53e765436454b8fddeb8f88894.tar.xz
Adds support for preserving animations on region crossings and TPs.
Known issue: after TP, the self client doesn't see the animations going, but others can see them. So there's a bug there (TPs only, crossings seem to be all fine). Untested: did not test animation overriders; only tested playing animations from the viewer.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/HGOpenSimNode.cs79
1 files changed, 79 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs
index cf0f917..a8dd00e 100644
--- a/OpenSim/Region/Application/HGOpenSimNode.cs
+++ b/OpenSim/Region/Application/HGOpenSimNode.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Xml;
31using log4net; 32using log4net;
32using Nini.Config; 33using Nini.Config;
33using OpenSim.Framework; 34using OpenSim.Framework;
@@ -69,6 +70,8 @@ namespace OpenSim
69 70
70 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand); 71 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand);
71 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand); 72 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand);
73 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-URI", "link-URI <URL of xml files>", "ok", RunCommand);
74
72 } 75 }
73 76
74 protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) 77 protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder)
@@ -144,6 +147,32 @@ namespace OpenSim
144 string command = cmdparams[0]; 147 string command = cmdparams[0];
145 cmdparams.RemoveAt(0); 148 cmdparams.RemoveAt(0);
146 149
150
151 if (command.Equals("link-URI"))
152 {
153
154 if (cmdparams.Count > 1 | cmdparams.Count < 1)
155 {
156 m_log.Info("Invalid usage");
157 m_log.Info("link-URI <URL of xml files>");
158 return;
159 }
160
161
162 m_log.Info(cmdparams[0].ToString());
163
164 LoadXmlLinkFile(cmdparams[0].ToString());
165 }
166
167
168
169
170
171
172
173
174
175
147 if (command.Equals("link-mapping")) 176 if (command.Equals("link-mapping"))
148 { 177 {
149 if (cmdparams.Count == 2) 178 if (cmdparams.Count == 2)
@@ -233,6 +262,56 @@ namespace OpenSim
233 } 262 }
234 } 263 }
235 264
265 private void LoadXmlLinkFile(string URI)
266 {
267
268
269 //use http://www.hgurl.com/hypergrid.xml for test
270
271 RegionInfo RegInfo;
272
273 try
274 {
275
276
277 XmlReader r = XmlReader.Create(URI);
278 XmlConfigSource reader = new XmlConfigSource(r);
279
280
281 for (int t = 0; t < reader.Configs.Count; t++)
282 {
283
284 m_log.Info(reader.Configs[t].Name);
285 m_log.Info(reader.Configs[t].Get("xloc").ToString());
286 string region_Name = reader.Configs[t].Name;
287 uint xloc = (uint)reader.Configs[t].GetInt("xloc");
288 uint yloc = (uint)reader.Configs[t].GetInt("yloc");
289 uint externalPort = (uint)reader.Configs[t].GetInt("externalPort");
290 string externalHostName = reader.Configs[t].Get("externalHostName");
291
292
293
294 HGHyperlink.TryCreateLink(m_sceneManager.CurrentOrFirstScene, null, xloc, yloc, region_Name, externalPort, externalHostName, out RegInfo);
295
296
297 }
298
299 r.Close();
300
301
302
303 }
304
305 catch (Exception e)
306 {
307 m_log.Info(e.ToString());
308 }
309
310
311 }
312
313
314
236 /* 315 /*
237 private void LoadXmlLinkFile(string[] cmdparams) 316 private void LoadXmlLinkFile(string[] cmdparams)
238 { 317 {