From 4224b695acc2e1ad0199dc0ad7f560494182ed54 Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Sat, 9 Jun 2007 21:45:58 +0000
Subject: * LogFile now defaults to "{apptype}.log" * cleaned away suo and user
files. * added handy string chat variety to the API * Moved LockPhysicsEngine
on World to SyncRoot on IWorld * Introduced NextLocalId instead of World
fuggliness. * Transformed GetRegionInfo to Property on IWorld for great
justice * Extracted default wearables (good to have) * Deleted unused
BaseServer * Used IWorld instead of World wherever possible * The client
constructor's not getting unused port any longer. * Extracted ClientView
factoring so PacketServer can be tweaked. * Added SendLayerData to World *
Made WorldBase abstract and cleaned it up a bit * added
OpenGrid.Framework.Communications.dll.build and OpenSim.World.dll.build to
svn * Added code for two examples (but not in prebuild yet)
---
OpenSim/Examples/SimpleApp/MyWorld.cs | 101 +++++++++++++
OpenSim/Examples/SimpleApp/Program.cs | 110 ++++++++++++++
.../Examples/SimpleApp/Properties/AssemblyInfo.cs | 33 +++++
OpenSim/Examples/SimpleApp/SimpleApp.csproj | 86 +++++++++++
OpenSim/Examples/SimpleApp2/MyClientView.cs | 69 +++++++++
OpenSim/Examples/SimpleApp2/MyPacketServer.cs | 30 ++++
OpenSim/Examples/SimpleApp2/Program.cs | 160 +++++++++++++++++++++
.../Examples/SimpleApp2/Properties/AssemblyInfo.cs | 33 +++++
OpenSim/Examples/SimpleApp2/SimpleApp2.csproj | 87 +++++++++++
.../Local/OpenSim.GridInterfaces.Local.csproj.user | 12 --
.../OpenSim.GridInterfaces.Remote.csproj.user | 12 --
.../OpenSim.Physics.BasicPhysicsPlugin.csproj.user | 12 --
.../Manager/OpenSim.Physics.Manager.csproj.user | 12 --
.../OpenSim.Physics.OdePlugin.csproj.user | 12 --
.../OpenSim.Physics.PhysXPlugin.csproj.user | 12 --
.../AuthenticateSessionsLocal.cs | 8 +-
OpenSim/OpenSim.RegionServer/ClientView.API.cs | 5 +
OpenSim/OpenSim.RegionServer/ClientView.cs | 6 +-
.../OpenSim.RegionServer.csproj | 36 ++---
.../OpenSim.RegionServer.csproj.user | 12 --
.../OpenSim.RegionServer.dll.build | 26 ++--
OpenSim/OpenSim.RegionServer/PacketServer.cs | 10 +-
.../OpenSim.Scripting.EmbeddedJVM.csproj | 32 ++---
.../OpenSim.Scripting.EmbeddedJVM.csproj.user | 12 --
.../OpenSim.Scripting.EmbeddedJVM.dll.build | 20 +--
...nSim.Storage.LocalStorageBerkeleyDB.csproj.user | 12 --
.../OpenSim.Storage.LocalStorageDb4o.csproj | 6 +-
.../OpenSim.Storage.LocalStorageDb4o.csproj.user | 12 --
.../OpenSim.Storage.LocalStorageDb4o.dll.build | 2 +-
.../OpenSim.Storage.LocalStorageSQLite.csproj.user | 12 --
.../OpenSim.Terrain.BasicTerrain.csproj.user | 12 --
OpenSim/OpenSim.World/Avatar.cs | 11 +-
OpenSim/OpenSim.World/Entity.cs | 2 +-
OpenSim/OpenSim.World/OpenSim.World.csproj | 32 ++---
OpenSim/OpenSim.World/OpenSim.World.csproj.user | 12 --
OpenSim/OpenSim.World/OpenSim.World.dll.build | 71 +++++++++
OpenSim/OpenSim.World/World.cs | 18 ++-
OpenSim/OpenSim.World/WorldBase.cs | 91 ++++--------
OpenSim/OpenSim/OpenSim.csproj.user | 13 --
39 files changed, 922 insertions(+), 332 deletions(-)
create mode 100644 OpenSim/Examples/SimpleApp/MyWorld.cs
create mode 100644 OpenSim/Examples/SimpleApp/Program.cs
create mode 100644 OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs
create mode 100644 OpenSim/Examples/SimpleApp/SimpleApp.csproj
create mode 100644 OpenSim/Examples/SimpleApp2/MyClientView.cs
create mode 100644 OpenSim/Examples/SimpleApp2/MyPacketServer.cs
create mode 100644 OpenSim/Examples/SimpleApp2/Program.cs
create mode 100644 OpenSim/Examples/SimpleApp2/Properties/AssemblyInfo.cs
create mode 100644 OpenSim/Examples/SimpleApp2/SimpleApp2.csproj
delete mode 100644 OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj.user
delete mode 100644 OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj.user
delete mode 100644 OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user
delete mode 100644 OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj.user
delete mode 100644 OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj.user
delete mode 100644 OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj.user
delete mode 100644 OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj.user
delete mode 100644 OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj.user
delete mode 100644 OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.user
delete mode 100644 OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj.user
delete mode 100644 OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj.user
delete mode 100644 OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj.user
delete mode 100644 OpenSim/OpenSim.World/OpenSim.World.csproj.user
create mode 100644 OpenSim/OpenSim.World/OpenSim.World.dll.build
delete mode 100644 OpenSim/OpenSim/OpenSim.csproj.user
(limited to 'OpenSim')
diff --git a/OpenSim/Examples/SimpleApp/MyWorld.cs b/OpenSim/Examples/SimpleApp/MyWorld.cs
new file mode 100644
index 0000000..27775f1
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp/MyWorld.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim.Framework.Interfaces;
+using OpenSim.Framework.Types;
+using OpenSim.Framework.Console;
+using libsecondlife;
+
+namespace SimpleApp
+{
+ public class MyWorld : IWorld
+ {
+ private RegionInfo m_regionInfo;
+
+ public MyWorld(RegionInfo regionInfo)
+ {
+ m_regionInfo = regionInfo;
+ }
+
+ private void SendLayerData(IClientAPI remoteClient)
+ {
+ float[] map = new float[65536];
+
+ for (int i = 0; i < 65536; i++)
+ {
+ int x = i % 256;
+ int y = i / 256;
+
+ map[i] = (float)(x + y / 2);
+ }
+
+ remoteClient.SendLayerData(map);
+ }
+
+ #region IWorld Members
+
+ void IWorld.AddNewAvatar(IClientAPI client, LLUUID agentID, bool child)
+ {
+ LLVector3 pos = new LLVector3(128, 128, 128);
+
+ client.OnRegionHandShakeReply += SendLayerData;
+ client.OnChatFromViewer +=
+ delegate(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
+ {
+ // Echo it (so you know what you typed)
+ client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
+ client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero );
+ };
+
+ client.OnRequestWearables += SendWearables;
+
+ client.OnCompleteMovementToRegion += delegate()
+ {
+ client.MoveAgentIntoRegion(m_regionInfo);
+ };
+
+ client.OnCompleteMovementToRegion += delegate()
+ {
+ client.SendAvatarData(m_regionInfo, client.FirstName,
+ client.LastName, client.AgentId, 0,
+ pos);
+
+ client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero );
+ };
+
+ client.SendRegionHandshake(m_regionInfo);
+
+ }
+
+ private void SendWearables( IClientAPI client )
+ {
+ client.SendWearables( AvatarWearable.DefaultWearables );
+ }
+
+ void IWorld.RemoveAvatar(LLUUID agentID)
+ {
+
+ }
+
+ RegionInfo IWorld.RegionInfo
+ {
+ get { return m_regionInfo; }
+ }
+
+ object IWorld.SyncRoot
+ {
+ get { return this; }
+ }
+
+ private uint m_nextLocalId = 1;
+
+ uint IWorld.NextLocalId
+ {
+ get { return m_nextLocalId++; }
+ }
+
+ #endregion
+
+
+ }
+}
diff --git a/OpenSim/Examples/SimpleApp/Program.cs b/OpenSim/Examples/SimpleApp/Program.cs
new file mode 100644
index 0000000..e44bdba
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp/Program.cs
@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim;
+using OpenSim.Servers;
+using OpenSim.GridInterfaces.Local;
+using OpenSim.Framework.Interfaces;
+using OpenSim.Framework.Types;
+using OpenSim.UserServer;
+using OpenSim.Framework.Console;
+using OpenSim.world;
+using OpenSim.Physics.Manager;
+using OpenSim.Assets;
+using libsecondlife;
+
+namespace SimpleApp
+{
+ class Program : IAssetReceiver, conscmd_callback
+ {
+ private ConsoleBase m_console;
+
+ private void Run()
+ {
+ m_console = new ConsoleBase(null, "SimpleApp", this, false);
+ MainConsole.Instance = m_console;
+
+ CheckSumServer checksumServer = new CheckSumServer(12036);
+ checksumServer.ServerListener();
+
+ string simAddr = "127.0.0.1";
+ int simPort = 9000;
+
+ LoginServer loginServer = new LoginServer( simAddr, simPort, 0, 0, false );
+ loginServer.Startup();
+
+ AuthenticateSessionsLocal localSessions = new AuthenticateSessionsLocal();
+ loginServer.SetSessionHandler(localSessions.AddNewSessionHandler );
+
+ InventoryCache inventoryCache = new InventoryCache();
+
+ LocalAssetServer assetServer = new LocalAssetServer();
+ assetServer.SetServerInfo("http://127.0.0.1:8003/", "");
+ assetServer.SetReceiver(this);
+
+ AssetCache assetCache = new AssetCache(assetServer);
+
+ UDPServer udpServer = new UDPServer(simPort, assetCache, inventoryCache, m_console, localSessions );
+ PacketServer packetServer = new PacketServer( udpServer, (uint) simPort );
+ udpServer.ServerListener();
+
+ ClientView.TerrainManager = new TerrainManager(new SecondLife());
+
+ RegionInfo regionInfo = new RegionInfo();
+
+ udpServer.LocalWorld = new MyWorld( regionInfo );
+
+ // World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo);
+ // PhysicsScene physicsScene = new NullPhysicsScene();
+ // world.PhysicsScene = physicsScene;
+ // udpServer.LocalWorld = world;
+
+ BaseHttpServer httpServer = new BaseHttpServer( simPort );
+ httpServer.AddXmlRPCHandler( "login_to_simulator", loginServer.XmlRpcLoginMethod );
+ httpServer.Start();
+
+ m_console.WriteLine( LogPriority.NORMAL, "Press enter to quit.");
+ m_console.ReadLine();
+ }
+
+ private void AddNewSessionHandler(Login loginData)
+ {
+ m_console.WriteLine( LogPriority.NORMAL, "Recieved Login from [{0}] [{1}]", loginData.First, loginData.Last );
+ }
+
+ #region IAssetReceiver Members
+
+ public void AssetReceived( AssetBase asset, bool IsTexture)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void AssetNotFound( AssetBase asset)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region conscmd_callback Members
+
+ public void RunCmd(string cmd, string[] cmdparams)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Show(string ShowWhat)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ static void Main(string[] args)
+ {
+ Program app = new Program();
+
+ app.Run();
+ }
+ }
+}
diff --git a/OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs b/OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..0f9bf0f
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SimpleApp")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Playahead AB")]
+[assembly: AssemblyProduct("SimpleApp")]
+[assembly: AssemblyCopyright("Copyright © Playahead AB 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a5cfa45f-5acf-4b2e-9c50-1dd1fd7608ee")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Examples/SimpleApp/SimpleApp.csproj b/OpenSim/Examples/SimpleApp/SimpleApp.csproj
new file mode 100644
index 0000000..51e14de
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp/SimpleApp.csproj
@@ -0,0 +1,86 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {AD062D99-DD53-4D37-A4B8-2AF635377AEB}
+ Exe
+ Properties
+ SimpleApp
+ SimpleApp
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\bin\libsecondlife.dll
+
+
+
+
+
+
+
+
+
+
+
+
+ {A7CD0630-0000-0000-0000-000000000000}
+ OpenSim.Framework.Console
+
+
+ {8ACA2445-0000-0000-0000-000000000000}
+ OpenSim.Framework
+
+
+ {8BB20F0A-0000-0000-0000-000000000000}
+ OpenSim.Servers
+
+
+ {8E81D43C-0000-0000-0000-000000000000}
+ XMLRPC
+
+
+ {546099CD-0000-0000-0000-000000000000}
+ OpenSim.GridInterfaces.Local
+
+
+ {8BE16150-0000-0000-0000-000000000000}
+ OpenSim.Physics.Manager
+
+
+ {632E1BFD-0000-0000-0000-000000000000}
+ OpenSim.RegionServer
+
+
+ {642A14A8-0000-0000-0000-000000000000}
+ OpenSim.World
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenSim/Examples/SimpleApp2/MyClientView.cs b/OpenSim/Examples/SimpleApp2/MyClientView.cs
new file mode 100644
index 0000000..dd8869c
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp2/MyClientView.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim;
+using libsecondlife;
+using OpenSim.Framework.Interfaces;
+using System.Net;
+using libsecondlife.Packets;
+using OpenSim.Assets;
+using OpenSim.Framework.Types;
+using OpenSim.Framework;
+
+namespace SimpleApp2
+{
+ public class MyClientView : ClientView
+ {
+ private float[] m_map;
+ private Dictionary m_clientAPIs;
+
+ public MyClientView(float[] map, Dictionary clientAPIs, EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
+ : base(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions)
+ {
+ m_map = map;
+ m_clientAPIs = clientAPIs;
+
+ OnRegionHandShakeReply += RegionHandShakeReplyHandler;
+ OnChatFromViewer += ChatHandler;
+ OnRequestWearables += RequestWearablesHandler;
+ OnCompleteMovementToRegion += CompleteMovementToRegionHandler;
+ }
+
+ private void ChatHandler(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
+ {
+ // Echo it (so you know what you typed)
+ SendChatMessage(message, type, fromPos, fromName, fromAgentID);
+ SendChatMessage("Ready.", 1, fromPos, "System", LLUUID.Zero);
+ }
+
+ private void CompleteMovementToRegionHandler()
+ {
+ LLVector3 pos = new LLVector3(128, 128, 128);
+
+ MoveAgentIntoRegion(m_world.RegionInfo);
+
+ SendAvatarData( m_world.RegionInfo, FirstName,
+ LastName, AgentId, 0,
+ pos);
+
+ SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero);
+
+
+
+ // OpenSim.world.Primitive prim = new OpenSim.world.Primitive( m_clientAPIs, m_world.RegionInfo.RegionHandle, m_world, AgentId );
+
+ // SendNewPrim( prim );
+
+ }
+
+ private void RegionHandShakeReplyHandler(IClientAPI client)
+ {
+ client.SendLayerData(m_map);
+ }
+
+ private void RequestWearablesHandler(IClientAPI client)
+ {
+ SendWearables(AvatarWearable.DefaultWearables);
+ }
+ }
+}
diff --git a/OpenSim/Examples/SimpleApp2/MyPacketServer.cs b/OpenSim/Examples/SimpleApp2/MyPacketServer.cs
new file mode 100644
index 0000000..9c21016
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp2/MyPacketServer.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim;
+using OpenSim.Assets;
+using System.Net;
+using libsecondlife.Packets;
+using OpenSim.Framework.Interfaces;
+using OpenSim.Framework;
+
+namespace SimpleApp2
+{
+ public class MyPacketServer : PacketServer
+ {
+ private float[] m_map;
+
+ public MyPacketServer(float[] map, OpenSimNetworkHandler networkHandler, uint port ) : base( networkHandler, port )
+ {
+ m_map = map;
+ }
+
+ protected override ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
+ {
+ // (EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
+
+
+ return new MyClientView(m_map, ClientAPIs, remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions);
+ }
+ }
+}
diff --git a/OpenSim/Examples/SimpleApp2/Program.cs b/OpenSim/Examples/SimpleApp2/Program.cs
new file mode 100644
index 0000000..9b977f6
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp2/Program.cs
@@ -0,0 +1,160 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OpenSim;
+using OpenSim.Servers;
+using OpenSim.GridInterfaces.Local;
+using OpenSim.Framework.Interfaces;
+using OpenSim.Framework.Types;
+using OpenSim.UserServer;
+using OpenSim.Framework.Console;
+using OpenSim.world;
+using OpenSim.Physics.Manager;
+using OpenSim.Assets;
+using libsecondlife;
+
+namespace SimpleApp2
+{
+ class Program : IWorld, IAssetReceiver, conscmd_callback
+ {
+ private ConsoleBase m_console;
+ private RegionInfo m_regionInfo;
+ private float[] m_map;
+
+ private void Run()
+ {
+ m_console = new ConsoleBase(null, "SimpleApp", this, false);
+ MainConsole.Instance = m_console;
+
+ m_map = CreateMap();
+
+ CheckSumServer checksumServer = new CheckSumServer(12036);
+ checksumServer.ServerListener();
+
+ string simAddr = "127.0.0.1";
+ int simPort = 9000;
+
+ LoginServer loginServer = new LoginServer(simAddr, simPort, 0, 0, false);
+ loginServer.Startup();
+
+ AuthenticateSessionsLocal localSessions = new AuthenticateSessionsLocal();
+ loginServer.SetSessionHandler(localSessions.AddNewSessionHandler);
+
+ InventoryCache inventoryCache = new InventoryCache();
+
+ LocalAssetServer assetServer = new LocalAssetServer();
+ assetServer.SetServerInfo("http://127.0.0.1:8003/", "");
+ assetServer.SetReceiver(this);
+
+ AssetCache assetCache = new AssetCache(assetServer);
+
+ UDPServer udpServer = new UDPServer(simPort, assetCache, inventoryCache, m_console, localSessions);
+ PacketServer packetServer = new MyPacketServer(m_map, udpServer, (uint) simPort );
+ udpServer.ServerListener();
+
+ ClientView.TerrainManager = new TerrainManager(new SecondLife());
+
+ m_regionInfo = new RegionInfo();
+
+ udpServer.LocalWorld = this;
+
+ // World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo);
+ // PhysicsScene physicsScene = new NullPhysicsScene();
+ // world.PhysicsScene = physicsScene;
+ // udpServer.LocalWorld = world;
+
+ BaseHttpServer httpServer = new BaseHttpServer(simPort);
+ httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
+ httpServer.Start();
+
+ m_console.WriteLine(LogPriority.NORMAL, "Press enter to quit.");
+ m_console.ReadLine();
+ }
+
+ private float[] CreateMap()
+ {
+ float[] map = new float[65536];
+
+ for (int i = 0; i < 65536; i++)
+ {
+ int x = i % 256;
+ int y = i / 256;
+
+ map[i] = (float)(x + y / 2);
+ }
+
+ return map;
+ }
+
+ private void AddNewSessionHandler(Login loginData)
+ {
+ m_console.WriteLine(LogPriority.NORMAL, "Recieved Login from [{0}] [{1}]", loginData.First, loginData.Last);
+ }
+
+ static void Main(string[] args)
+ {
+ Program app = new Program();
+
+ app.Run();
+ }
+
+ #region IWorld Members
+
+ void IWorld.AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
+ {
+ remoteClient.SendRegionHandshake(m_regionInfo);
+ }
+
+ void IWorld.RemoveAvatar(LLUUID agentID)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ RegionInfo IWorld.RegionInfo
+ {
+ get { return m_regionInfo; }
+ }
+
+ object IWorld.SyncRoot
+ {
+ get { return this; }
+ }
+
+ private uint m_nextLocalId = 1;
+
+ uint IWorld.NextLocalId
+ {
+ get { return m_nextLocalId++; }
+ }
+
+ #endregion
+
+ #region IAssetReceiver Members
+
+ public void AssetReceived(AssetBase asset, bool IsTexture)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void AssetNotFound(AssetBase asset)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+
+ #region conscmd_callback Members
+
+ public void RunCmd(string cmd, string[] cmdparams)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public void Show(string ShowWhat)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ #endregion
+ }
+}
diff --git a/OpenSim/Examples/SimpleApp2/Properties/AssemblyInfo.cs b/OpenSim/Examples/SimpleApp2/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f7d6aae
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp2/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("SimpleApp2")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Playahead AB")]
+[assembly: AssemblyProduct("SimpleApp2")]
+[assembly: AssemblyCopyright("Copyright © Playahead AB 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bdda0707-02b4-46ca-87ce-ab3c12558a4a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Examples/SimpleApp2/SimpleApp2.csproj b/OpenSim/Examples/SimpleApp2/SimpleApp2.csproj
new file mode 100644
index 0000000..92664e3
--- /dev/null
+++ b/OpenSim/Examples/SimpleApp2/SimpleApp2.csproj
@@ -0,0 +1,87 @@
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {C84B2171-D386-4377-B490-9C5A56674B9E}
+ Exe
+ Properties
+ SimpleApp2
+ SimpleApp2
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\..\..\bin\libsecondlife.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {A7CD0630-0000-0000-0000-000000000000}
+ OpenSim.Framework.Console
+
+
+ {8ACA2445-0000-0000-0000-000000000000}
+ OpenSim.Framework
+
+
+ {8BB20F0A-0000-0000-0000-000000000000}
+ OpenSim.Servers
+
+
+ {8E81D43C-0000-0000-0000-000000000000}
+ XMLRPC
+
+
+ {546099CD-0000-0000-0000-000000000000}
+ OpenSim.GridInterfaces.Local
+
+
+ {8BE16150-0000-0000-0000-000000000000}
+ OpenSim.Physics.Manager
+
+
+ {632E1BFD-0000-0000-0000-000000000000}
+ OpenSim.RegionServer
+
+
+ {642A14A8-0000-0000-0000-000000000000}
+ OpenSim.World
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj.user b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj.user b/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj.user b/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj.user b/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj.user b/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs b/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs
index 91772f8..4db7ccb 100644
--- a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs
+++ b/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs
@@ -13,7 +13,13 @@ namespace OpenSim
{
}
-
+
+ public bool AddNewSessionHandler(ulong regionHandle, Login loginData)
+ {
+ AddNewSession( loginData );
+ return true;
+ }
+
public void AddNewSession(Login loginData)
{
AgentCircuitData agent = new AgentCircuitData();
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index 9e0cd48..37e27f8 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -153,6 +153,11 @@ namespace OpenSim
OutPacket(mov);
}
+ public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
+ {
+ SendChatMessage( Helpers.StringToField( message ), type, fromPos, fromName, fromAgentID);
+ }
+
///
///
///
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/OpenSim.RegionServer/ClientView.cs
index d970162..f9a7fe4 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.cs
@@ -70,7 +70,7 @@ namespace OpenSim
private AgentAssetUpload UploadAssets;
private LLUUID newAssetFolder = LLUUID.Zero;
private bool debug = false;
- private IWorld m_world;
+ protected IWorld m_world;
private Dictionary m_clientThreads;
private AssetCache m_assetCache;
private IGridServer m_gridServer;
@@ -78,11 +78,9 @@ namespace OpenSim
private int cachedtextureserial = 0;
private RegionInfo m_regionData;
protected AuthenticateSessionsBase m_authenticateSessionsHandler;
- protected uint serverPort = 0;
- public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions, uint port)
+ public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions )
{
- this.serverPort = port;
m_world = world;
m_clientThreads = clientThreads;
m_assetCache = assetCache;
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
index 2fc6516..990b5c3 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
+++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
@@ -124,10 +124,7 @@
-
- Code
-
-
+
Code
@@ -136,52 +133,55 @@
Code
-
+
Code
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
+ Code
+
+
Code
Code
-
+
Code
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj.user b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
index c988025..8384407 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
+++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
@@ -11,26 +11,26 @@
-
-
+
-
-
+
+
-
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/OpenSim.RegionServer/PacketServer.cs
index ab77b5d..f1ca881 100644
--- a/OpenSim/OpenSim.RegionServer/PacketServer.cs
+++ b/OpenSim/OpenSim.RegionServer/PacketServer.cs
@@ -66,9 +66,17 @@ namespace OpenSim
}
+ protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
+ {
+ return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions );
+ }
+
public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass)
{
- ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass, serverPort);
+ ClientView newuser =
+ CreateNewClient(epSender, useCircuit, ClientThreads, _localWorld, assetCache, this, inventoryCache,
+ authenticateSessionsClass);
+
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj
index 6ffcf9e..bd1a332 100644
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj
+++ b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj
@@ -76,64 +76,64 @@
-
+
+ Code
+
+
Code
Code
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
Code
-
- Code
-
Code
-
+
Code
-
+
Code
Code
-
+
Code
-
+
Code
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj.user b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build
index ac4d564..c5255db 100644
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build
+++ b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build
@@ -11,26 +11,26 @@
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
-
+
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.user b/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
index af8285b..15ae5bf 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
+++ b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
@@ -93,6 +93,9 @@
Code
+
+ Code
+
Code
@@ -102,9 +105,6 @@
Code
-
- Code
-
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj.user b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
index 72aac2a..c2fd2bd 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
+++ b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
@@ -12,10 +12,10 @@
+
-
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj.user b/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj.user b/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs
index c251d57..4ab576c 100644
--- a/OpenSim/OpenSim.World/Avatar.cs
+++ b/OpenSim/OpenSim.World/Avatar.cs
@@ -55,21 +55,16 @@ namespace OpenSim.world
ControllingClient = theClient;
this.firstname = ControllingClient.FirstName;
this.lastname = ControllingClient.LastName;
- localid = 8880000 + (this.m_world._localNumber++);
+ localid = this.m_world.NextLocalId;
Pos = ControllingClient.StartPos;
visualParams = new byte[218];
for (int i = 0; i < 218; i++)
{
visualParams[i] = 100;
}
- Wearables = new AvatarWearable[13]; //should be 13 of these
- for (int i = 0; i < 13; i++)
- {
- Wearables[i] = new AvatarWearable();
- }
- this.Wearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
- this.Wearables[0].ItemID = LLUUID.Random();
+ Wearables = AvatarWearable.DefaultWearables;
+
this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
Console.WriteLine("avatar point 4");
diff --git a/OpenSim/OpenSim.World/Entity.cs b/OpenSim/OpenSim.World/Entity.cs
index b14beed..dd5f9a6 100644
--- a/OpenSim/OpenSim.World/Entity.cs
+++ b/OpenSim/OpenSim.World/Entity.cs
@@ -51,7 +51,7 @@ namespace OpenSim.world
{
try
{
- lock (this.m_world.LockPhysicsEngine)
+ lock (this.m_world.SyncRoot)
{
this._physActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
diff --git a/OpenSim/OpenSim.World/OpenSim.World.csproj b/OpenSim/OpenSim.World/OpenSim.World.csproj
index f2fb596..46803d6 100644
--- a/OpenSim/OpenSim.World/OpenSim.World.csproj
+++ b/OpenSim/OpenSim.World/OpenSim.World.csproj
@@ -130,58 +130,58 @@
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
-
+
Code
-
+
Code
Code
-
+
Code
diff --git a/OpenSim/OpenSim.World/OpenSim.World.csproj.user b/OpenSim/OpenSim.World/OpenSim.World.csproj.user
deleted file mode 100644
index 082d673..0000000
--- a/OpenSim/OpenSim.World/OpenSim.World.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenSim/OpenSim.World/OpenSim.World.dll.build b/OpenSim/OpenSim.World/OpenSim.World.dll.build
new file mode 100644
index 0000000..3fa534e
--- /dev/null
+++ b/OpenSim/OpenSim.World/OpenSim.World.dll.build
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs
index 011e39a..7ef06e2 100644
--- a/OpenSim/OpenSim.World/World.cs
+++ b/OpenSim/OpenSim.World/World.cs
@@ -23,10 +23,8 @@ namespace OpenSim.world
public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI
{
protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
- public object LockPhysicsEngine = new object();
protected Dictionary Avatars;
protected Dictionary Prims;
- public uint _localNumber = 0;
private PhysicsScene phyScene;
private float timeStep = 0.1f;
public ILocalStorage localStorage;
@@ -59,6 +57,7 @@ namespace OpenSim.world
return (this.phyScene);
}
}
+
#endregion
#region Constructors
@@ -155,7 +154,7 @@ namespace OpenSim.world
Entities[UUID].addForces();
}
- lock (this.LockPhysicsEngine)
+ lock (this.m_syncRoot)
{
this.phyScene.Simulate(timeStep);
}
@@ -203,7 +202,7 @@ namespace OpenSim.world
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving.");
localStorage.SaveMap(Terrain.getHeights1D());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics.");
- lock (this.LockPhysicsEngine)
+ lock (this.m_syncRoot)
{
phyScene.SetTerrain(Terrain.getHeights1D());
}
@@ -297,7 +296,7 @@ namespace OpenSim.world
{
Terrain.hills();
- lock (this.LockPhysicsEngine)
+ lock (this.m_syncRoot)
{
this.phyScene.SetTerrain(Terrain.getHeights1D());
}
@@ -328,7 +327,7 @@ namespace OpenSim.world
try
{
this.Terrain.setHeights2D(newMap);
- lock (this.LockPhysicsEngine)
+ lock (this.m_syncRoot)
{
this.phyScene.SetTerrain(this.Terrain.getHeights1D());
}
@@ -483,7 +482,7 @@ namespace OpenSim.world
this.estateManager.sendRegionHandshake(remoteClient);
PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
- lock (this.LockPhysicsEngine)
+ lock (this.m_syncRoot)
{
newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
}
@@ -612,5 +611,10 @@ namespace OpenSim.world
}
#endregion
+
+ public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
+ {
+ RemoteClient.SendLayerData( Terrain.getHeights1D() );
+ }
}
}
diff --git a/OpenSim/OpenSim.World/WorldBase.cs b/OpenSim/OpenSim.World/WorldBase.cs
index 19a8fb5..92bc6a3 100644
--- a/OpenSim/OpenSim.World/WorldBase.cs
+++ b/OpenSim/OpenSim.World/WorldBase.cs
@@ -15,61 +15,25 @@ using OpenSim.Terrain;
namespace OpenSim.world
{
- public class WorldBase : IWorld
+ public abstract class WorldBase : IWorld
{
public Dictionary Entities;
protected Dictionary m_clientThreads;
protected ulong m_regionHandle;
protected string m_regionName;
- // protected InventoryCache _inventoryCache;
- // protected AssetCache _assetCache;
protected RegionInfo m_regInfo;
public TerrainEngine Terrain; //TODO: Replace TerrainManager with this.
protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine
-
- #region Properties
- /*
- public InventoryCache InventoryCache
- {
- set
- {
- this._inventoryCache = value;
- }
- }
-
- public AssetCache AssetCache
- {
- set
- {
- this._assetCache = value;
- }
- }
- */
- #endregion
-
- #region Constructors
- ///
- ///
- ///
- public WorldBase()
- {
-
- }
- #endregion
-
- #region Setup Methods
-
- #endregion
+ protected object m_syncRoot = new object();
+ private uint m_nextLocalId = 8880000;
#region Update Methods
///
/// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation)
///
- public virtual void Update()
- {
+ public abstract void Update();
- }
#endregion
#region Terrain Methods
@@ -77,11 +41,8 @@ namespace OpenSim.world
///
/// Loads the World heightmap
///
- public virtual void LoadWorldMap()
- {
-
- }
-
+ public abstract void LoadWorldMap();
+
///
/// Send the region heightmap to the client
///
@@ -97,10 +58,8 @@ namespace OpenSim.world
/// Patch coordinate (x) 0..16
/// Patch coordinate (y) 0..16
/// The client to send to
- public void SendLayerData(int px, int py, IClientAPI RemoteClient)
- {
-
- }
+ public abstract void SendLayerData(int px, int py, IClientAPI RemoteClient);
+
#endregion
#region Add/Remove Agent/Avatar
@@ -110,39 +69,43 @@ namespace OpenSim.world
///
///
///
- public virtual void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child)
- {
- return ;
- }
-
+ public abstract void AddNewAvatar(IClientAPI remoteClient, LLUUID agentID, bool child);
+
///
///
///
///
- public virtual void RemoveAvatar(LLUUID agentID)
- {
- return ;
- }
-
+ public abstract void RemoveAvatar(LLUUID agentID);
+
#endregion
///
///
///
///
- public virtual RegionInfo GetRegionInfo()
+ public virtual RegionInfo RegionInfo
+ {
+ get { return null; }
+ }
+
+ public object SyncRoot
+ {
+ get { return m_syncRoot; }
+ }
+
+ public uint NextLocalId
{
- return null;
+ get { return m_nextLocalId++; }
}
#region Shutdown
///
/// Tidy before shutdown
///
- public virtual void Close()
- {
+ public abstract void Close();
- }
#endregion
+
+
}
}
diff --git a/OpenSim/OpenSim/OpenSim.csproj.user b/OpenSim/OpenSim/OpenSim.csproj.user
deleted file mode 100644
index 66e2cb4..0000000
--- a/OpenSim/OpenSim/OpenSim.csproj.user
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- Debug
- AnyCPU
- -loginserver -sandbox -accounts
- C:\sugilite\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
--
cgit v1.1