aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/HGOpenSimNode.cs
diff options
context:
space:
mode:
authorlbsa712009-03-10 20:27:41 +0000
committerlbsa712009-03-10 20:27:41 +0000
commit91a096dca6adc62bb6b185d391a8d2181291e9a3 (patch)
tree748fdbd1eee8a4bb907481241c0a19664b309b11 /OpenSim/Region/Application/HGOpenSimNode.cs
parent* Cleanup and CCC (Code Convention Conformance) (diff)
downloadopensim-SC-91a096dca6adc62bb6b185d391a8d2181291e9a3.zip
opensim-SC-91a096dca6adc62bb6b185d391a8d2181291e9a3.tar.gz
opensim-SC-91a096dca6adc62bb6b185d391a8d2181291e9a3.tar.bz2
opensim-SC-91a096dca6adc62bb6b185d391a8d2181291e9a3.tar.xz
* Cleanup and CCC (Code Convention Conformance)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/HGOpenSimNode.cs46
1 files changed, 25 insertions, 21 deletions
diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs
index 44c1602..6e7f1c5 100644
--- a/OpenSim/Region/Application/HGOpenSimNode.cs
+++ b/OpenSim/Region/Application/HGOpenSimNode.cs
@@ -33,11 +33,7 @@ using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
36using OpenSim.Framework.Communications.Cache;
37using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
38using OpenSim.Framework.Servers;
39using OpenSim.Region.Communications.Hypergrid;
40using OpenSim.Region.Communications.Local;
41using OpenSim.Region.Framework; 37using OpenSim.Region.Framework;
42using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
43using OpenSim.Region.Framework.Scenes.Hypergrid; 39using OpenSim.Region.Framework.Scenes.Hypergrid;
@@ -68,24 +64,26 @@ namespace OpenSim
68 64
69 base.StartupSpecific(); 65 base.StartupSpecific();
70 66
71 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand); 67 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>",
72 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand); 68 "Set local coordinate to map HG regions to", RunCommand);
73 69 MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region",
70 "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>",
71 "Link a hypergrid region", RunCommand);
74 } 72 }
75 73
76 protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, 74 protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
77 AgentCircuitManager circuitManager) 75 AgentCircuitManager circuitManager)
78 { 76 {
79 HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices); 77 HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager, HGServices);
80 78
81 return 79 return
82 new HGScene( 80 new HGScene(
83 regionInfo, circuitManager, m_commsManager, sceneGridService, storageManager, 81 regionInfo, circuitManager, m_commsManager, sceneGridService, storageManager,
84 m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim, 82 m_moduleLoader, m_configSettings.DumpAssetsToFile, m_configSettings.PhysicalPrim,
85 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); 83 m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
86 } 84 }
87 85
88 new void RunCommand(string module, string[] cp) 86 private new void RunCommand(string module, string[] cp)
89 { 87 {
90 List<string> cmdparams = new List<string>(cp); 88 List<string> cmdparams = new List<string>(cp);
91 if (cmdparams.Count < 1) 89 if (cmdparams.Count < 1)
@@ -128,7 +126,8 @@ namespace OpenSim
128 } 126 }
129 127
130 if (cmdparams[2].Contains(":")) 128 if (cmdparams[2].Contains(":"))
131 { // New format 129 {
130 // New format
132 uint xloc, yloc; 131 uint xloc, yloc;
133 string mapName; 132 string mapName;
134 try 133 try
@@ -154,7 +153,8 @@ namespace OpenSim
154 HGHyperlink.TryLinkRegionToCoords(m_sceneManager.CurrentOrFirstScene, null, mapName, xloc, yloc); 153 HGHyperlink.TryLinkRegionToCoords(m_sceneManager.CurrentOrFirstScene, null, mapName, xloc, yloc);
155 } 154 }
156 else 155 else
157 { // old format 156 {
157 // old format
158 RegionInfo regInfo; 158 RegionInfo regInfo;
159 uint xloc, yloc; 159 uint xloc, yloc;
160 uint externalPort; 160 uint externalPort;
@@ -205,7 +205,7 @@ namespace OpenSim
205 { 205 {
206 string excludeString = cmdparams[1].ToLower(); 206 string excludeString = cmdparams[1].ToLower();
207 excludeString = excludeString.Remove(0, 12); 207 excludeString = excludeString.Remove(0, 12);
208 char[] splitter = { ';' }; 208 char[] splitter = {';'};
209 209
210 excludeSections = excludeString.Split(splitter); 210 excludeSections = excludeString.Split(splitter);
211 } 211 }
@@ -236,7 +236,7 @@ namespace OpenSim
236 m_log.Error(e.ToString()); 236 m_log.Error(e.ToString());
237 } 237 }
238 } 238 }
239 239
240 240
241 private void ReadLinkFromConfig(IConfig config) 241 private void ReadLinkFromConfig(IConfig config)
242 { 242 {
@@ -255,19 +255,23 @@ namespace OpenSim
255 255
256 if (m_enableAutoMapping) 256 if (m_enableAutoMapping)
257 { 257 {
258 xloc = (uint)((xloc % 100) + m_autoMappingX); 258 xloc = (uint) ((xloc%100) + m_autoMappingX);
259 yloc = (uint)((yloc % 100) + m_autoMappingY); 259 yloc = (uint) ((yloc%100) + m_autoMappingY);
260 } 260 }
261 261
262 if (((realXLoc == 0) && (realYLoc == 0)) || (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) && ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896)))) 262 if (((realXLoc == 0) && (realYLoc == 0)) ||
263 (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) &&
264 ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896))))
263 { 265 {
264 if (HGHyperlink.TryCreateLink(m_sceneManager.CurrentOrFirstScene, null, xloc, yloc, "", externalPort, externalHostName, out regInfo)) 266 if (
267 HGHyperlink.TryCreateLink(m_sceneManager.CurrentOrFirstScene, null, xloc, yloc, "", externalPort,
268 externalHostName, out regInfo))
265 { 269 {
266 regInfo.RegionName = config.GetString("localName", ""); 270 regInfo.RegionName = config.GetString("localName", "");
267 } 271 }
268 } 272 }
269 } 273 }
270 274
271 275
272 private void LinkRegionCmdUsage() 276 private void LinkRegionCmdUsage()
273 { 277 {
@@ -276,4 +280,4 @@ namespace OpenSim
276 m_log.Info("Usage: link-region <URI_of_xml> [<exclude>]"); 280 m_log.Info("Usage: link-region <URI_of_xml> [<exclude>]");
277 } 281 }
278 } 282 }
279} 283} \ No newline at end of file