From 5e805656db1215518a344d6d5364629a4997fd47 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Sun, 1 Jul 2007 13:17:27 +0000 Subject: 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 --- OpenSim/Region/Examples/SimpleApp/Program.cs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Examples/SimpleApp/Program.cs') diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 4060d68..0d5b4b3 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -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 ); - - // World world = new World(udpServer.PacketServer.ClientAPIs, regionInfo); - // PhysicsScene physicsScene = new NullPhysicsScene(); - // world.PhysicsScene = physicsScene; - // udpServer.LocalWorld = world; + MyWorld world = new MyWorld(packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer); + world.PhysScene = new BasicScene(); + 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."); -- cgit v1.1