* 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
*
This commit is contained in:
lbsa71
2007-06-20 15:18:54 +00:00
parent 8edcc844c4
commit 64ed1e1b3b
20 changed files with 80 additions and 598 deletions

View File

@@ -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<OpenSim.Region.Scenes.Avatar> m_avatars;
public MyWorld(RegionInfo regionInfo)
public MyWorld(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach)
: base(clientThreads, regionInfo, authen, commsMan, assetCach)
{
m_regionInfo = regionInfo;
m_avatars = new List<Avatar>();
}
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
}
}

View File

@@ -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();

View File

@@ -62,10 +62,6 @@
<HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.World" >
<HintPath>OpenSim.World.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" >
<HintPath>System.dll</HintPath>
<Private>False</Private>
@@ -80,6 +76,12 @@
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
<Name>OpenGrid.Framework.Communications</Name>
<Project>{683344D5-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\OpenSim.Caches\OpenSim.Caches.csproj">
<Name>OpenSim.Caches</Name>
<Project>{1938EB12-0000-0000-0000-000000000000}</Project>
@@ -104,6 +106,18 @@
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\OpenSim.LocalCommunications\OpenSim.LocalCommunications.csproj">
<Name>OpenSim.LocalCommunications</Name>
<Project>{79CED992-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\OpenSim.Region\OpenSim.Region.csproj">
<Name>OpenSim.Region</Name>
<Project>{196916AF-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\OpenSim.RegionServer\OpenSim.RegionServer.csproj">
<Name>OpenSim.RegionServer</Name>
<Project>{632E1BFD-0000-0000-0000-000000000000}</Project>