From 631d30b80dbffd786df64155510d01b0c0cb6da2 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 17 Apr 2007 13:39:21 +0000 Subject: Yet another command line option (really need to get all these moved into a config file), this one: "-localasset" (without the quotes) is a temporary hack to use a local asset server when in grid mode. (use with extreme caution if you have more than one sim in a grid) --- OpenSim.RegionServer/OpenSimMain.cs | 10 +++++++++- OpenSim.RegionServer/SimClient.cs | 1 - OpenSim/Application.cs | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index ea6088b..48eff1b 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -83,6 +83,7 @@ namespace OpenSim public bool m_sandbox = false; public bool m_loginserver; public bool user_accounts = false; + public bool gridLocalAsset = false; protected ConsoleBase m_console; @@ -126,7 +127,14 @@ namespace OpenSim } else { - GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; + if (this.gridLocalAsset) + { + GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; + } + else + { + GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; + } GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; m_console.WriteLine("Starting in Grid mode"); diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 0c90dcb..cc85b67 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -201,7 +201,6 @@ namespace OpenSim NewSimPack.Info.LookAt = new LLVector3(0.99f, 0.042f, 0); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!! NewSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock(); NewSimPack.RegionData.RegionHandle = Helpers.UIntsToLong((uint)(Convert.ToInt32(borderingSim["region_locx"]) * 256), (uint)(Convert.ToInt32(borderingSim["region_locy"]) * 256)); - System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse((string)borderingSim["sim_ip"]); byte[] byteIP = neighbourIP.GetAddressBytes(); NewSimPack.RegionData.SimIP = (uint)byteIP[3] << 24; diff --git a/OpenSim/Application.cs b/OpenSim/Application.cs index 34dbf8e..0e3d5a6 100644 --- a/OpenSim/Application.cs +++ b/OpenSim/Application.cs @@ -19,6 +19,7 @@ namespace OpenSim string physicsEngine = "basicphysics"; bool allowFlying = false; bool userAccounts = false; + bool gridLocalAsset = false; for (int i = 0; i < args.Length; i++) { @@ -45,12 +46,17 @@ namespace OpenSim physicsEngine = "OpenDynamicsEngine"; allowFlying = true; } + if (args[i] == "-localasset") + { + gridLocalAsset = true; + } } OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine ); // OpenSimRoot.Instance.Application = sim; sim.m_sandbox = sandBoxMode; sim.user_accounts = userAccounts; + sim.gridLocalAsset = gridLocalAsset; OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying; sim.StartUp(); -- cgit v1.1