diff --git a/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim.GridInterfaces/Local/LocalAssetServer.cs index 6cd954a037..fc0ba4a04a 100644 --- a/OpenSim.GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim.GridInterfaces/Local/LocalAssetServer.cs @@ -137,52 +137,92 @@ namespace OpenSim.GridInterfaces.Local private void SetUpAssetDatabase() { - Console.WriteLine("setting up Asset database"); + try + { - AssetBase Image = new AssetBase(); - Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); - Image.Name = "test Texture"; - this.LoadAsset(Image, true, "testpic2.jp2"); - AssetStorage store = new AssetStorage(); - store.Data = Image.Data; - store.Name = Image.Name; - store.UUID = Image.FullID; - db.Set(store); - db.Commit(); + Console.WriteLine("setting up Asset database"); - Image = new AssetBase(); - Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002"); - Image.Name = "test Texture2"; - this.LoadAsset(Image, true, "map_base.jp2"); - store = new AssetStorage(); - store.Data = Image.Data; - store.Name = Image.Name; - store.UUID = Image.FullID; - db.Set(store); - db.Commit(); + AssetBase Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); + Image.Name = "Bricks"; + this.LoadAsset(Image, true, "bricks.jp2"); + AssetStorage store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); - Image = new AssetBase(); - Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005"); - Image.Name = "Prim Base Texture"; - this.LoadAsset(Image, true, "testpic2.jp2"); - store = new AssetStorage(); - store.Data = Image.Data; - store.Name = Image.Name; - store.UUID = Image.FullID; - db.Set(store); - db.Commit(); + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002"); + Image.Name = "Plywood"; + this.LoadAsset(Image, true, "plywood.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); - Image = new AssetBase(); - Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); - Image.Name = "Shape"; - this.LoadAsset(Image, false, "base_shape.dat"); - store = new AssetStorage(); - store.Data = Image.Data; - store.Name = Image.Name; - store.UUID = Image.FullID; - db.Set(store); - db.Commit(); + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003"); + Image.Name = "Rocks"; + this.LoadAsset(Image, true, "rocks.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004"); + Image.Name = "Granite"; + this.LoadAsset(Image, true, "granite.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005"); + Image.Name = "Hardwood"; + this.LoadAsset(Image, true, "hardwood.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005"); + Image.Name = "Prim Base Texture"; + this.LoadAsset(Image, true, "plywood.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); + Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); + Image.Name = "Shape"; + this.LoadAsset(Image, false, "base_shape.dat"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } } diff --git a/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index deff80349c..62b6ffc605 100644 --- a/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -149,6 +149,11 @@ namespace OpenSim.Physics.BasicPhysicsPlugin { this._heightMap = heightMap; } + + public override void DeleteTerrain() + { + + } } public class BasicActor : PhysicsActor diff --git a/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim.Physics/Manager/PhysicsScene.cs index 632b9cd75b..0b3dfd2d7d 100644 --- a/OpenSim.Physics/Manager/PhysicsScene.cs +++ b/OpenSim.Physics/Manager/PhysicsScene.cs @@ -50,6 +50,8 @@ namespace OpenSim.Physics.Manager public abstract void GetResults(); public abstract void SetTerrain(float[] heightMap); + + public abstract void DeleteTerrain(); public abstract bool IsThreaded { @@ -76,6 +78,8 @@ namespace OpenSim.Physics.Manager public override void Simulate(float timeStep) { m_workIndicator = (m_workIndicator + 1) % 10; + + //OpenSim.Framework.Console.MainConsole.Instance.SetStatus(m_workIndicator.ToString()); } public override void GetResults() @@ -88,6 +92,11 @@ namespace OpenSim.Physics.Manager OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); } + public override void DeleteTerrain() + { + + } + public override bool IsThreaded { get { return false; } diff --git a/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim.Physics/OdePlugin/OdePlugin.cs index 8e34a6b72d..7b0d64a420 100644 --- a/OpenSim.Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim.Physics/OdePlugin/OdePlugin.cs @@ -170,6 +170,11 @@ namespace OpenSim.Physics.OdePlugin d.GeomHeightfieldDataBuildDouble(HeightmapData,_heightmap,1,256,256,256,256,1.0f,0.0f,2.0f,0); LandGeom=d.CreateHeightfield(space, HeightmapData, 0); } + + public override void DeleteTerrain() + { + + } } public class OdeCharacter : PhysicsActor diff --git a/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs index 043c2f1ec0..10e92fe6ed 100644 --- a/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs @@ -98,7 +98,7 @@ namespace OpenSim.Physics.PhysXPlugin { private List _characters = new List(); private List _prims = new List(); - private float[] _heightMap; + private float[] _heightMap = null; private NxPhysicsSDK mySdk; private NxScene scene; @@ -138,18 +138,25 @@ namespace OpenSim.Physics.PhysXPlugin } public override void Simulate(float timeStep) { - foreach (PhysXCharacter actor in _characters) - { - actor.Move(timeStep); - } - scene.Simulate(timeStep); - scene.FetchResults(); - scene.UpdateControllers(); - - foreach (PhysXCharacter actor in _characters) - { - actor.UpdatePosition(); - } + try + { + foreach (PhysXCharacter actor in _characters) + { + actor.Move(timeStep); + } + scene.Simulate(timeStep); + scene.FetchResults(); + scene.UpdateControllers(); + + foreach (PhysXCharacter actor in _characters) + { + actor.UpdatePosition(); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } } @@ -168,10 +175,20 @@ namespace OpenSim.Physics.PhysXPlugin public override void SetTerrain(float[] heightMap) { + if (this._heightMap != null) + { + Console.WriteLine("PhysX - deleting old terrain"); + this.scene.DeleteTerrain(); + } this._heightMap = heightMap; this.scene.AddTerrain(heightMap); } - } + + public override void DeleteTerrain() + { + this.scene.DeleteTerrain(); + } + } public class PhysXCharacter : PhysicsActor { @@ -211,6 +228,11 @@ namespace OpenSim.Physics.PhysXPlugin set { _position = value; + Vec3 ps = new Vec3(); + ps.X = value.X; + ps.Y = value.Y; + ps.Z = value.Z; + this._character.Position = ps; } } diff --git a/OpenSim.RegionServer/Assets/AssetCache.cs b/OpenSim.RegionServer/Assets/AssetCache.cs index 3c28e1c6c0..244f562098 100644 --- a/OpenSim.RegionServer/Assets/AssetCache.cs +++ b/OpenSim.RegionServer/Assets/AssetCache.cs @@ -55,7 +55,7 @@ namespace OpenSim.Assets private IAssetServer _assetServer; private Thread _assetCacheThread; - private LLUUID[] textureList = new LLUUID[2]; + private LLUUID[] textureList = new LLUUID[5]; /// /// @@ -100,6 +100,10 @@ namespace OpenSim.Assets //hack: so we can give each user a set of textures textureList[0] = new LLUUID("00000000-0000-0000-9999-000000000001"); textureList[1] = new LLUUID("00000000-0000-0000-9999-000000000002"); + textureList[2] = new LLUUID("00000000-0000-0000-9999-000000000003"); + textureList[3] = new LLUUID("00000000-0000-0000-9999-000000000004"); + textureList[4] = new LLUUID("00000000-0000-0000-9999-000000000005"); + for (int i = 0; i < textureList.Length; i++) { this._assetServer.RequestAsset(textureList[i], true); diff --git a/OpenSim.RegionServer/CAPS/IXmlRPCHandler.cs b/OpenSim.RegionServer/CAPS/IXmlRPCHandler.cs new file mode 100644 index 0000000000..c3cbbcc85e --- /dev/null +++ b/OpenSim.RegionServer/CAPS/IXmlRPCHandler.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.CAPS +{ + public interface IXmlRPCHandler + { + string HandleRPC(string requestBody); + } +} diff --git a/OpenSim.RegionServer/CAPS/SimHttp.cs b/OpenSim.RegionServer/CAPS/SimHttp.cs index 92bbc6f3b3..bfba635e45 100644 --- a/OpenSim.RegionServer/CAPS/SimHttp.cs +++ b/OpenSim.RegionServer/CAPS/SimHttp.cs @@ -50,6 +50,7 @@ namespace OpenSim.CAPS private Thread m_workerThread; private HttpListener m_httpListener; private Dictionary m_restHandlers = new Dictionary(); + private Dictionary RPCHandlers = new Dictionary(); private IGridServer m_gridServer; private int m_port; @@ -96,8 +97,22 @@ namespace OpenSim.CAPS //must already have a handler for that path so return false return false; } + + public bool AddXmlRPCHandler(string method, IXmlRPCHandler handler) + { + if (!this.RPCHandlers.ContainsKey(method)) + { + this.RPCHandlers.Add(method, handler); + return true; + } + + //must already have a handler for that path so return false + return false; + } + protected virtual string ParseXMLRPC(string requestBody) { + string responseString = ""; try { XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody); @@ -115,17 +130,23 @@ namespace OpenSim.CAPS agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); if (m_gridServer.GetName() == "Remote") { - - ((RemoteGridBase)m_gridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); + ((RemoteGridBase) m_gridServer).agentcircuits.Add((uint)agent_data.circuitcode, agent_data); } - return ""; + responseString = ""; + break; + default: + if (this.RPCHandlers.ContainsKey(request.MethodName)) + { + //responseString = this.RPCHandlers[request.MethodName] + } + break; } } catch (Exception e) { Console.WriteLine(e.ToString()); } - return ""; + return responseString; } protected virtual string ParseREST(string requestBody, string requestURL, string requestMethod) diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim.RegionServer/OpenSim.RegionServer.csproj index 1ce2837aa8..d9d5f1a67f 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.csproj +++ b/OpenSim.RegionServer/OpenSim.RegionServer.csproj @@ -1,4 +1,4 @@ - + Local 8.0.50727 @@ -6,7 +6,8 @@ {ADD974E2-994C-4998-864E-4B54D8AD5F00} Debug AnyCPU - + + OpenSim.RegionServer @@ -15,9 +16,11 @@ IE50 false Library - + + OpenSim.RegionServer - + + @@ -28,7 +31,8 @@ TRACE;DEBUG - + + True 4096 False @@ -37,7 +41,8 @@ False False 4 - + + False @@ -46,7 +51,8 @@ TRACE - + + False 4096 True @@ -55,26 +61,28 @@ False False 4 - + + - + System.dll False - + + System.Xml.dll False - + ..\bin\libsecondlife.dll False - + ..\bin\Axiom.MathLib.dll False - + ..\bin\Db4objects.Db4o.dll False @@ -84,46 +92,44 @@ OpenSim.Framework {BD7866A4-04BA-47F0-905F-B2359118F5B2} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Framework.Console {4B0A7290-36C2-4C74-B9B4-07775B031CF2} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Physics.Manager {2EAB18A1-8187-4C79-9947-A671F9C007D9} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False OpenSim.Servers {B9D6A5F0-3BD2-4161-8AF1-90C03295D4EE} {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False + False Code + Code Code - + Code Code - - Code - Code @@ -195,4 +201,4 @@ - + \ No newline at end of file diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build index 04e86bcc6b..b67db54f89 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build +++ b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build @@ -14,8 +14,8 @@ - + @@ -25,6 +25,7 @@ + diff --git a/OpenSim.RegionServer/OpenSimApplication.cs b/OpenSim.RegionServer/OpenSimApplication.cs deleted file mode 100644 index abfdf45812..0000000000 --- a/OpenSim.RegionServer/OpenSimApplication.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Net; -using System.Net.Sockets; - -namespace OpenSim -{ - public abstract class OpenSimApplication - { - public abstract void StartUp(); - public abstract void Shutdown(); - public abstract void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode);// EndPoint packetSender); - public abstract void RemoveClientCircuit(uint circuitcode); - } -} diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index 497b80173e..ed3e732d31 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs @@ -48,10 +48,19 @@ using OpenSim.Physics.Manager; namespace OpenSim { - public class OpenSimMain : OpenSimApplication, conscmd_callback + public class OpenSimMain : OpenSimNetworkHandler, conscmd_callback { - private Dictionary clientCircuits = new Dictionary(); private PhysicsManager physManager; + private World LocalWorld; + private Grid GridServers; + private SimConfig Cfg; + private SimCAPSHTTPServer HttpServer; + private AssetCache AssetCache; + private InventoryCache InventoryCache; + //public Dictionary ClientThreads = new Dictionary(); + private Dictionary ClientThreads = new Dictionary(); + private Dictionary clientCircuits = new Dictionary(); + private DateTime startuptime; public Socket Server; private IPEndPoint ServerIncoming; @@ -79,68 +88,68 @@ namespace OpenSim OpenSim.Framework.Console.MainConsole.Instance = m_console; } - public override void StartUp() + public virtual void StartUp() { - OpenSimRoot.Instance.GridServers = new Grid(); + GridServers = new Grid(); if ( m_sandbox ) { - OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; - OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; + GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll"; + GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll"; m_console.WriteLine("Starting in Sandbox mode"); } else { - OpenSimRoot.Instance.GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; - OpenSimRoot.Instance.GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; + GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll"; + GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll"; m_console.WriteLine("Starting in Grid mode"); } - OpenSimRoot.Instance.GridServers.Initialise(); + GridServers.Initialise(); - OpenSimRoot.Instance.startuptime = DateTime.Now; + startuptime = DateTime.Now; - OpenSimRoot.Instance.AssetCache = new AssetCache(OpenSimRoot.Instance.GridServers.AssetServer); - OpenSimRoot.Instance.InventoryCache = new InventoryCache(); + AssetCache = new AssetCache(GridServers.AssetServer); + InventoryCache = new InventoryCache(); // We check our local database first, then the grid for config options m_console.WriteLine("Main.cs:Startup() - Loading configuration"); - OpenSimRoot.Instance.Cfg = this.LoadConfigDll(this.ConfigDll); - OpenSimRoot.Instance.Cfg.InitConfig(this.m_sandbox); + Cfg = this.LoadConfigDll(this.ConfigDll); + Cfg.InitConfig(this.m_sandbox); m_console.WriteLine("Main.cs:Startup() - Contacting gridserver"); - OpenSimRoot.Instance.Cfg.LoadFromGrid(); + Cfg.LoadFromGrid(); - m_console.WriteLine("Main.cs:Startup() - We are " + OpenSimRoot.Instance.Cfg.RegionName + " at " + OpenSimRoot.Instance.Cfg.RegionLocX.ToString() + "," + OpenSimRoot.Instance.Cfg.RegionLocY.ToString()); + m_console.WriteLine("Main.cs:Startup() - We are " + Cfg.RegionName + " at " + Cfg.RegionLocX.ToString() + "," + Cfg.RegionLocY.ToString()); m_console.WriteLine("Initialising world"); - OpenSimRoot.Instance.LocalWorld = new World(OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.Cfg.RegionHandle, OpenSimRoot.Instance.Cfg.RegionName, OpenSimRoot.Instance.Cfg); - OpenSimRoot.Instance.LocalWorld.LandMap = OpenSimRoot.Instance.Cfg.LoadWorld(); + LocalWorld = new World(ClientThreads, Cfg.RegionHandle, Cfg.RegionName, Cfg); + LocalWorld.LandMap = Cfg.LoadWorld(); this.physManager = new OpenSim.Physics.Manager.PhysicsManager(); this.physManager.LoadPlugins(); m_console.WriteLine("Main.cs:Startup() - Starting up messaging system"); - OpenSimRoot.Instance.LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use - OpenSimRoot.Instance.LocalWorld.PhysScene.SetTerrain(OpenSimRoot.Instance.LocalWorld.LandMap); + LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use + LocalWorld.PhysScene.SetTerrain(LocalWorld.LandMap); - OpenSimRoot.Instance.GridServers.AssetServer.SetServerInfo(OpenSimRoot.Instance.Cfg.AssetURL, OpenSimRoot.Instance.Cfg.AssetSendKey); - OpenSimRoot.Instance.GridServers.GridServer.SetServerInfo(OpenSimRoot.Instance.Cfg.GridURL, OpenSimRoot.Instance.Cfg.GridSendKey, OpenSimRoot.Instance.Cfg.GridRecvKey); + GridServers.AssetServer.SetServerInfo(Cfg.AssetURL, Cfg.AssetSendKey); + GridServers.GridServer.SetServerInfo(Cfg.GridURL, Cfg.GridSendKey, Cfg.GridRecvKey); - OpenSimRoot.Instance.LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. - OpenSimRoot.Instance.LocalWorld.LoadPrimsFromStorage(); + LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. + LocalWorld.LoadPrimsFromStorage(); if ( m_sandbox) { - OpenSimRoot.Instance.AssetCache.LoadDefaultTextureSet(); + AssetCache.LoadDefaultTextureSet(); } m_console.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); - OpenSimRoot.Instance.HttpServer = new SimCAPSHTTPServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenPort); - OpenSimRoot.Instance.HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", OpenSimRoot.Instance.LocalWorld)); + HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort); + HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld)); if ( m_loginserver && m_sandbox) { - LoginServer loginServer = new LoginServer(OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Cfg.IPListenAddr, OpenSimRoot.Instance.Cfg.IPListenPort); + LoginServer loginServer = new LoginServer(GridServers.GridServer, Cfg.IPListenAddr, Cfg.IPListenPort); loginServer.Startup(); } @@ -194,15 +203,15 @@ namespace OpenSim // do we already have a circuit for this endpoint if(this.clientCircuits.ContainsKey(epSender)) { - OpenSimRoot.Instance.ClientThreads[this.clientCircuits[epSender]].InPacket(packet); + ClientThreads[this.clientCircuits[epSender]].InPacket(packet); } else if (packet.Type == PacketType.UseCircuitCode) { // new client UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); - SimClient newuser = new SimClient(epSender, useCircuit, OpenSimRoot.Instance.LocalWorld, OpenSimRoot.Instance.ClientThreads, OpenSimRoot.Instance.AssetCache, OpenSimRoot.Instance.GridServers.GridServer, OpenSimRoot.Instance.Application, OpenSimRoot.Instance.InventoryCache, OpenSimRoot.Instance.Sandbox); + SimClient newuser = new SimClient(epSender, useCircuit, LocalWorld, ClientThreads, AssetCache, GridServers.GridServer, this, InventoryCache, m_sandbox); //OpenSimRoot.Instance.ClientThreads.Add(epSender, newuser); - OpenSimRoot.Instance.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); + ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); } else { // invalid client @@ -214,9 +223,9 @@ namespace OpenSim private void MainServerListener() { m_console.WriteLine("Main.cs:MainServerListener() - New thread started"); - m_console.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + OpenSimRoot.Instance.Cfg.IPListenAddr + ":" + OpenSimRoot.Instance.Cfg.IPListenPort); + m_console.WriteLine("Main.cs:MainServerListener() - Opening UDP socket on " + Cfg.IPListenAddr + ":" + Cfg.IPListenPort); - ServerIncoming = new IPEndPoint(IPAddress.Any, OpenSimRoot.Instance.Cfg.IPListenPort); + ServerIncoming = new IPEndPoint(IPAddress.Any, Cfg.IPListenPort); Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); Server.Bind(ServerIncoming); @@ -231,7 +240,7 @@ namespace OpenSim } - public override void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode )//EndPoint packetSender) + public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode )//EndPoint packetSender) { // find the endpoint for this circuit EndPoint sendto = null; @@ -250,7 +259,7 @@ namespace OpenSim } } - public override void RemoveClientCircuit(uint circuitcode) + public virtual void RemoveClientCircuit(uint circuitcode) { foreach (KeyValuePair p in this.clientCircuits) { @@ -262,22 +271,22 @@ namespace OpenSim } } - public override void Shutdown() + public virtual void Shutdown() { m_console.WriteLine("Main.cs:Shutdown() - Closing all threads"); m_console.WriteLine("Main.cs:Shutdown() - Killing listener thread"); m_console.WriteLine("Main.cs:Shutdown() - Killing clients"); // IMPLEMENT THIS m_console.WriteLine("Main.cs:Shutdown() - Closing console and terminating"); - OpenSimRoot.Instance.LocalWorld.Close(); - OpenSimRoot.Instance.GridServers.Close(); + LocalWorld.Close(); + GridServers.Close(); m_console.Close(); Environment.Exit(0); } void Timer1Tick(object sender, System.EventArgs e) { - OpenSimRoot.Instance.LocalWorld.Update(); + LocalWorld.Update(); } public void RunCmd(string command, string[] cmdparams) @@ -295,7 +304,7 @@ namespace OpenSim break; case "regenerate": - OpenSimRoot.Instance.LocalWorld.RegenerateTerrain(); + LocalWorld.RegenerateTerrain(); break; case "shutdown": @@ -309,17 +318,17 @@ namespace OpenSim switch (ShowWhat) { case "uptime": - m_console.WriteLine("OpenSim has been running since " + OpenSimRoot.Instance.startuptime.ToString()); - m_console.WriteLine("That is " + (DateTime.Now - OpenSimRoot.Instance.startuptime).ToString()); + m_console.WriteLine("OpenSim has been running since " + startuptime.ToString()); + m_console.WriteLine("That is " + (DateTime.Now - startuptime).ToString()); break; case "users": OpenSim.world.Avatar TempAv; m_console.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 OpenSimRoot.Instance.LocalWorld.Entities.Keys) + foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) { - if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") + if (LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") { - TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID]; + TempAv = (OpenSim.world.Avatar)LocalWorld.Entities[UUID]; m_console.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())); } } diff --git a/OpenSim.RegionServer/OpenSimNetworkHandler.cs b/OpenSim.RegionServer/OpenSimNetworkHandler.cs new file mode 100644 index 0000000000..4ed201eb09 --- /dev/null +++ b/OpenSim.RegionServer/OpenSimNetworkHandler.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net; +using System.Net.Sockets; + +namespace OpenSim +{ + public interface OpenSimNetworkHandler + { + //public abstract void StartUp(); + // public abstract void Shutdown(); + void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode);// EndPoint packetSender); + void RemoveClientCircuit(uint circuitcode); + } +} diff --git a/OpenSim.RegionServer/OpenSimRoot.cs b/OpenSim.RegionServer/OpenSimRoot.cs deleted file mode 100644 index 1f96c4d5e3..0000000000 --- a/OpenSim.RegionServer/OpenSimRoot.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Net; -//using System.Net.Sockets; -using libsecondlife; -using libsecondlife.Packets; -using OpenSim.world; -using OpenSim.Framework.Interfaces; -using OpenSim.UserServer; -using OpenSim.Assets; -using OpenSim.CAPS; -using OpenSim.Framework.Console; -using OpenSim.Physics.Manager; - -namespace OpenSim -{ - public sealed class OpenSimRoot - { - private static OpenSimRoot instance = new OpenSimRoot(); - - public static OpenSimRoot Instance - { - get - { - return instance; - } - } - - private OpenSimRoot() - { - - } - - public World LocalWorld; - public Grid GridServers; - public SimConfig Cfg; - public SimCAPSHTTPServer HttpServer; - public AssetCache AssetCache; - public InventoryCache InventoryCache; - //public Dictionary ClientThreads = new Dictionary(); - public Dictionary ClientThreads = new Dictionary(); - public DateTime startuptime; - public OpenSimApplication Application; - public bool Sandbox = false; - - } -} diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 698053d048..e013b6353a 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -75,7 +75,7 @@ namespace OpenSim private Dictionary m_clientThreads; private AssetCache m_assetCache; private IGridServer m_gridServer; - private OpenSimApplication m_application; + private OpenSimNetworkHandler m_application; private InventoryCache m_inventoryCache; private bool m_sandboxMode; @@ -188,7 +188,7 @@ namespace OpenSim { if (ent.localid == multipleupdate.ObjectData[i].ObjectLocalID) { - ent.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.W); + ent.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.Z); ((OpenSim.world.Primitive)ent).UpdateFlag = true; } } @@ -576,7 +576,7 @@ namespace OpenSim this.PacketQueue.Enqueue(item); } - public SimClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimApplication application, InventoryCache inventoryCache, bool sandboxMode) + public SimClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimNetworkHandler application, InventoryCache inventoryCache, bool sandboxMode) { m_world = world; m_clientThreads = clientThreads; diff --git a/OpenSim.RegionServer/UserServer/LoginServer.cs b/OpenSim.RegionServer/UserServer/LoginServer.cs index 47af8a88b8..0bbe0b04c7 100644 --- a/OpenSim.RegionServer/UserServer/LoginServer.cs +++ b/OpenSim.RegionServer/UserServer/LoginServer.cs @@ -309,7 +309,7 @@ namespace OpenSim.UserServer Hashtable Inventory2 = (Hashtable)InventoryList[1]; LLUUID BaseFolderID = LLUUID.Random(); LLUUID InventoryFolderID = LLUUID.Random(); - Inventory2["name"] = "Base"; + Inventory2["name"] = "Textures"; Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated(); Inventory2["type_default"] = 0; Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated(); diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs index 2ae99926ed..7b7937887a 100644 --- a/OpenSim.RegionServer/world/Avatar.cs +++ b/OpenSim.RegionServer/world/Avatar.cs @@ -41,10 +41,10 @@ namespace OpenSim.world m_clientThreads = clientThreads; m_regionName = regionName; m_regionHandle = regionHandle; - + OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs - Loading details from grid (DUMMY)"); ControllingClient = TheClient; - localid = 8880000 + (m_world._localNumber++); + localid = 8880000 + (this.m_world._localNumber++); position = new LLVector3(100.0f, 100.0f, 30.0f); position.Z = m_world.LandMap[(int)position.Y * 256 + (int)position.X] + 1; visualParams = new byte[218]; @@ -61,7 +61,7 @@ namespace OpenSim.world this.Wearables[0].ItemID = LLUUID.Random(); this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); - + } public PhysicsActor PhysActor @@ -82,7 +82,10 @@ namespace OpenSim.world { NewForce force = this.forcesList[i]; PhysicsVector phyVector = new PhysicsVector(force.X, force.Y, force.Z); - this._physActor.Velocity = phyVector; + lock (m_world.LockPhysicsEngine) + { + this._physActor.Velocity = phyVector; + } this.updateflag = true; this.velocity = new LLVector3(force.X, force.Y, force.Z); //shouldn't really be doing this // but as we are setting the velocity (rather than using real forces) at the moment it is okay. @@ -181,7 +184,7 @@ namespace OpenSim.world AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); mov.AgentData.SessionID = this.ControllingClient.SessionID; mov.AgentData.AgentID = this.ControllingClient.AgentID; - mov.Data.RegionHandle = m_regionHandle; + mov.Data.RegionHandle = this.m_regionHandle; // TODO - dynamicalise this stuff mov.Data.Timestamp = 1172750370; mov.Data.Position = new LLVector3(100f, 100f, 23f); @@ -475,7 +478,12 @@ namespace OpenSim.world ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock(); ani.AnimationList[0].AnimID = this.current_anim; ani.AnimationList[0].AnimSequenceID = this.anim_seq; - ControllingClient.OutPacket(ani); + + //ControllingClient.OutPacket(ani); + foreach (SimClient client in m_clientThreads.Values) + { + client.OutPacket(ani); + } } //should be moved somewhere else @@ -522,7 +530,11 @@ namespace OpenSim.world ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); dat.TextureEntry = new byte[0];// AvatarTemplate.TextureEntry; - libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z); + libsecondlife.LLVector3 pos2 = new LLVector3(0, 0, 0); + lock (m_world.LockPhysicsEngine) + { + pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z); + } uint ID = this.localid; @@ -542,8 +554,11 @@ namespace OpenSim.world ushort InternVelocityX; ushort InternVelocityY; ushort InternVelocityZ; - - Axiom.MathLib.Vector3 internDirec = new Axiom.MathLib.Vector3(this._physActor.Velocity.X, this._physActor.Velocity.Y, this._physActor.Velocity.Z); + Axiom.MathLib.Vector3 internDirec = new Axiom.MathLib.Vector3(0, 0, 0); + lock (m_world.LockPhysicsEngine) + { + internDirec = new Axiom.MathLib.Vector3(this._physActor.Velocity.X, this._physActor.Velocity.Y, this._physActor.Velocity.Z); + } internDirec = internDirec / 128.0f; internDirec.x += 1; internDirec.y += 1; @@ -596,6 +611,27 @@ namespace OpenSim.world Avatar.Animations = new AvatarAnimations(); Avatar.Animations.LoadAnims(); } + + public override void LandRenegerated() + { + position = new LLVector3(100.0f, 100.0f, 30.0f); + position.Z = this.m_world.LandMap[(int)position.Y * 256 + (int)position.X] + 50; + if (this._physActor != null) + { + try + { + lock (this.m_world.LockPhysicsEngine) + { + + this._physActor.Position = new PhysicsVector(position.X, position.Y, position.Z); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + } } public class NewForce diff --git a/OpenSim.RegionServer/world/Entity.cs b/OpenSim.RegionServer/world/Entity.cs index 780f3a0449..567c0b72c4 100644 --- a/OpenSim.RegionServer/world/Entity.cs +++ b/OpenSim.RegionServer/world/Entity.cs @@ -63,5 +63,10 @@ namespace OpenSim.world { } + + public virtual void LandRenegerated() + { + + } } } diff --git a/OpenSim.RegionServer/world/Primitive.cs b/OpenSim.RegionServer/world/Primitive.cs index a185f0bc70..ca764a7d49 100644 --- a/OpenSim.RegionServer/world/Primitive.cs +++ b/OpenSim.RegionServer/world/Primitive.cs @@ -12,6 +12,7 @@ namespace OpenSim.world { public class Primitive : Entity { + //private static object physicsLock = new object(); protected float mesh_cutbegin; protected float mesh_cutend; protected PrimData primData; @@ -21,7 +22,8 @@ namespace OpenSim.world private ObjectUpdatePacket OurPacket; private PhysicsActor _physActor; private bool physicsEnabled = false; - private bool physicstest = false; //just added for testing + private bool physicstest = false; + private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); private Dictionary m_clientThreads; private ulong m_regionHandle; private World m_world; @@ -72,7 +74,7 @@ namespace OpenSim.world { mesh_cutbegin = 0.0f; mesh_cutend = 1.0f; - + m_clientThreads = clientThreads; m_regionHandle = regionHandle; m_world = world; @@ -97,13 +99,30 @@ namespace OpenSim.world this.position = pos; if (this._physActor != null) // && this.physicsEnabled) { - this._physActor.Position = new PhysicsVector(pos.X, pos.Y, pos.Z); + try + { + lock (m_world.LockPhysicsEngine) + { + this._physActor.Position = new PhysicsVector(pos.X, pos.Y, pos.Z); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } } this.updateFlag = true; } public override void update() { + LLVector3 pos2 = new LLVector3(0, 0, 0); + if (this._physActor != null && this.physicsEnabled) + { + + PhysicsVector pPos = this._physActor.Position; + pos2 = new LLVector3(pPos.X, pPos.Y, pPos.Z); + } if (this.newPrimFlag) { foreach (SimClient client in m_clientThreads.Values) @@ -137,15 +156,19 @@ namespace OpenSim.world { if (this._physActor != null && this.physicsEnabled) { - ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); - terse.RegionData.RegionHandle = m_regionHandle; // FIXME - terse.RegionData.TimeDilation = 64096; - terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; - terse.ObjectData[0] = this.CreateImprovedBlock(); - foreach (SimClient client in m_clientThreads.Values) + if (pos2 != this.positionLastFrame) { - client.OutPacket(terse); + ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); + terse.RegionData.RegionHandle = m_regionHandle; // FIXME + terse.RegionData.TimeDilation = 64096; + terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; + terse.ObjectData[0] = this.CreateImprovedBlock(); + foreach (SimClient client in m_clientThreads.Values) + { + client.OutPacket(terse); + } } + this.positionLastFrame = pos2; } } @@ -487,7 +510,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); - m_world.localStorage.StorePrim(this.primData); + this.m_world.localStorage.StorePrim(this.primData); } } diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 0d126e6b87..3c131b29b9 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -14,6 +14,7 @@ namespace OpenSim.world { public class World : ILocalStorageReceiver { + public object LockPhysicsEngine = new object(); public Dictionary Entities; public float[] LandMap; public ScriptEngine Scripts; @@ -25,19 +26,19 @@ namespace OpenSim.world private Random Rand = new Random(); private uint _primCount = 702000; private int storageCount; - private Dictionary m_clientThreads; - private ulong m_regionHandle; - private string m_regionName; - private SimConfig m_cfg; + private Dictionary m_clientThreads; + private ulong m_regionHandle; + private string m_regionName; + private SimConfig m_cfg; - public World(Dictionary clientThreads, ulong regionHandle, string regionName, SimConfig cfg) - { + public World(Dictionary clientThreads, ulong regionHandle, string regionName, SimConfig cfg) + { m_clientThreads = clientThreads; m_regionHandle = regionHandle; m_regionName = regionName; m_cfg = cfg; - - OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating new entitities instance"); + + OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating new entitities instance"); Entities = new Dictionary(); OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap"); @@ -73,8 +74,11 @@ namespace OpenSim.world { Entities[UUID].addForces(); } - - this.phyScene.Simulate(timeStep); + + lock (this.LockPhysicsEngine) + { + this.phyScene.Simulate(timeStep); + } foreach (libsecondlife.LLUUID UUID in Entities.Keys) { @@ -118,18 +122,49 @@ namespace OpenSim.world this.localStorage = store; return(store == null); } + + public void RegenerateTerrain() + { + HeightmapGenHills hills = new HeightmapGenHills(); + this.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); + lock (this.LockPhysicsEngine) + { + this.phyScene.SetTerrain(this.LandMap); + } + m_cfg.SaveMap(this.LandMap); + + foreach (SimClient client in m_clientThreads.Values) + { + this.SendLayerData(client); + } + + foreach (libsecondlife.LLUUID UUID in Entities.Keys) + { + Entities[UUID].LandRenegerated(); + } + } + + public void RegenerateTerrain(float[] newMap) + { + + this.LandMap = newMap; + lock (this.LockPhysicsEngine) + { + this.phyScene.SetTerrain(this.LandMap); + } + m_cfg.SaveMap(this.LandMap); + + foreach (SimClient client in m_clientThreads.Values) + { + this.SendLayerData(client); + } + + foreach (libsecondlife.LLUUID UUID in Entities.Keys) + { + Entities[UUID].LandRenegerated(); + } + } - public void RegenerateTerrain() - { - HeightmapGenHills hills = new HeightmapGenHills(); - this.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); - this.phyScene.SetTerrain(this.LandMap); - m_cfg.SaveMap(this.LandMap); - - foreach(SimClient client in m_clientThreads.Values) { - this.SendLayerData(client); - } - } public void LoadPrimsFromStorage() { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: LoadPrimsFromStorage() - Loading primitives"); @@ -143,7 +178,7 @@ namespace OpenSim.world _primCount = prim.LocalID + 1; } OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: PrimFromStorage() - Reloading prim (localId "+ prim.LocalID+ " ) from storage"); - Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); + Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); nPrim.CreateFromStorage(prim); this.Entities.Add(nPrim.uuid, nPrim); } @@ -182,27 +217,34 @@ namespace OpenSim.world } } - public void AddViewerAgent(SimClient AgentClient) { + public void AddViewerAgent(SimClient AgentClient) + { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); - Avatar NewAvatar = new Avatar(AgentClient, this, m_regionName, m_clientThreads, m_regionHandle ); + Avatar NewAvatar = new Avatar(AgentClient, this, m_regionName, m_clientThreads, m_regionHandle); OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Adding new avatar to world"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs:AddViewerAgent() - Starting RegionHandshake "); NewAvatar.SendRegionHandshake(this); PhysicsVector pVec = new PhysicsVector(NewAvatar.position.X, NewAvatar.position.Y, NewAvatar.position.Z); - NewAvatar.PhysActor = this.phyScene.AddAvatar(pVec); + lock (this.LockPhysicsEngine) + { + NewAvatar.PhysActor = this.phyScene.AddAvatar(pVec); + } this.Entities.Add(AgentClient.AgentID, NewAvatar); } public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient) { OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: AddNewPrim() - Creating new prim"); - Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this ); + Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this); prim.CreateFromPacket(addPacket, AgentClient.AgentID, this._primCount); PhysicsVector pVec = new PhysicsVector(prim.position.X, prim.position.Y, prim.position.Z); PhysicsVector pSize = new PhysicsVector( 0.255f, 0.255f, 0.255f); if(OpenSim.world.Avatar.PhysicsEngineFlying) { - prim.PhysActor = this.phyScene.AddPrim(pVec, pSize ); + lock (this.LockPhysicsEngine) + { + prim.PhysActor = this.phyScene.AddPrim(pVec, pSize); + } } //prim.PhysicsEnabled = true; this.Entities.Add(prim.uuid, prim); @@ -243,9 +285,9 @@ namespace OpenSim.world } foreach( libsecondlife.LLUUID uuid in DeRezEnts ) { - lock (this.Entities) + lock (Entities) { - this.Entities.Remove(uuid); + Entities.Remove(uuid); } } diff --git a/OpenSim/RegionServer.cs b/OpenSim/RegionServer.cs index 30eec3b86a..0244116757 100644 --- a/OpenSim/RegionServer.cs +++ b/OpenSim/RegionServer.cs @@ -42,8 +42,8 @@ namespace OpenSim } OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine ); - OpenSimRoot.Instance.Application = sim; - OpenSimRoot.Instance.Sandbox = sandBoxMode; + // OpenSimRoot.Instance.Application = sim; + sim.m_sandbox = sandBoxMode; OpenSim.world.Avatar.PhysicsEngineFlying = allowFlying; sim.StartUp(); diff --git a/Servers/OpenSim.Servers.dll.build b/Servers/OpenSim.Servers.dll.build index f3845fb166..8600ab573a 100644 --- a/Servers/OpenSim.Servers.dll.build +++ b/Servers/OpenSim.Servers.dll.build @@ -12,7 +12,6 @@ - diff --git a/bin/PhysX-wrapper.dll b/bin/PhysX-wrapper.dll index d7a4002d4a..130b8d98c7 100644 Binary files a/bin/PhysX-wrapper.dll and b/bin/PhysX-wrapper.dll differ diff --git a/bin/PhysX_Wrapper_Dotnet.dll b/bin/PhysX_Wrapper_Dotnet.dll index 700286fdac..c66bf3ab19 100644 Binary files a/bin/PhysX_Wrapper_Dotnet.dll and b/bin/PhysX_Wrapper_Dotnet.dll differ diff --git a/bin/assets/bricks.jp2 b/bin/assets/bricks.jp2 new file mode 100644 index 0000000000..09c65abd53 Binary files /dev/null and b/bin/assets/bricks.jp2 differ diff --git a/bin/assets/granite.jp2 b/bin/assets/granite.jp2 new file mode 100644 index 0000000000..b842eb877a Binary files /dev/null and b/bin/assets/granite.jp2 differ diff --git a/bin/assets/hardwood.jp2 b/bin/assets/hardwood.jp2 new file mode 100644 index 0000000000..8ae695ea49 Binary files /dev/null and b/bin/assets/hardwood.jp2 differ diff --git a/bin/assets/plywood.jp2 b/bin/assets/plywood.jp2 new file mode 100644 index 0000000000..1643ff1b1f Binary files /dev/null and b/bin/assets/plywood.jp2 differ diff --git a/bin/assets/rocks.jp2 b/bin/assets/rocks.jp2 new file mode 100644 index 0000000000..f0bbd89f6c Binary files /dev/null and b/bin/assets/rocks.jp2 differ