diff --git a/OpenSim.FrameWork/AgentCiruitData.cs b/OpenSim.FrameWork/AgentCiruitData.cs new file mode 100644 index 0000000000..3ab8a804a1 --- /dev/null +++ b/OpenSim.FrameWork/AgentCiruitData.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; + +namespace OpenSim.Framework.Interfaces +{ + public class AgentCircuitData + { + public AgentCircuitData() { } + public LLUUID AgentID; + public LLUUID SessionID; + public LLUUID SecureSessionID; + public string firstname; + public string lastname; + public uint circuitcode; + } +} diff --git a/OpenSim.FrameWork/IAssetServer.cs b/OpenSim.FrameWork/IAssetServer.cs index 76c63fc193..a0de548a0e 100644 --- a/OpenSim.FrameWork/IAssetServer.cs +++ b/OpenSim.FrameWork/IAssetServer.cs @@ -55,14 +55,14 @@ namespace OpenSim.Framework.Interfaces void AssetNotFound(AssetBase asset); } + public interface IAssetPlugin + { + IAssetServer GetAssetServer(); + } + public struct ARequest { public LLUUID AssetID; public bool IsTexture; } - - public interface IAssetPlugin - { - IAssetServer GetAssetServer(); - } } diff --git a/OpenSim.FrameWork/IConfig.cs b/OpenSim.FrameWork/IConfig.cs index 355bd6cea4..ca7f6451b2 100644 --- a/OpenSim.FrameWork/IConfig.cs +++ b/OpenSim.FrameWork/IConfig.cs @@ -59,6 +59,10 @@ namespace OpenSim.Framework.Interfaces public string GridURL; public string GridSendKey; + public string GridRecvKey; + public string UserURL; + public string UserSendKey; + public string UserRecvKey; public abstract void InitConfig(bool sandboxMode); public abstract void LoadFromGrid(); diff --git a/OpenSim.FrameWork/IGridServer.cs b/OpenSim.FrameWork/IGridServer.cs index e08850418b..026dfab491 100644 --- a/OpenSim.FrameWork/IGridServer.cs +++ b/OpenSim.FrameWork/IGridServer.cs @@ -44,46 +44,15 @@ namespace OpenSim.Framework.Interfaces public interface IGridServer { UUIDBlock RequestUUIDBlock(); - void RequestNeighbours(); //should return a array of neighbouring regions + NeighbourInfo[] RequestNeighbours(); //should return a array of neighbouring regions AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); string GetName(); bool RequestConnection(); - void SetServerInfo(string ServerUrl, string ServerKey); + void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); void Close(); } - - public abstract class RemoteGridBase : IGridServer - { - public abstract Dictionary agentcircuits - { - get; - set; - } - - public abstract UUIDBlock RequestUUIDBlock(); - public abstract void RequestNeighbours(); - public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); - public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); - public abstract string GetName(); - public abstract bool RequestConnection(); - public abstract void SetServerInfo(string ServerUrl, string ServerKey); - public abstract void Close(); - } - - public abstract class LocalGridBase : IGridServer - { - public abstract UUIDBlock RequestUUIDBlock(); - public abstract void RequestNeighbours(); - public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); - public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); - public abstract string GetName(); - public abstract bool RequestConnection(); - public abstract void SetServerInfo(string ServerUrl, string ServerKey); - public abstract void AddNewSession(Login session); - public abstract void Close(); - } - + public struct UUIDBlock { public LLUUID BlockStart; @@ -102,35 +71,8 @@ namespace OpenSim.Framework.Interfaces } - public class Login - { - public string First = "Test"; - public string Last = "User"; - public LLUUID Agent; - public LLUUID Session; - public LLUUID InventoryFolder; - public LLUUID BaseFolder; - public Login() - { - - } - } - public interface IGridPlugin { IGridServer GetGridServer(); } - - public class agentcircuitdata - { - public agentcircuitdata() { } - public LLUUID AgentID; - public LLUUID SessionID; - public LLUUID SecureSessionID; - public string firstname; - public string lastname; - public uint circuitcode; - } - - } diff --git a/OpenSim.FrameWork/IUserServer.cs b/OpenSim.FrameWork/IUserServer.cs index 5e9d96e20d..bb2b668d7c 100644 --- a/OpenSim.FrameWork/IUserServer.cs +++ b/OpenSim.FrameWork/IUserServer.cs @@ -9,5 +9,6 @@ namespace OpenSim.Framework.Interfaces public interface IUserServer { AgentInventory RequestAgentsInventory(LLUUID agentID); + void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); } } diff --git a/OpenSim.FrameWork/LocalGridBase.cs b/OpenSim.FrameWork/LocalGridBase.cs new file mode 100644 index 0000000000..c9b278a846 --- /dev/null +++ b/OpenSim.FrameWork/LocalGridBase.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; + +namespace OpenSim.Framework.Interfaces +{ + public abstract class LocalGridBase : IGridServer + { + public abstract UUIDBlock RequestUUIDBlock(); + public abstract NeighbourInfo[] RequestNeighbours(); + public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); + public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); + public abstract string GetName(); + public abstract bool RequestConnection(); + public abstract void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); + public abstract void AddNewSession(Login session); + public abstract void Close(); + } + +} diff --git a/OpenSim.FrameWork/Login.cs b/OpenSim.FrameWork/Login.cs new file mode 100644 index 0000000000..f445960621 --- /dev/null +++ b/OpenSim.FrameWork/Login.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; + +namespace OpenSim.Framework.Interfaces +{ + public class Login + { + public string First = "Test"; + public string Last = "User"; + public LLUUID Agent; + public LLUUID Session; + public LLUUID InventoryFolder; + public LLUUID BaseFolder; + public Login() + { + + } + } +} diff --git a/OpenSim.FrameWork/NeighbourInfo.cs b/OpenSim.FrameWork/NeighbourInfo.cs new file mode 100644 index 0000000000..8b4fa64e1f --- /dev/null +++ b/OpenSim.FrameWork/NeighbourInfo.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Framework.Interfaces +{ + public class NeighbourInfo + { + public NeighbourInfo() + { + } + + public ulong regionhandle; + public uint RegionLocX; + public uint RegionLocY; + public string sim_ip; + public uint sim_port; + } +} diff --git a/OpenSim.FrameWork/OpenSim.Framework.csproj b/OpenSim.FrameWork/OpenSim.Framework.csproj index 61665f8309..a45add399e 100644 --- a/OpenSim.FrameWork/OpenSim.Framework.csproj +++ b/OpenSim.FrameWork/OpenSim.Framework.csproj @@ -39,6 +39,7 @@ + @@ -48,8 +49,12 @@ + + + + diff --git a/OpenSim.FrameWork/RemoteGridBase.cs b/OpenSim.FrameWork/RemoteGridBase.cs new file mode 100644 index 0000000000..6ca57dfffe --- /dev/null +++ b/OpenSim.FrameWork/RemoteGridBase.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; + +namespace OpenSim.Framework.Interfaces +{ + public abstract class RemoteGridBase : IGridServer + { + public abstract Dictionary agentcircuits + { + get; + set; + } + + public abstract UUIDBlock RequestUUIDBlock(); + public abstract NeighbourInfo[] RequestNeighbours(); + public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); + public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); + public abstract string GetName(); + public abstract bool RequestConnection(); + public abstract void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); + public abstract void Close(); + } +} diff --git a/OpenSim.FrameWork/Util.cs b/OpenSim.FrameWork/Util.cs index 620a6a549e..042360d094 100644 --- a/OpenSim.FrameWork/Util.cs +++ b/OpenSim.FrameWork/Util.cs @@ -29,13 +29,4 @@ namespace OpenSim.Framework.Utilities } } - public class QueItem - { - public QueItem() - { - } - - public Packet Packet; - public bool Incoming; - } } diff --git a/bin/PhysicsManager.dll b/bin/PhysicsManager.dll index 0928a9431f..954a5f4713 100644 Binary files a/bin/PhysicsManager.dll and b/bin/PhysicsManager.dll differ diff --git a/bin/RemoteGridServers.dll b/bin/RemoteGridServers.dll index 3344f2cdf3..0262bc8e6d 100644 Binary files a/bin/RemoteGridServers.dll and b/bin/RemoteGridServers.dll differ diff --git a/bin/ServerConsole.dll b/bin/ServerConsole.dll index f93869031d..7e7e084053 100644 Binary files a/bin/ServerConsole.dll and b/bin/ServerConsole.dll differ diff --git a/bin/SimConfig.dll b/bin/SimConfig.dll index bc657ac9df..ee49986b89 100644 Binary files a/bin/SimConfig.dll and b/bin/SimConfig.dll differ diff --git a/src/CAPS/SimHttp.cs b/src/CAPS/SimHttp.cs index 32b7001555..381a52b19f 100644 --- a/src/CAPS/SimHttp.cs +++ b/src/CAPS/SimHttp.cs @@ -63,7 +63,7 @@ namespace OpenSim ServerConsole.MainConsole.Instance.WriteLine("SimHttp.cs:StartHTTP() - Spawned main thread OK"); Listener = new HttpListener(); - Listener.Prefixes.Add("http://+:" + OpenSim_Main.Instance.Cfg.IPListenPort + "/"); + Listener.Prefixes.Add("http://+:" + OpenSimMain.Instance.Cfg.IPListenPort + "/"); Listener.Start(); HttpListenerContext context; @@ -89,16 +89,16 @@ namespace OpenSim switch (request.MethodName) { case "expect_user": - agentcircuitdata agent_data = new agentcircuitdata(); + AgentCircuitData agent_data = new AgentCircuitData(); agent_data.SessionID = new LLUUID((string)requestData["session_id"]); agent_data.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); agent_data.firstname = (string)requestData["firstname"]; agent_data.lastname = (string)requestData["lastname"]; agent_data.AgentID = new LLUUID((string)requestData["agent_id"]); agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); - if (OpenSim_Main.Instance.GridServers.GridServer.GetName() == "Remote") + if (OpenSimMain.Instance.GridServers.GridServer.GetName() == "Remote") { - ((RemoteGridBase)OpenSim_Main.Instance.GridServers.GridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); + ((RemoteGridBase)OpenSimMain.Instance.GridServers.GridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); } return ""; break; diff --git a/src/Config/SimConfig/Db4SimConfig.cs b/src/Config/SimConfig/Db4SimConfig.cs index 1fafc10153..9e56cfe800 100644 --- a/src/Config/SimConfig/Db4SimConfig.cs +++ b/src/Config/SimConfig/Db4SimConfig.cs @@ -63,7 +63,11 @@ namespace Db40SimConfig this.AssetURL=ServerConsole.MainConsole.Instance.CmdPrompt("Asset server URL: "); this.AssetSendKey=ServerConsole.MainConsole.Instance.CmdPrompt("Asset server key: "); this.GridURL=ServerConsole.MainConsole.Instance.CmdPrompt("Grid server URL: "); - this.GridSendKey=ServerConsole.MainConsole.Instance.CmdPrompt("Grid server key: "); + this.GridSendKey = ServerConsole.MainConsole.Instance.CmdPrompt("Key to send to grid server: "); + this.GridRecvKey = ServerConsole.MainConsole.Instance.CmdPrompt("Key to expect from grid server: "); + this.UserURL = ServerConsole.MainConsole.Instance.CmdPrompt("User server URL: "); + this.UserSendKey = ServerConsole.MainConsole.Instance.CmdPrompt("Key to send to user server: "); + this.UserRecvKey = ServerConsole.MainConsole.Instance.CmdPrompt("Key to expect from user server: "); } this.RegionHandle = Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); } diff --git a/src/GridServers/LocalUserProfileManager.cs b/src/GridServers/LocalUserProfileManager.cs index cb4c545d16..56c80c21f0 100644 --- a/src/GridServers/LocalUserProfileManager.cs +++ b/src/GridServers/LocalUserProfileManager.cs @@ -29,8 +29,8 @@ namespace OpenSim.Framework.LocalServers uint circode = (uint)response["circuit_code"]; theUser.AddSimCircuit(circode, LLUUID.Random()); response["home"] = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}"; - response["sim_port"] = OpenSim_Main.Instance.Cfg.IPListenPort; - response["sim_ip"] = OpenSim_Main.Instance.Cfg.IPListenAddr; + response["sim_port"] = OpenSimMain.Instance.Cfg.IPListenPort; + response["sim_ip"] = OpenSimMain.Instance.Cfg.IPListenAddr; response["region_y"] = (Int32)996 * 256; response["region_x"] = (Int32)997* 256; @@ -67,7 +67,7 @@ namespace OpenSim.Framework.LocalServers _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); //working on local computer if so lets add to the gridserver's list of sessions? - if (OpenSim_Main.Instance.GridServers.GridServer.GetName() == "Local") + if (OpenSimMain.Instance.GridServers.GridServer.GetName() == "Local") { ((LocalGridBase)this._gridServer).AddNewSession(_login); } diff --git a/src/GridServers/LoginServer.cs b/src/GridServers/LoginServer.cs index 57b08bb4d8..8820fbe510 100644 --- a/src/GridServers/LoginServer.cs +++ b/src/GridServers/LoginServer.cs @@ -289,8 +289,8 @@ namespace OpenSim.Framework.LocalServers XmlRpcResponse response = (XmlRpcResponse)(new XmlRpcResponseDeserializer()).Deserialize(this._defaultResponse); Hashtable responseData = (Hashtable)response.Value; - responseData["sim_port"] = OpenSim_Main.Instance.Cfg.IPListenPort; - responseData["sim_ip"] = OpenSim_Main.Instance.Cfg.IPListenAddr; + responseData["sim_port"] = OpenSimMain.Instance.Cfg.IPListenPort; + responseData["sim_ip"] = OpenSimMain.Instance.Cfg.IPListenAddr; responseData["agent_id"] = Agent.ToStringHyphenated(); responseData["session_id"] = Session.ToStringHyphenated(); responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; @@ -324,7 +324,7 @@ namespace OpenSim.Framework.LocalServers _login.InventoryFolder = InventoryFolderID; //working on local computer if so lets add to the gridserver's list of sessions? - if (OpenSim_Main.Instance.GridServers.GridServer.GetName() == "Local") + if (OpenSimMain.Instance.GridServers.GridServer.GetName() == "Local") { ((LocalGridBase)this._gridServer).AddNewSession(_login); } @@ -399,6 +399,11 @@ namespace OpenSim.Framework.LocalServers return aInventory; } + public void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) + { + + } + } diff --git a/src/LocalServers/LocalGridServers/LocalGrid.cs b/src/LocalServers/LocalGridServers/LocalGrid.cs index bec84d9e6f..5dca261eb4 100644 --- a/src/LocalServers/LocalGridServers/LocalGrid.cs +++ b/src/LocalServers/LocalGridServers/LocalGrid.cs @@ -291,13 +291,13 @@ namespace LocalGridServers UUIDBlock uuidBlock = new UUIDBlock(); return(uuidBlock); } - - public override void RequestNeighbours() + + public override NeighbourInfo[] RequestNeighbours() { - return; + return null; } - - public override void SetServerInfo(string ServerUrl, string ServerKey) + + public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) { } diff --git a/src/Main.cs b/src/Main.cs index 3c48d179e7..e068e30ff1 100644 --- a/src/Main.cs +++ b/src/Main.cs @@ -50,11 +50,11 @@ namespace OpenSim /// /// Description of MainForm. /// - public class OpenSim_Main + public class OpenSimMain { - private static OpenSim_Main instance = null; + private static OpenSimMain instance = null; - public static OpenSim_Main Instance + public static OpenSimMain Instance { get { @@ -93,7 +93,7 @@ namespace OpenSim Console.WriteLine("Starting...\n"); ServerConsole.MainConsole.Instance = new MServerConsole(ServerConsole.ConsoleBase.ConsoleType.Local, "", 0); - instance = new OpenSim_Main(); + instance = new OpenSimMain(); Instance.sandbox = false; Instance.loginserver = false; @@ -117,28 +117,28 @@ namespace OpenSim } } - OpenSim_Main.Instance.GridServers = new Grid(); + OpenSimMain.Instance.GridServers = new Grid(); if (Instance.sandbox) { - OpenSim_Main.Instance.GridServers.AssetDll = "LocalGridServers.dll"; - OpenSim_Main.Instance.GridServers.GridDll = "LocalGridServers.dll"; - OpenSim_Main.Instance.GridServers.LoadPlugins(); + OpenSimMain.Instance.GridServers.AssetDll = "LocalGridServers.dll"; + OpenSimMain.Instance.GridServers.GridDll = "LocalGridServers.dll"; + OpenSimMain.Instance.GridServers.LoadPlugins(); ServerConsole.MainConsole.Instance.WriteLine("Starting in Sandbox mode"); } else { - OpenSim_Main.Instance.GridServers.AssetDll = "RemoteGridServers.dll"; - OpenSim_Main.Instance.GridServers.GridDll = "RemoteGridServers.dll"; - OpenSim_Main.Instance.GridServers.LoadPlugins(); + OpenSimMain.Instance.GridServers.AssetDll = "RemoteGridServers.dll"; + OpenSimMain.Instance.GridServers.GridDll = "RemoteGridServers.dll"; + OpenSimMain.Instance.GridServers.LoadPlugins(); ServerConsole.MainConsole.Instance.WriteLine("Starting in Grid mode"); } if (Instance.loginserver && Instance.sandbox) { - LoginServer loginServer = new LoginServer(OpenSim_Main.Instance.GridServers.GridServer); + LoginServer loginServer = new LoginServer(OpenSimMain.Instance.GridServers.GridServer); loginServer.Startup(); } - Instance.AssetCache = new AssetCache(OpenSim_Main.Instance.GridServers.AssetServer); + Instance.AssetCache = new AssetCache(OpenSimMain.Instance.GridServers.AssetServer); Instance.InventoryCache = new InventoryManager(); Instance.Startup(); @@ -149,7 +149,7 @@ namespace OpenSim } } - private OpenSim_Main() + private OpenSimMain() { } @@ -175,8 +175,8 @@ namespace OpenSim Instance.LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this._physicsEngine); //should be reading from the config file what physics engine to use Instance.LocalWorld.PhysScene.SetTerrain(Instance.LocalWorld.LandMap); - OpenSim_Main.Instance.GridServers.AssetServer.SetServerInfo(OpenSim_Main.Instance.Cfg.AssetURL, OpenSim_Main.Instance.Cfg.AssetSendKey); - OpenSim_Main.Instance.GridServers.GridServer.SetServerInfo(OpenSim_Main.Instance.Cfg.GridURL, OpenSim_Main.Instance.Cfg.GridSendKey); + OpenSimMain.Instance.GridServers.AssetServer.SetServerInfo(OpenSimMain.Instance.Cfg.AssetURL, OpenSimMain.Instance.Cfg.AssetSendKey); + OpenSimMain.Instance.GridServers.GridServer.SetServerInfo(OpenSimMain.Instance.Cfg.GridURL, OpenSimMain.Instance.Cfg.GridSendKey, OpenSimMain.Instance.Cfg.GridRecvKey); Instance.LocalWorld.LoadStorageDLL("Db4LocalStorage.dll"); //all these dll names shouldn't be hard coded. Instance.LocalWorld.LoadPrimsFromStorage(); @@ -277,8 +277,8 @@ namespace OpenSim ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Killing clients"); // IMPLEMENT THIS ServerConsole.MainConsole.Instance.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); - OpenSim_Main.Instance.LocalWorld.Close(); - OpenSim_Main.Instance.GridServers.Close(); + OpenSimMain.Instance.LocalWorld.Close(); + OpenSimMain.Instance.GridServers.Close(); ServerConsole.MainConsole.Instance.Close(); Environment.Exit(0); } diff --git a/src/Second-server.csproj b/src/OpenSim.csproj similarity index 96% rename from src/Second-server.csproj rename to src/OpenSim.csproj index f4dcae8fa8..59f7a01b23 100644 --- a/src/Second-server.csproj +++ b/src/OpenSim.csproj @@ -6,7 +6,7 @@ Debug AnyCPU {132A6E3E-8F2D-4BF5-BDFB-8555F53F334E} - OpenSim.OpenSim_Main + OpenSim.OpenSimMain False False 4 diff --git a/src/OpenSimClient.cs b/src/OpenSimClient.cs index 3aa3480f7e..4d09ba809d 100644 --- a/src/OpenSimClient.cs +++ b/src/OpenSimClient.cs @@ -103,15 +103,15 @@ namespace OpenSim switch (Pack.Type) { case PacketType.CompleteAgentMovement: - ClientAvatar.CompleteMovement(OpenSim_Main.Instance.LocalWorld); + ClientAvatar.CompleteMovement(OpenSimMain.Instance.LocalWorld); ClientAvatar.SendInitialPosition(); break; case PacketType.RegionHandshakeReply: - OpenSim_Main.Instance.LocalWorld.SendLayerData(this); + OpenSimMain.Instance.LocalWorld.SendLayerData(this); break; case PacketType.AgentWearablesRequest: ClientAvatar.SendInitialAppearance(); - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { if (client.AgentID != this.AgentID) { @@ -120,10 +120,10 @@ namespace OpenSim client.ClientAvatar.SendAppearanceToOtherAgent(this); } } - OpenSim_Main.Instance.LocalWorld.GetInitialPrims(this); + OpenSimMain.Instance.LocalWorld.GetInitialPrims(this); break; case PacketType.ObjectAdd: - OpenSim_Main.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this); + OpenSimMain.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this); break; case PacketType.ObjectLink: ServerConsole.MainConsole.Instance.WriteLine(Pack.ToString()); @@ -135,7 +135,7 @@ namespace OpenSim ObjectShapePacket shape = (ObjectShapePacket)Pack; for (int i = 0; i < shape.ObjectData.Length; i++) { - foreach (Entity ent in OpenSim_Main.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in OpenSimMain.Instance.LocalWorld.Entities.Values) { if (ent.localid == shape.ObjectData[i].ObjectLocalID) { @@ -152,7 +152,7 @@ namespace OpenSim if (multipleupdate.ObjectData[i].Type == 9) //change position { libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); - foreach (Entity ent in OpenSim_Main.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in OpenSimMain.Instance.LocalWorld.Entities.Values) { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { @@ -166,7 +166,7 @@ namespace OpenSim else if (multipleupdate.ObjectData[i].Type == 10)//rotation { libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); - foreach (Entity ent in OpenSim_Main.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in OpenSimMain.Instance.LocalWorld.Entities.Values) { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { @@ -179,7 +179,7 @@ namespace OpenSim { libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); - foreach (Entity ent in OpenSim_Main.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in OpenSimMain.Instance.LocalWorld.Entities.Values) { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { @@ -193,13 +193,13 @@ namespace OpenSim RequestImagePacket imageRequest = (RequestImagePacket)Pack; for (int i = 0; i < imageRequest.RequestImage.Length; i++) { - OpenSim_Main.Instance.AssetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); + OpenSimMain.Instance.AssetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); } break; case PacketType.TransferRequest: //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request"); TransferRequestPacket transfer = (TransferRequestPacket)Pack; - OpenSim_Main.Instance.AssetCache.AddAssetRequest(this, transfer); + OpenSimMain.Instance.AssetCache.AddAssetRequest(this, transfer); break; case PacketType.AgentUpdate: ClientAvatar.HandleUpdate((AgentUpdatePacket)Pack); @@ -219,17 +219,17 @@ namespace OpenSim kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); kill.ObjectData[0].ID = this.ClientAvatar.localid; - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(kill); } - OpenSim_Main.Instance.GridServers.GridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); - lock (OpenSim_Main.Instance.LocalWorld.Entities) + OpenSimMain.Instance.GridServers.GridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); + lock (OpenSimMain.Instance.LocalWorld.Entities) { - OpenSim_Main.Instance.LocalWorld.Entities.Remove(this.AgentID); + OpenSimMain.Instance.LocalWorld.Entities.Remove(this.AgentID); } //need to do other cleaning up here too - OpenSim_Main.Instance.ClientThreads.Remove(this.userEP); + OpenSimMain.Instance.ClientThreads.Remove(this.userEP); this.ClientThread.Abort(); break; case PacketType.ChatFromViewer: @@ -246,7 +246,7 @@ namespace OpenSim reply.ChatData.FromName = _enc.GetBytes(this.ClientAvatar.firstname + " " + this.ClientAvatar.lastname + "\0"); reply.ChatData.OwnerID = this.AgentID; reply.ChatData.SourceID = this.AgentID; - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(reply); } @@ -255,7 +255,7 @@ namespace OpenSim ObjectImagePacket imagePack = (ObjectImagePacket)Pack; for (int i = 0; i < imagePack.ObjectData.Length; i++) { - foreach (Entity ent in OpenSim_Main.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in OpenSimMain.Instance.LocalWorld.Entities.Values) { if (ent.localid == imagePack.ObjectData[i].ObjectLocalID) { @@ -266,7 +266,7 @@ namespace OpenSim break; case PacketType.ObjectFlagUpdate: ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; - foreach (Entity ent in OpenSim_Main.Instance.LocalWorld.Entities.Values) + foreach (Entity ent in OpenSimMain.Instance.LocalWorld.Entities.Values) { if (ent.localid == flags.AgentData.ObjectLocalID) { @@ -321,11 +321,11 @@ namespace OpenSim case PacketType.FetchInventory: Console.WriteLine("fetch item packet"); FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack; - OpenSim_Main.Instance.InventoryCache.FetchInventory(this, FetchInventory); + OpenSimMain.Instance.InventoryCache.FetchInventory(this, FetchInventory); break; case PacketType.FetchInventoryDescendents: FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; - OpenSim_Main.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); + OpenSimMain.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); break; } } @@ -464,11 +464,11 @@ namespace OpenSim if (Pack.Header.Zerocoded) { int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); - OpenSim_Main.Instance.Server.SendTo(ZeroOutBuffer, packetsize, SocketFlags.None, userEP); + OpenSimMain.Instance.Server.SendTo(ZeroOutBuffer, packetsize, SocketFlags.None, userEP); } else { - OpenSim_Main.Instance.Server.SendTo(sendbuffer, sendbuffer.Length, SocketFlags.None, userEP); + OpenSimMain.Instance.Server.SendTo(sendbuffer, sendbuffer.Length, SocketFlags.None, userEP); } } catch (Exception) @@ -569,14 +569,14 @@ namespace OpenSim private void InitNewClient() { ServerConsole.MainConsole.Instance.WriteLine("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); - OpenSim_Main.Instance.LocalWorld.AddViewerAgent(this); - world.Entity tempent = OpenSim_Main.Instance.LocalWorld.Entities[this.AgentID]; + OpenSimMain.Instance.LocalWorld.AddViewerAgent(this); + world.Entity tempent = OpenSimMain.Instance.LocalWorld.Entities[this.AgentID]; this.ClientAvatar = (world.Avatar)tempent; } private void AuthUser() { - AuthenticateResponse sessionInfo = OpenSim_Main.Instance.GridServers.GridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); + AuthenticateResponse sessionInfo = OpenSimMain.Instance.GridServers.GridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); if (!sessionInfo.Authorised) { //session/circuit not authorised @@ -595,16 +595,16 @@ namespace OpenSim this.ClientAvatar.lastname = sessionInfo.LoginInfo.Last; // Create Inventory, currently only works for sandbox mode - if (OpenSim_Main.Instance.sandbox) + if (OpenSimMain.Instance.sandbox) { if (sessionInfo.LoginInfo.InventoryFolder != null) { this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder); if (sessionInfo.LoginInfo.BaseFolder != null) { - OpenSim_Main.Instance.InventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); + OpenSimMain.Instance.InventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder; - AssetBase[] inventorySet = OpenSim_Main.Instance.AssetCache.CreateNewInventorySet(this.AgentID); + AssetBase[] inventorySet = OpenSimMain.Instance.AssetCache.CreateNewInventorySet(this.AgentID); if (inventorySet != null) { for (int i = 0; i < inventorySet.Length; i++) @@ -612,7 +612,7 @@ namespace OpenSim if (inventorySet[i] != null) { Console.WriteLine(Helpers.FieldToString(inventorySet[i].Data)); - OpenSim_Main.Instance.InventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]); + OpenSimMain.Instance.InventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]); } } } @@ -628,9 +628,19 @@ namespace OpenSim { AgentInventory inventory = new AgentInventory(); inventory.AgentID = this.AgentID; - OpenSim_Main.Instance.InventoryCache.AddNewAgentsInventory(inventory); - OpenSim_Main.Instance.InventoryCache.CreateNewInventoryFolder(this, baseFolder); + OpenSimMain.Instance.InventoryCache.AddNewAgentsInventory(inventory); + OpenSimMain.Instance.InventoryCache.CreateNewInventoryFolder(this, baseFolder); } } + public class QueItem + { + public QueItem() + { + } + + public Packet Packet; + public bool Incoming; + } + } diff --git a/src/OpenSimConsole.cs b/src/OpenSimConsole.cs index 6a94288599..760db2f981 100644 --- a/src/OpenSimConsole.cs +++ b/src/OpenSimConsole.cs @@ -156,11 +156,11 @@ namespace OpenSim break; case "regenerate": - OpenSim_Main.Instance.LocalWorld.RegenerateTerrain(); + OpenSimMain.Instance.LocalWorld.RegenerateTerrain(); break; case "shutdown": - OpenSim_Main.Shutdown(); + OpenSimMain.Shutdown(); break; } return null; @@ -170,16 +170,16 @@ namespace OpenSim public override void ShowCommands(string ShowWhat) { switch(ShowWhat) { case "uptime": - this.WriteLine("OpenSim has been running since " + OpenSim_Main.Instance.startuptime.ToString()); - this.WriteLine("That is " + (DateTime.Now-OpenSim_Main.Instance.startuptime).ToString()); + this.WriteLine("OpenSim has been running since " + OpenSimMain.Instance.startuptime.ToString()); + this.WriteLine("That is " + (DateTime.Now-OpenSimMain.Instance.startuptime).ToString()); break; case "users": OpenSim.world.Avatar TempAv; this.WriteLine(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}","Firstname", "Lastname","Agent ID", "Session ID", "Circuit", "IP")); - foreach (libsecondlife.LLUUID UUID in OpenSim_Main.Instance.LocalWorld.Entities.Keys) { - if(OpenSim_Main.Instance.LocalWorld.Entities[UUID].ToString()== "OpenSim.world.Avatar") + foreach (libsecondlife.LLUUID UUID in OpenSimMain.Instance.LocalWorld.Entities.Keys) { + if(OpenSimMain.Instance.LocalWorld.Entities[UUID].ToString()== "OpenSim.world.Avatar") { - TempAv=(OpenSim.world.Avatar)OpenSim_Main.Instance.LocalWorld.Entities[UUID]; + TempAv=(OpenSim.world.Avatar)OpenSimMain.Instance.LocalWorld.Entities[UUID]; this.WriteLine(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}",TempAv.firstname, TempAv.lastname,UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString())); } } @@ -190,7 +190,7 @@ namespace OpenSim // Displays a prompt to the user and then runs the command they entered public override void MainConsolePrompt() { string[] tempstrarray; - string tempstr = this.CmdPrompt("OpenSim-" + OpenSim_Main.Instance.Cfg.RegionHandle.ToString() + " # "); + string tempstr = this.CmdPrompt("OpenSim-" + OpenSimMain.Instance.Cfg.RegionHandle.ToString() + " # "); tempstrarray = tempstr.Split(' '); string cmd=tempstrarray[0]; Array.Reverse(tempstrarray); diff --git a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs index f77d8025fa..d66f1c875b 100644 --- a/src/RemoteServers/RemoteGridServers/RemoteGrid.cs +++ b/src/RemoteServers/RemoteGridServers/RemoteGrid.cs @@ -70,9 +70,10 @@ namespace RemoteGridServers { private string GridServerUrl; private string GridSendKey; - private Dictionary AgentCircuits = new Dictionary(); + private string GridRecvKey; + private Dictionary AgentCircuits = new Dictionary(); - public override Dictionary agentcircuits + public override Dictionary agentcircuits { get { return AgentCircuits; } set { AgentCircuits = value; } @@ -90,7 +91,7 @@ namespace RemoteGridServers public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) { - agentcircuitdata validcircuit = null; + AgentCircuitData validcircuit = null; if (this.AgentCircuits.ContainsKey(circuitcode)) { validcircuit = this.AgentCircuits[circuitcode]; @@ -145,15 +146,16 @@ namespace RemoteGridServers return (uuidBlock); } - public override void RequestNeighbours() + public override NeighbourInfo[] RequestNeighbours() { - return; + return null; } - public override void SetServerInfo(string ServerUrl, string ServerKey) + public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) { this.GridServerUrl = ServerUrl; - this.GridSendKey = ServerKey; + this.GridSendKey = SendKey; + this.GridRecvKey = RecvKey; } public override string GetName() diff --git a/src/ServerConsole/ServerConsole/ServerConsole.csproj b/src/ServerConsole/ServerConsole/ServerConsole.csproj index 3d85860169..7e9c97655a 100644 --- a/src/ServerConsole/ServerConsole/ServerConsole.csproj +++ b/src/ServerConsole/ServerConsole/ServerConsole.csproj @@ -28,8 +28,8 @@ - + \ No newline at end of file diff --git a/src/opensim.sln b/src/opensim.sln index e068d24d7d..92da291789 100644 --- a/src/opensim.sln +++ b/src/opensim.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual C# Express 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Second-server", "Second-server.csproj", "{132A6E3E-8F2D-4BF5-BDFB-8555F53F334E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim.csproj", "{132A6E3E-8F2D-4BF5-BDFB-8555F53F334E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhysicsManager", "physics\PhysicsManager.csproj", "{3C86A846-7977-4EE7-A8DC-DD487FA5DC2B}" EndProject diff --git a/src/world/Avatar.cs b/src/world/Avatar.cs index 0717c56f44..cc7a5919b3 100644 --- a/src/world/Avatar.cs +++ b/src/world/Avatar.cs @@ -27,9 +27,9 @@ namespace OpenSim.world { ServerConsole.MainConsole.Instance.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); ControllingClient = TheClient; - localid = 8880000 + (OpenSim_Main.Instance.LocalWorld._localNumber++); + localid = 8880000 + (OpenSimMain.Instance.LocalWorld._localNumber++); position = new LLVector3(100.0f, 100.0f, 30.0f); - position.Z = OpenSim_Main.Instance.LocalWorld.LandMap[(int)position.Y * 256 + (int)position.X] + 1; + position.Z = OpenSimMain.Instance.LocalWorld.LandMap[(int)position.Y * 256 + (int)position.X] + 1; } public PhysicsActor PhysActor @@ -73,11 +73,11 @@ namespace OpenSim.world //use CreateTerseBlock() ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); - terse.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; // FIXME + terse.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; // FIXME terse.RegionData.TimeDilation = 64096; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData[0] = terseBlock; - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(terse); } @@ -95,11 +95,11 @@ namespace OpenSim.world //It has been a while since last update was sent so lets send one. ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); - terse.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; // FIXME + terse.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; // FIXME terse.RegionData.TimeDilation = 64096; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData[0] = terseBlock; - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(terse); } @@ -141,7 +141,7 @@ namespace OpenSim.world AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); mov.AgentData.SessionID = this.ControllingClient.SessionID; mov.AgentData.AgentID = this.ControllingClient.AgentID; - mov.Data.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; + mov.Data.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; // TODO - dynamicalise this stuff mov.Data.Timestamp = 1172750370; mov.Data.Position = new LLVector3(100f, 100f, 23f); @@ -156,7 +156,7 @@ namespace OpenSim.world System.Text.Encoding _enc = System.Text.Encoding.ASCII; //send a objectupdate packet with information about the clients avatar ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); - objupdate.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; + objupdate.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; objupdate.RegionData.TimeDilation = 64096; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; @@ -171,9 +171,9 @@ namespace OpenSim.world byte[] pb = pos2.GetBytes(); Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); - OpenSim_Main.Instance.LocalWorld._localNumber++; + OpenSimMain.Instance.LocalWorld._localNumber++; - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(objupdate); if (client.AgentID != ControllingClient.AgentID) @@ -215,7 +215,7 @@ namespace OpenSim.world System.Text.Encoding _enc = System.Text.Encoding.ASCII; //send a objectupdate packet with information about the clients avatar ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); - objupdate.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; + objupdate.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; objupdate.RegionData.TimeDilation = 64096; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; @@ -394,7 +394,7 @@ namespace OpenSim.world handshake.RegionInfo.SimAccess = 13; handshake.RegionInfo.WaterHeight = 20; handshake.RegionInfo.RegionFlags = 72458694; - handshake.RegionInfo.SimName = _enc.GetBytes(OpenSim_Main.Instance.Cfg.RegionName + "\0"); + handshake.RegionInfo.SimName = _enc.GetBytes(OpenSimMain.Instance.Cfg.RegionName + "\0"); handshake.RegionInfo.SimOwner = new LLUUID("00000000-0000-0000-0000-000000000000"); handshake.RegionInfo.TerrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); handshake.RegionInfo.TerrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); diff --git a/src/world/Primitive.cs b/src/world/Primitive.cs index 149dd8665b..0ef318d199 100644 --- a/src/world/Primitive.cs +++ b/src/world/Primitive.cs @@ -99,7 +99,7 @@ namespace OpenSim.world { if (this.newPrimFlag) { - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(OurPacket); } @@ -108,11 +108,11 @@ namespace OpenSim.world else if (this.updateFlag) { ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); - terse.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; // FIXME + terse.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; // FIXME terse.RegionData.TimeDilation = 64096; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData[0] = this.CreateImprovedBlock(); - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(terse); } @@ -120,7 +120,7 @@ namespace OpenSim.world } else if (this.dirtyFlag) { - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { UpdateClient(client); } @@ -131,11 +131,11 @@ namespace OpenSim.world if (this._physActor != null && this.physicsEnabled) { ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); - terse.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; // FIXME + terse.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; // FIXME terse.RegionData.TimeDilation = 64096; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData[0] = this.CreateImprovedBlock(); - foreach (OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) + foreach (OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { client.OutPacket(terse); } @@ -254,7 +254,7 @@ namespace OpenSim.world public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID) { ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); - objupdate.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; + objupdate.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; objupdate.RegionData.TimeDilation = 64096; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; @@ -322,7 +322,7 @@ namespace OpenSim.world { //need to clean this up as it shares a lot of code with CreateFromPacket() ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); - objupdate.RegionData.RegionHandle = OpenSim_Main.Instance.Cfg.RegionHandle; + objupdate.RegionData.RegionHandle = OpenSimMain.Instance.Cfg.RegionHandle; objupdate.RegionData.TimeDilation = 64096; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; @@ -478,7 +478,7 @@ namespace OpenSim.world this.primData.LocalID = this.localid; this.primData.Position = this.position; this.primData.Rotation = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); - OpenSim_Main.Instance.LocalWorld.localStorage.StorePrim(this.primData); + OpenSimMain.Instance.LocalWorld.localStorage.StorePrim(this.primData); } } diff --git a/src/world/World.cs b/src/world/World.cs index fbab044e15..231e2da5ab 100644 --- a/src/world/World.cs +++ b/src/world/World.cs @@ -114,9 +114,9 @@ namespace OpenSim.world HeightmapGenHills hills = new HeightmapGenHills(); this.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); this.phyScene.SetTerrain(this.LandMap); - OpenSim_Main.Instance.Cfg.SaveMap(this.LandMap); + OpenSimMain.Instance.Cfg.SaveMap(this.LandMap); - foreach(OpenSimClient client in OpenSim_Main.Instance.ClientThreads.Values) { + foreach(OpenSimClient client in OpenSimMain.Instance.ClientThreads.Values) { this.SendLayerData(client); } }