diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/RegionApplicationBase.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index faf6f66..c84553a 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using OpenSim.Assets; | ||
32 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
34 | using OpenSim.Framework.Data; | 33 | using OpenSim.Framework.Data; |
@@ -47,7 +46,6 @@ namespace OpenSim.Region.ClientStack | |||
47 | public abstract class RegionApplicationBase | 46 | public abstract class RegionApplicationBase |
48 | { | 47 | { |
49 | protected AssetCache m_assetCache; | 48 | protected AssetCache m_assetCache; |
50 | protected InventoryCache m_inventoryCache; | ||
51 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 49 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
52 | protected DateTime m_startuptime; | 50 | protected DateTime m_startuptime; |
53 | protected NetworkServersInfo m_networkServersInfo; | 51 | protected NetworkServersInfo m_networkServersInfo; |
@@ -58,9 +56,9 @@ namespace OpenSim.Region.ClientStack | |||
58 | protected LogBase m_log; | 56 | protected LogBase m_log; |
59 | protected CommunicationsManager m_commsManager; | 57 | protected CommunicationsManager m_commsManager; |
60 | 58 | ||
61 | public RegionApplicationBase( ) | 59 | public RegionApplicationBase() |
62 | { | 60 | { |
63 | m_startuptime = DateTime.Now; | 61 | m_startuptime = DateTime.Now; |
64 | } | 62 | } |
65 | 63 | ||
66 | virtual public void StartUp() | 64 | virtual public void StartUp() |
@@ -69,16 +67,13 @@ namespace OpenSim.Region.ClientStack | |||
69 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 67 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
70 | 68 | ||
71 | Initialize(); | 69 | Initialize(); |
72 | 70 | ||
73 | ScenePresence.CreateDefaultTextureEntry(); | 71 | ScenePresence.CreateDefaultTextureEntry(); |
74 | 72 | ||
75 | m_httpServer = new BaseHttpServer( m_httpServerPort ); | 73 | m_httpServer = new BaseHttpServer(m_httpServerPort); |
76 | 74 | ||
77 | m_log.Verbose("Starting HTTP server"); | 75 | m_log.Verbose("Starting HTTP server"); |
78 | m_httpServer.Start(); | 76 | m_httpServer.Start(); |
79 | |||
80 | m_inventoryCache = new InventoryCache(); | ||
81 | |||
82 | } | 77 | } |
83 | 78 | ||
84 | protected abstract void Initialize(); | 79 | protected abstract void Initialize(); |
@@ -90,21 +85,21 @@ namespace OpenSim.Region.ClientStack | |||
90 | } | 85 | } |
91 | 86 | ||
92 | protected abstract LogBase CreateLog(); | 87 | protected abstract LogBase CreateLog(); |
93 | protected abstract PhysicsScene GetPhysicsScene( ); | 88 | protected abstract PhysicsScene GetPhysicsScene(); |
94 | protected abstract StorageManager CreateStorageManager(RegionInfo regionInfo); | 89 | protected abstract StorageManager CreateStorageManager(RegionInfo regionInfo); |
95 | 90 | ||
96 | protected PhysicsScene GetPhysicsScene(string engine) | 91 | protected PhysicsScene GetPhysicsScene(string engine) |
97 | { | 92 | { |
98 | PhysicsPluginManager physicsPluginManager; | 93 | PhysicsPluginManager physicsPluginManager; |
99 | physicsPluginManager = new PhysicsPluginManager(); | 94 | physicsPluginManager = new PhysicsPluginManager(); |
100 | physicsPluginManager.LoadPlugins(); | 95 | physicsPluginManager.LoadPlugins(); |
101 | return physicsPluginManager.GetPhysicsScene( engine ); | 96 | return physicsPluginManager.GetPhysicsScene(engine); |
102 | } | 97 | } |
103 | 98 | ||
104 | protected Scene SetupScene(RegionInfo regionInfo, out UDPServer udpServer) | 99 | protected Scene SetupScene(RegionInfo regionInfo, out UDPServer udpServer) |
105 | { | 100 | { |
106 | AgentCircuitManager authen = new AgentCircuitManager(); | 101 | AgentCircuitManager authen = new AgentCircuitManager(); |
107 | udpServer = new UDPServer(regionInfo.InternalEndPoint.Port, m_assetCache, m_inventoryCache, m_log, authen); | 102 | udpServer = new UDPServer(regionInfo.InternalEndPoint.Port, m_assetCache, m_log, authen); |
108 | 103 | ||
109 | StorageManager storageManager = CreateStorageManager(regionInfo); | 104 | StorageManager storageManager = CreateStorageManager(regionInfo); |
110 | Scene scene = CreateScene(regionInfo, storageManager, authen); | 105 | Scene scene = CreateScene(regionInfo, storageManager, authen); |
@@ -113,9 +108,9 @@ namespace OpenSim.Region.ClientStack | |||
113 | 108 | ||
114 | scene.LoadWorldMap(); | 109 | scene.LoadWorldMap(); |
115 | 110 | ||
116 | scene.PhysScene = GetPhysicsScene( ); | 111 | scene.PhysScene = GetPhysicsScene(); |
117 | scene.PhysScene.SetTerrain(scene.Terrain.GetHeights1D()); | 112 | scene.PhysScene.SetTerrain(scene.Terrain.GetHeights1D()); |
118 | scene.LoadPrimsFromStorage(); | 113 | scene.LoadPrimsFromStorage(); |
119 | 114 | ||
120 | //Master Avatar Setup | 115 | //Master Avatar Setup |
121 | UserProfileData masterAvatar = m_commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword); | 116 | UserProfileData masterAvatar = m_commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword); |