mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Fixed SimpleApp - aka thankgoditssundaycommit
* Updated SimpleApp with various introduced dependencies * Extracted ScenePrescence creation in Scene * removed try-catchall from UserManagerBase (that actually hid a bug) * Refactored RegionInfo * handle is calculated * it will explode upon accessing x,y,ip,port,externalip if not explicitly initialized * Removed superfluous 'ref' keywords * Removed a shitload of 'catch Exception e' that causes build warnings * Lots of small refactorings, renames et c * Ignored some bins
This commit is contained in:
@@ -44,7 +44,7 @@ namespace SimpleApp
|
||||
|
||||
#region IWorld Members
|
||||
|
||||
override public void AddNewClient(IClientAPI client, LLUUID agentID, bool child)
|
||||
override public void AddNewClient(IClientAPI client, bool child)
|
||||
|
||||
{
|
||||
LLVector3 pos = new LLVector3(128, 128, 128);
|
||||
@@ -59,7 +59,13 @@ namespace SimpleApp
|
||||
};
|
||||
|
||||
client.OnRequestWearables += SendWearables;
|
||||
|
||||
client.OnAddPrim += AddNewPrim;
|
||||
client.OnUpdatePrimPosition += this.UpdatePrimPosition;
|
||||
client.OnRequestMapBlocks += this.RequestMapBlocks;
|
||||
client.OnTeleportLocationRequest += this.RequestTeleportLocation;
|
||||
client.OnGrapUpdate += this.MoveObject;
|
||||
client.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest;
|
||||
|
||||
client.OnCompleteMovementToRegion += delegate()
|
||||
{
|
||||
client.MoveAgentIntoRegion(m_regionInfo, pos, LLVector3.Zero );
|
||||
@@ -76,7 +82,7 @@ namespace SimpleApp
|
||||
|
||||
client.SendRegionHandshake(m_regionInfo);
|
||||
|
||||
OpenSim.Region.Environment.Scenes.ScenePresence avatar = new Avatar( client, this, m_regionInfo );
|
||||
CreateAndAddScenePresence(client);
|
||||
|
||||
}
|
||||
|
||||
@@ -85,12 +91,6 @@ namespace SimpleApp
|
||||
client.SendWearables( AvatarWearable.DefaultWearables );
|
||||
}
|
||||
|
||||
|
||||
override public void RemoveClient(LLUUID agentID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public RegionInfo RegionInfo
|
||||
{
|
||||
get { return m_regionInfo; }
|
||||
|
||||
@@ -14,6 +14,7 @@ using OpenSim.Region.Caches;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.Communications.Local;
|
||||
using OpenSim.Region.ClientStack;
|
||||
using OpenSim.Region.Physics.BasicPhysicsPlugin;
|
||||
|
||||
namespace SimpleApp
|
||||
{
|
||||
@@ -32,11 +33,7 @@ namespace SimpleApp
|
||||
|
||||
string simAddr = "127.0.0.1";
|
||||
int simPort = 9000;
|
||||
/*
|
||||
LoginServer loginServer = new LoginServer( simAddr, simPort, 0, 0, false );
|
||||
loginServer.Startup();
|
||||
loginServer.SetSessionHandler( AddNewSessionHandler );*/
|
||||
|
||||
|
||||
m_circuitManager = new AuthenticateSessionsBase();
|
||||
|
||||
InventoryCache inventoryCache = new InventoryCache();
|
||||
@@ -53,18 +50,17 @@ namespace SimpleApp
|
||||
|
||||
ClientView.TerrainManager = new TerrainManager(new SecondLife());
|
||||
|
||||
CommunicationsManager communicationsManager = new CommunicationsLocal(null);
|
||||
NetworkServersInfo serverInfo = new NetworkServersInfo();
|
||||
CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo);
|
||||
|
||||
RegionInfo regionInfo = new RegionInfo( 1000, 1000, simAddr, simPort, simAddr );
|
||||
|
||||
RegionInfo regionInfo = new RegionInfo( );
|
||||
BaseHttpServer httpServer = new BaseHttpServer(simPort);
|
||||
udpServer.LocalWorld = new MyWorld( packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer );
|
||||
MyWorld world = new MyWorld(packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer);
|
||||
world.PhysScene = new BasicScene();
|
||||
udpServer.LocalWorld = world;
|
||||
|
||||
// World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo);
|
||||
// PhysicsScene physicsScene = new NullPhysicsScene();
|
||||
// world.PhysicsScene = physicsScene;
|
||||
// udpServer.LocalWorld = world;
|
||||
|
||||
// httpServer.AddXmlRPCHandler( "login_to_simulator", loginServer.XmlRpcLoginMethod );
|
||||
httpServer.AddXmlRPCHandler("login_to_simulator", communicationsManager.UserServices.XmlRpcLoginMethod );
|
||||
httpServer.Start();
|
||||
|
||||
m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit.");
|
||||
|
||||
@@ -104,6 +104,12 @@
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Framework\UserManager\OpenSim.Framework.UserManagement.csproj">
|
||||
<Name>OpenSim.Framework.UserManagement</Name>
|
||||
<Project>{586E2916-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Caches\OpenSim.Region.Caches.csproj">
|
||||
<Name>OpenSim.Region.Caches</Name>
|
||||
<Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
|
||||
@@ -134,6 +140,18 @@
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Physics\BasicPhysicsPlugin\OpenSim.Region.Physics.BasicPhysicsPlugin.csproj">
|
||||
<Name>OpenSim.Region.Physics.BasicPhysicsPlugin</Name>
|
||||
<Project>{15B4FEF3-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Physics\Manager\OpenSim.Region.Physics.Manager.csproj">
|
||||
<Name>OpenSim.Region.Physics.Manager</Name>
|
||||
<Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
|
||||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MyWorld.cs">
|
||||
|
||||
@@ -25,11 +25,14 @@
|
||||
<include name="../../../../bin/OpenSim.Framework.Communications.dll" />
|
||||
<include name="../../../../bin/OpenSim.Framework.Console.dll" />
|
||||
<include name="../../../../bin/OpenSim.Framework.Servers.dll" />
|
||||
<include name="../../../../bin/OpenSim.Framework.UserManagement.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.Caches.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.ClientStack.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.Communications.Local.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.Environment.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.GridInterfaces.Local.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll" />
|
||||
<include name="../../../../bin/OpenSim.Region.Physics.Manager.dll" />
|
||||
<include name="System.dll" />
|
||||
<include name="System.Data.dll.dll" />
|
||||
<include name="System.Xml.dll" />
|
||||
|
||||
Reference in New Issue
Block a user