From 64ed1e1b3bea2b187679a7e61a7d56292c47daab Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 20 Jun 2007 15:18:54 +0000 Subject: * Removed ClientThreads from avatar * Deleted SimpleApp2 as it's getting wonkier and wonkier by the minute * Added avatar handling to SimpleApp, still don't have any avatar out on the playing field * Removed some warnings * Went from IWorld to Scene * --- OpenSim.sln | 6 - OpenSim/Examples/SimpleApp/MyWorld.cs | 29 ++-- OpenSim/Examples/SimpleApp/Program.cs | 8 +- OpenSim/Examples/SimpleApp/SimpleApp.csproj | 22 ++- OpenSim/Examples/SimpleApp2/MyClientView.cs | 70 -------- OpenSim/Examples/SimpleApp2/MyPacketServer.cs | 32 ---- OpenSim/Examples/SimpleApp2/Program.cs | 178 --------------------- .../Examples/SimpleApp2/Properties/AssemblyInfo.cs | 33 ---- OpenSim/Examples/SimpleApp2/SimpleApp2.csproj | 154 ------------------ OpenSim/Examples/SimpleApp2/SimpleApp2.exe.build | 53 ------ OpenSim/OpenSim.Region/ParcelManager.cs | 4 +- OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs | 2 +- OpenSim/OpenSim.Region/Scenes/Avatar.cs | 8 +- OpenSim/OpenSim.Region/Scenes/Entity.cs | 10 +- OpenSim/OpenSim.Region/Scenes/Primitive.cs | 8 +- .../OpenSim.Region/Scenes/Scene.PacketHandlers.cs | 2 +- OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs | 8 +- OpenSim/OpenSim.Region/Scenes/Scene.cs | 2 +- .../OpenSim.RegionServer.csproj | 6 + prebuild.xml | 43 +---- 20 files changed, 80 insertions(+), 598 deletions(-) delete mode 100644 OpenSim/Examples/SimpleApp2/MyClientView.cs delete mode 100644 OpenSim/Examples/SimpleApp2/MyPacketServer.cs delete mode 100644 OpenSim/Examples/SimpleApp2/Program.cs delete mode 100644 OpenSim/Examples/SimpleApp2/Properties/AssemblyInfo.cs delete mode 100644 OpenSim/Examples/SimpleApp2/SimpleApp2.csproj delete mode 100644 OpenSim/Examples/SimpleApp2/SimpleApp2.exe.build diff --git a/OpenSim.sln b/OpenSim.sln index aa25a9e..d1e89a6 100644 --- a/OpenSim.sln +++ b/OpenSim.sln @@ -48,8 +48,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrai EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApp", "OpenSim\Examples\SimpleApp\SimpleApp.csproj", "{24B12448-0000-0000-0000-000000000000}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleApp2", "OpenSim\Examples\SimpleApp2\SimpleApp2.csproj", "{24DF2448-0000-0000-0000-000000000000}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLRPC", "Common\XmlRpcCS\XMLRPC.csproj", "{8E81D43C-0000-0000-0000-000000000000}" EndProject Global @@ -154,10 +152,6 @@ Global {24B12448-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {24B12448-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {24B12448-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24DF2448-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/OpenSim/Examples/SimpleApp/MyWorld.cs b/OpenSim/Examples/SimpleApp/MyWorld.cs index d3da1c7..bc7a3b0 100644 --- a/OpenSim/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Examples/SimpleApp/MyWorld.cs @@ -5,19 +5,28 @@ using OpenSim.Framework.Interfaces; using OpenSim.Framework.Types; using OpenSim.Framework.Console; using libsecondlife; +using OpenSim.Region; +using Avatar=OpenSim.Region.Scenes.Avatar; +using OpenSim.Region.Scenes; +using OpenSim.Framework; +using OpenSim.Caches; +using OpenGrid.Framework.Communications; namespace SimpleApp { - public class MyWorld : IWorld + public class MyWorld : Scene { private RegionInfo m_regionInfo; + private List m_avatars; - public MyWorld(RegionInfo regionInfo) + public MyWorld(Dictionary clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach) + : base(clientThreads, regionInfo, authen, commsMan, assetCach) { m_regionInfo = regionInfo; + m_avatars = new List(); } - private void SendLayerData(IClientAPI remoteClient) + public override void SendLayerData(IClientAPI remoteClient) { float[] map = new float[65536]; @@ -34,7 +43,7 @@ namespace SimpleApp #region IWorld Members - void IWorld.AddNewAvatar(IClientAPI client, LLUUID agentID, bool child) + override public void AddNewAvatar(IClientAPI client, LLUUID agentID, bool child) { LLVector3 pos = new LLVector3(128, 128, 128); @@ -65,6 +74,8 @@ namespace SimpleApp client.SendRegionHandshake(m_regionInfo); + OpenSim.Region.Scenes.Avatar avatar = new Avatar( client, this, m_regionInfo ); + } private void SendWearables( IClientAPI client ) @@ -72,30 +83,28 @@ namespace SimpleApp client.SendWearables( AvatarWearable.DefaultWearables ); } - void IWorld.RemoveAvatar(LLUUID agentID) + public void RemoveAvatar(LLUUID agentID) { } - RegionInfo IWorld.RegionInfo + public RegionInfo RegionInfo { get { return m_regionInfo; } } - object IWorld.SyncRoot + public object SyncRoot { get { return this; } } private uint m_nextLocalId = 1; - uint IWorld.NextLocalId + public uint NextLocalId { get { return m_nextLocalId++; } } #endregion - - } } diff --git a/OpenSim/Examples/SimpleApp/Program.cs b/OpenSim/Examples/SimpleApp/Program.cs index 1d0702d..b0b68d9 100644 --- a/OpenSim/Examples/SimpleApp/Program.cs +++ b/OpenSim/Examples/SimpleApp/Program.cs @@ -12,6 +12,8 @@ using OpenSim.UserServer; using OpenSim.Servers; using OpenSim.Framework; using OpenSim.Caches; +using OpenGrid.Framework.Communications; +using OpenSim.LocalCommunications; namespace SimpleApp { @@ -51,9 +53,11 @@ namespace SimpleApp ClientView.TerrainManager = new TerrainManager(new SecondLife()); - RegionInfo regionInfo = new RegionInfo(); + CommunicationsManager communicationsManager = new CommunicationsLocal(); + + RegionInfo regionInfo = new RegionInfo( ); - udpServer.LocalWorld = new MyWorld( regionInfo ); + udpServer.LocalWorld = new MyWorld( packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache ); // World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo); // PhysicsScene physicsScene = new NullPhysicsScene(); diff --git a/OpenSim/Examples/SimpleApp/SimpleApp.csproj b/OpenSim/Examples/SimpleApp/SimpleApp.csproj index 810ecd4..00af44a 100644 --- a/OpenSim/Examples/SimpleApp/SimpleApp.csproj +++ b/OpenSim/Examples/SimpleApp/SimpleApp.csproj @@ -62,10 +62,6 @@ ..\..\..\bin\libsecondlife.dll False - - OpenSim.World.dll - False - System.dll False @@ -80,6 +76,12 @@ + + OpenGrid.Framework.Communications + {683344D5-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + OpenSim.Caches {1938EB12-0000-0000-0000-000000000000} @@ -104,6 +106,18 @@ {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} False + + OpenSim.LocalCommunications + {79CED992-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + OpenSim.Region + {196916AF-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + OpenSim.RegionServer {632E1BFD-0000-0000-0000-000000000000} diff --git a/OpenSim/Examples/SimpleApp2/MyClientView.cs b/OpenSim/Examples/SimpleApp2/MyClientView.cs deleted file mode 100644 index 4ef3c94..0000000 --- a/OpenSim/Examples/SimpleApp2/MyClientView.cs +++ /dev/null @@ -1,70 +0,0 @@ -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; -using OpenSim.Caches; - -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, pos, LLVector3.Zero ); - - 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 deleted file mode 100644 index 67878c4..0000000 --- a/OpenSim/Examples/SimpleApp2/MyPacketServer.cs +++ /dev/null @@ -1,32 +0,0 @@ -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; -using OpenSim.Caches; - -namespace SimpleApp2 -{ - public class MyPacketServer : PacketServer - { - private float[] m_map; - - public MyPacketServer(float[] map, ClientStackNetworkHandler 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 deleted file mode 100644 index 85ce703..0000000 --- a/OpenSim/Examples/SimpleApp2/Program.cs +++ /dev/null @@ -1,178 +0,0 @@ -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.Assets; -using libsecondlife; -using OpenSim.Framework; -using OpenSim.Caches; - -namespace SimpleApp2 -{ - class Program : IWorld, IAssetReceiver, conscmd_callback - { - private ConsoleBase m_console; - private RegionInfo m_regionInfo; - private float[] m_map; - private AuthenticateSessionsBase m_circuitManager; - - 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; - - m_circuitManager = new AuthenticateSessionsBase(); - - LoginServer loginServer = new LoginServer(simAddr, simPort, 0, 0, false); - loginServer.Startup(); - - loginServer.SetSessionHandler( 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, m_circuitManager ); - 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 bool AddNewSessionHandler(ulong regionHandle, Login loginData) - { - m_console.WriteLine(LogPriority.NORMAL, "Region [{0}] recieved Login from [{1}] [{2}]", regionHandle, loginData.First, loginData.Last); - - AgentCircuitData agent = new AgentCircuitData(); - agent.AgentID = loginData.Agent; - agent.firstname = loginData.First; - agent.lastname = loginData.Last; - agent.SessionID = loginData.Session; - agent.SecureSessionID = loginData.SecureSession; - agent.circuitcode = loginData.CircuitCode; - agent.BaseFolder = loginData.BaseFolder; - agent.InventoryFolder = loginData.InventoryFolder; - agent.startpos = new LLVector3(128, 128, 70); - - m_circuitManager.AddNewCircuit(agent.circuitcode, agent); - - return true; - } - - 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 deleted file mode 100644 index f7d6aae..0000000 --- a/OpenSim/Examples/SimpleApp2/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index 5c6e192..0000000 --- a/OpenSim/Examples/SimpleApp2/SimpleApp2.csproj +++ /dev/null @@ -1,154 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {24DF2448-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - - SimpleApp2 - JScript - Grid - IE50 - false - Exe - - - SimpleApp2 - - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - - True - 4096 - False - ..\..\..\bin\ - False - False - False - 4 - - - - - False - 285212672 - False - - - TRACE - - - False - 4096 - True - ..\..\..\bin\ - False - False - False - 4 - - - - - - ..\..\..\bin\libsecondlife.dll - False - - - OpenSim.World.dll - False - - - System.dll - False - - - ..\..\..\bin\System.Data.dll - False - - - System.Xml.dll - False - - - - - OpenSim.Caches - {1938EB12-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - OpenSim.Framework - {8ACA2445-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - OpenSim.Framework.Console - {A7CD0630-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - OpenSim.GridInterfaces.Local - {546099CD-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - OpenSim.RegionServer - {632E1BFD-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - OpenSim.Servers - {8BB20F0A-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - XMLRPC - {8E81D43C-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - \ No newline at end of file diff --git a/OpenSim/Examples/SimpleApp2/SimpleApp2.exe.build b/OpenSim/Examples/SimpleApp2/SimpleApp2.exe.build deleted file mode 100644 index dc5cc2a..0000000 --- a/OpenSim/Examples/SimpleApp2/SimpleApp2.exe.build +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSim/OpenSim.Region/ParcelManager.cs b/OpenSim/OpenSim.Region/ParcelManager.cs index ce53d24..3b0785f 100644 --- a/OpenSim/OpenSim.Region/ParcelManager.cs +++ b/OpenSim/OpenSim.Region/ParcelManager.cs @@ -237,7 +237,7 @@ namespace OpenSim.Region } } } - catch (Exception e) + catch (Exception) { return false; //Exception. For now, lets skip subdivision } @@ -294,7 +294,7 @@ namespace OpenSim.Region startParcel = getParcel(start_x, start_y); endParcel = getParcel(end_x, end_y); } - catch (Exception e) + catch (Exception) { return false; //Error occured when trying to get the start and end parcels } diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs index 534bda4..8b27efe 100644 --- a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs +++ b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.Scenes /// public void SendInitialPosition() { - this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, this.Pos); + this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos); } /// diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.cs index 6b393a8..3e371f0 100644 --- a/OpenSim/OpenSim.Region/Scenes/Avatar.cs +++ b/OpenSim/OpenSim.Region/Scenes/Avatar.cs @@ -59,7 +59,6 @@ namespace OpenSim.Region.Scenes private AvatarWearable[] Wearables; private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); private ulong m_regionHandle; - private Dictionary m_clientThreads; private bool childAvatar = false; private bool newForce = false; @@ -71,11 +70,10 @@ namespace OpenSim.Region.Scenes /// /// /// - public Avatar(IClientAPI theClient, Scene world, Dictionary clientThreads, RegionInfo reginfo) + public Avatar(IClientAPI theClient, Scene world, RegionInfo reginfo) { m_world = world; - m_clientThreads = clientThreads; this.uuid = theClient.AgentId; m_regionInfo = reginfo; @@ -84,7 +82,7 @@ namespace OpenSim.Region.Scenes ControllingClient = theClient; this.firstname = ControllingClient.FirstName; this.lastname = ControllingClient.LastName; - localid = this.m_world.NextLocalId; + m_localId = m_world.NextLocalId; Pos = ControllingClient.StartPos; visualParams = new byte[218]; for (int i = 0; i < 218; i++) @@ -196,7 +194,7 @@ namespace OpenSim.Region.Scenes { LLVector3 pos = this.Pos; LLVector3 vel = this.Velocity; - RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.localid, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z)); + RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.LocalId, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z)); } /// diff --git a/OpenSim/OpenSim.Region/Scenes/Entity.cs b/OpenSim/OpenSim.Region/Scenes/Entity.cs index 007bdaf..2376fc4 100644 --- a/OpenSim/OpenSim.Region/Scenes/Entity.cs +++ b/OpenSim/OpenSim.Region/Scenes/Entity.cs @@ -38,7 +38,6 @@ namespace OpenSim.Region.Scenes public abstract class Entity : IScriptReadonlyEntity { public libsecondlife.LLUUID uuid; - public uint localid; public LLVector3 velocity; public Quaternion rotation; protected List children; @@ -128,13 +127,20 @@ namespace OpenSim.Region.Scenes } } + protected uint m_localId; + + public uint LocalId + { + get { return m_localId; } + } + /// /// Creates a new Entity (should not occur on it's own) /// public Entity() { uuid = new libsecondlife.LLUUID(); - localid = 0; + m_pos = new LLVector3(); velocity = new LLVector3(); rotation = new Quaternion(); diff --git a/OpenSim/OpenSim.Region/Scenes/Primitive.cs b/OpenSim/OpenSim.Region/Scenes/Primitive.cs index 9bccfd3..929f0b5 100644 --- a/OpenSim/OpenSim.Region/Scenes/Primitive.cs +++ b/OpenSim/OpenSim.Region/Scenes/Primitive.cs @@ -136,7 +136,7 @@ namespace OpenSim.Region.Scenes this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; this.primData.OwnerID = owner; this.primData.FullID = this.uuid = fullID; - this.primData.LocalID = this.localid = localID; + this.primData.LocalID = m_localId = localID; } /// @@ -156,7 +156,7 @@ namespace OpenSim.Region.Scenes inventoryItems = new Dictionary(); this.primData = PrimData.DefaultCube(); this.primData.OwnerID = owner; - this.primData.LocalID = this.localid = localID; + this.primData.LocalID = m_localId = localID; this.Pos = this.primData.Position = position; this.updateFlag = 1; @@ -411,7 +411,7 @@ namespace OpenSim.Region.Scenes lPos = this.Pos; } - remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.localid, this.primData, lPos, new LLUUID("00000000-0000-0000-5005-000000000005")); + remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.primData, lPos, new LLUUID("00000000-0000-0000-5005-000000000005")); } /// @@ -499,7 +499,7 @@ namespace OpenSim.Region.Scenes PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; LLVector3 pos1 = addPacket.ObjectData.RayEnd; this.primData.FullID = this.uuid = LLUUID.Random(); - this.primData.LocalID = this.localid = (uint)(localID); + this.primData.LocalID = m_localId = (uint)(localID); this.primData.Position = this.Pos = pos1; this.updateFlag = 1; diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs b/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs index 3d41200..35a3bda 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs @@ -212,7 +212,7 @@ namespace OpenSim.Region.Scenes { foreach (Entity ent in Entities.Values) { - if (ent.localid == localID) + if (ent.LocalId == localID) { ((OpenSim.Region.Scenes.Primitive)ent).UpdatePosition(pos); break; diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs b/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs index 50df16e..6317e43 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs @@ -107,7 +107,7 @@ namespace OpenSim.Region.Scenes { if(this.scriptEngines.ContainsKey(scriptType)) { - this.scriptEngines[scriptType].LoadScript(script, scriptName, ent.localid); + this.scriptEngines[scriptType].LoadScript(script, scriptName, ent.LocalId); } } @@ -124,7 +124,7 @@ namespace OpenSim.Region.Scenes // Console.WriteLine("script- getting entity " + localID + " position"); foreach (Entity entity in this.Entities.Values) { - if (entity.localid == localID) + if (entity.LocalId == localID) { res.X = entity.Pos.X; res.Y = entity.Pos.Y; @@ -145,7 +145,7 @@ namespace OpenSim.Region.Scenes { foreach (Entity entity in this.Entities.Values) { - if (entity.localid == localID && entity is Primitive) + if (entity.LocalId == localID && entity is Primitive) { LLVector3 pos = entity.Pos; pos.X = x; @@ -171,7 +171,7 @@ namespace OpenSim.Region.Scenes { if (entity is Avatar) { - res = entity.localid; + res = entity.LocalId; } } return res; diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs index cb3865f..724d215 100644 --- a/OpenSim/OpenSim.Region/Scenes/Scene.cs +++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs @@ -564,7 +564,7 @@ namespace OpenSim.Region.Scenes try { OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); - newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo); + newAvatar = new Avatar(remoteClient, this, this.m_regInfo); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj index 63eeb9c..e569187 100644 --- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj +++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj @@ -110,6 +110,12 @@ {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} False + + OpenSim.Region + {196916AF-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + OpenSim.Servers {8BB20F0A-0000-0000-0000-000000000000} diff --git a/prebuild.xml b/prebuild.xml index a8f4010..65c6197 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -540,7 +540,6 @@ - @@ -564,6 +563,7 @@ + @@ -574,6 +574,7 @@ + @@ -631,7 +632,7 @@ - + @@ -670,42 +671,12 @@ + + - - - - - - - - - - - ../../../bin/ - - - - - ../../../bin/ - - - - ../../../bin/ - - - - - - - - - - - - - - + + -- cgit v1.1