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/Examples/SimpleApp/MyWorld.cs | 29 +++++++++++++++++++---------- OpenSim/Examples/SimpleApp/Program.cs | 8 ++++++-- OpenSim/Examples/SimpleApp/SimpleApp.csproj | 22 ++++++++++++++++++---- 3 files changed, 43 insertions(+), 16 deletions(-) (limited to 'OpenSim/Examples/SimpleApp') 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} -- cgit v1.1