From ddf0174be9ccd3224e41ac5cc211d16a6e2237ac Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 19 Mar 2007 18:04:04 +0000 Subject: [PATCH] More Refactoring. Merged changes from trunk r237 --- OpenSim.FrameWork/AgentCiruitData.cs | 18 +++++ OpenSim.FrameWork/IAssetServer.cs | 10 +-- OpenSim.FrameWork/IConfig.cs | 4 + OpenSim.FrameWork/IGridServer.cs | 64 +-------------- OpenSim.FrameWork/IUserServer.cs | 1 + OpenSim.FrameWork/LocalGridBase.cs | 21 +++++ OpenSim.FrameWork/Login.cs | 21 +++++ OpenSim.FrameWork/NeighbourInfo.cs | 19 +++++ OpenSim.FrameWork/OpenSim.Framework.csproj | 5 ++ OpenSim.FrameWork/RemoteGridBase.cs | 25 ++++++ OpenSim.FrameWork/Util.cs | 9 --- bin/PhysicsManager.dll | Bin 20480 -> 20480 bytes bin/RemoteGridServers.dll | Bin 20480 -> 20480 bytes bin/ServerConsole.dll | Bin 16384 -> 16384 bytes bin/SimConfig.dll | Bin 20480 -> 20480 bytes src/CAPS/SimHttp.cs | 8 +- src/Config/SimConfig/Db4SimConfig.cs | 6 +- src/GridServers/LocalUserProfileManager.cs | 6 +- src/GridServers/LoginServer.cs | 11 ++- .../LocalGridServers/LocalGrid.cs | 10 +-- src/Main.cs | 36 ++++----- src/{Second-server.csproj => OpenSim.csproj} | 2 +- src/OpenSimClient.cs | 74 ++++++++++-------- src/OpenSimConsole.cs | 16 ++-- .../RemoteGridServers/RemoteGrid.cs | 16 ++-- .../ServerConsole/ServerConsole.csproj | 2 +- src/opensim.sln | 2 +- src/world/Avatar.cs | 24 +++--- src/world/Primitive.cs | 18 ++--- src/world/World.cs | 4 +- 30 files changed, 250 insertions(+), 182 deletions(-) create mode 100644 OpenSim.FrameWork/AgentCiruitData.cs create mode 100644 OpenSim.FrameWork/LocalGridBase.cs create mode 100644 OpenSim.FrameWork/Login.cs create mode 100644 OpenSim.FrameWork/NeighbourInfo.cs create mode 100644 OpenSim.FrameWork/RemoteGridBase.cs rename src/{Second-server.csproj => OpenSim.csproj} (96%) 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 0928a9431f936e7dae8a05ebd96a328d2b8e76ff..954a5f47131dedd1c207ce34e1b63a298253acf3 100644 GIT binary patch delta 135 zcmZozz}T>WaY6_4ozwp|b~j3~cyX<(nJge}24t+Q+3Y2~iCti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I%6H7~?v9nc^_T z?OgM5eUzpOKa86gyd7bRSB^zHM!?><{Ap-LO!V)*P$XauRyvOo>bBFPI^B+u> zT}DenwB$>p{D`fMc8S7r#+0U|MSjPm4mMXxm)tbH=(5cv6BD9;uM9GtO;))_F^K7I z1Or&;UL=>fZ=%Gmafw~qU_$d*^DFKnveMREDZAZejDuY3i|ptZQi4L6|Fi>t7gaE#aDno_SqVzU@`=xPzK#Z)Wt8kH5DL35XXu5Ox)__ykkX{M!& ztGt9)$6Jc>F#H^4z8MX%Z$wwa%ZzgNUgq23piE|zk#!H4pm=69-*uSoWyZYB!H_Gl z>ACSW)2k{blD;1_%+io(yoxhsS&8dB$Het?JGo9(>gL5}d5yNxfw=ZEFL|BuDqE@; zeEJf^UH&Umdkg-_59R-ks6V~F(oB5qvk%t4nzv6a_M^>DzYDa+4qz3)>=H{|%Fa5MOt0@dx=*z6Ar$C};$0*iQc{Qv*} diff --git a/bin/ServerConsole.dll b/bin/ServerConsole.dll index f93869031d15c90d7c7bed8dcfcdfff66127c638..7e7e0840532f738d5872e68932b9f69887952923 100644 GIT binary patch delta 126 zcmZo@U~Fh$oY291`}Dt!-Pyt{UR-NyHvbZ~V-`?9^J!(vlI6aOm#txttZlL1>>=*L z$-TD5i;IDQkpW0=p02>p$ZNu&$6(B0$Y2S?=9@PwYNH8FeywDUrsyN%IiAgo2LJg1 DtFI+C delta 126 zcmZo@U~Fh$oY2ASm;QHSceXH#CzpEh=3l~g%mT-FtsY%iJJWUdz2cSZHQK$KJ;Yr& zxz&q3xfmE28G!WW=?eUeyv7WA3`Pu=3?>Zb43?WWD{7+&O@6Ipji%@$<2jzqj0XSt E0me2W@c;k- diff --git a/bin/SimConfig.dll b/bin/SimConfig.dll index bc657ac9df0cc12e386e50f56d4d4e6776a1714d..ee49986b890c7bd947a17e673227a2d4a9d72ba0 100644 GIT binary patch delta 1968 zcmbVNZ){Ul6hH61`(D?s>)N&Jzp>g`7|-sH?HI7ljZCAN4hhR@)o22ltl$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hBS#k9Ef8}$#h0EFUjhDT{S%9N}&mcfVEXP7DMve(r+Kkg=)~l3o zls_-vD}W8|#sS`G1|V#c^s!ODM&j&kzab>YSvoMG3dInBD+&Z)QYd0v&DM6Id1^O8 zf;|a@$NeI_sqNvM06>Kz#~(yYp|vBaM-g0-9>Y&~a2-=?9yD_r&XUigHqpK4OZqd2 zo`V$(aOx^M5j-qedDyMsi*p?~I54@jwY4$oJc&FB(E#nT2dKUmN7gLK`;C$UrU1zr znxzfdtVIes7QnSJ;I>?SA9`^seyuV7d6RYM8b;JDdZYF)8C!$8B{7AhPz>M&@`8YhBx-p}tnL zgdr&)$+OWm8*<T$46d9R!AaczUsY)X#K?PRWXrJPP$nXft; zGD~_lPAyRE zJVbiga=84;MO=~>z7g+%1V4*M5!VsDKqzNa>ZcO)n|R2?0_8Ck6R(^2nTfYe{K~{{ z5nb?z{zTceNMY_89%F#-;BQdzUWnk~!o&w6R88*;beP_f zuovxCcG-H2erJ(KGN19HZwDU#IWG?@*#Xj5$jg;yf}=_<&x3KVgwxg3TR!5&kl5 zC*h+ju!;%_;VV@L*uH?61A;a#q_Wl4F*@SX@+{tV1dV-pqtJFmQUmD)EK4g6PkL|(I!$Zd1&Ik!k*REq;wfDFkEyrY`lr6`ajbQR$;d5bu zFmGzMNz0F5%Mrk@@o~ydJiX8j8R&-ta1c_)r|HmB6uY0vJ{7b{9=V-(INX@0nl%E0 JkA3Bo{eKY4Cyf9A 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); } }