diff options
author | lbsa71 | 2007-07-16 18:10:27 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-16 18:10:27 +0000 |
commit | 4a17587b8df120d8a588533933ffb374c87c5d7a (patch) | |
tree | d7c356208e091732a6fb09b133499520b6ad2058 /OpenSim/Region | |
parent | * Rigged up LSL Script Engine to OpenSim - not quite fully tied yet however, ... (diff) | |
download | opensim-SC-4a17587b8df120d8a588533933ffb374c87c5d7a.zip opensim-SC-4a17587b8df120d8a588533933ffb374c87c5d7a.tar.gz opensim-SC-4a17587b8df120d8a588533933ffb374c87c5d7a.tar.bz2 opensim-SC-4a17587b8df120d8a588533933ffb374c87c5d7a.tar.xz |
* Restructured the RegionApplicationBase.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 59 |
2 files changed, 22 insertions, 66 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 08d7619..269c54c 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -52,6 +52,15 @@ namespace OpenSim | |||
52 | 52 | ||
53 | public class OpenSimMain : RegionApplicationBase, conscmd_callback | 53 | public class OpenSimMain : RegionApplicationBase, conscmd_callback |
54 | { | 54 | { |
55 | public string m_physicsEngine; | ||
56 | protected IGenericConfig localConfig; | ||
57 | public bool m_sandbox = false; | ||
58 | public bool m_loginserver; | ||
59 | public bool user_accounts = false; | ||
60 | public bool gridLocalAsset = false; | ||
61 | protected bool configFileSetup = false; | ||
62 | public string m_config; | ||
63 | |||
55 | protected CommunicationsManager commsManager; | 64 | protected CommunicationsManager commsManager; |
56 | // private CheckSumServer checkServer; | 65 | // private CheckSumServer checkServer; |
57 | 66 | ||
@@ -59,6 +68,7 @@ namespace OpenSim | |||
59 | private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log"; | 68 | private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log"; |
60 | 69 | ||
61 | public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) | 70 | public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) |
71 | :base( ) | ||
62 | { | 72 | { |
63 | this.configFileSetup = useConfigFile; | 73 | this.configFileSetup = useConfigFile; |
64 | m_sandbox = sandBoxMode; | 74 | m_sandbox = sandBoxMode; |
@@ -71,7 +81,7 @@ namespace OpenSim | |||
71 | /// <summary> | 81 | /// <summary> |
72 | /// Performs initialisation of the world, such as loading configuration from disk. | 82 | /// Performs initialisation of the world, such as loading configuration from disk. |
73 | /// </summary> | 83 | /// </summary> |
74 | public override void StartUp() | 84 | public void StartUp() |
75 | { | 85 | { |
76 | this.serversData = new NetworkServersInfo(); | 86 | this.serversData = new NetworkServersInfo(); |
77 | 87 | ||
@@ -109,8 +119,8 @@ namespace OpenSim | |||
109 | 119 | ||
110 | startuptime = DateTime.Now; | 120 | startuptime = DateTime.Now; |
111 | 121 | ||
112 | this.physManager = new PhysicsManager(); | 122 | this.m_physicsManager = new PhysicsManager(); |
113 | this.physManager.LoadPlugins(); | 123 | this.m_physicsManager.LoadPlugins(); |
114 | 124 | ||
115 | this.SetupScene(); | 125 | this.SetupScene(); |
116 | 126 | ||
@@ -129,7 +139,7 @@ namespace OpenSim | |||
129 | } | 139 | } |
130 | 140 | ||
131 | # region Setup methods | 141 | # region Setup methods |
132 | protected override void SetupLocalGridServers() | 142 | protected void SetupLocalGridServers() |
133 | { | 143 | { |
134 | try | 144 | try |
135 | { | 145 | { |
@@ -145,7 +155,7 @@ namespace OpenSim | |||
145 | 155 | ||
146 | } | 156 | } |
147 | 157 | ||
148 | protected override void SetupRemoteGridServers() | 158 | protected void SetupRemoteGridServers() |
149 | { | 159 | { |
150 | try | 160 | try |
151 | { | 161 | { |
@@ -160,7 +170,7 @@ namespace OpenSim | |||
160 | } | 170 | } |
161 | } | 171 | } |
162 | 172 | ||
163 | protected override void SetupScene() | 173 | protected void SetupScene() |
164 | { | 174 | { |
165 | IGenericConfig regionConfig; | 175 | IGenericConfig regionConfig; |
166 | Scene scene; | 176 | Scene scene; |
@@ -221,8 +231,7 @@ namespace OpenSim | |||
221 | scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. | 231 | scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. |
222 | scene.LoadWorldMap(); | 232 | scene.LoadWorldMap(); |
223 | 233 | ||
224 | m_log.Verbose("Main.cs:Startup() - Starting up messaging system"); | 234 | scene.PhysScene = this.m_physicsManager.GetPhysicsScene( this.m_physicsEngine ); |
225 | scene.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); | ||
226 | scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D()); | 235 | scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D()); |
227 | scene.LoadPrimsFromStorage(); | 236 | scene.LoadPrimsFromStorage(); |
228 | 237 | ||
@@ -268,7 +277,7 @@ namespace OpenSim | |||
268 | } | 277 | } |
269 | } | 278 | } |
270 | 279 | ||
271 | protected override void SetupHttpListener() | 280 | protected void SetupHttpListener() |
272 | { | 281 | { |
273 | httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort); | 282 | httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort); |
274 | 283 | ||
@@ -278,7 +287,7 @@ namespace OpenSim | |||
278 | } | 287 | } |
279 | } | 288 | } |
280 | 289 | ||
281 | protected override void ConnectToRemoteGridServer() | 290 | protected void ConnectToRemoteGridServer() |
282 | { | 291 | { |
283 | 292 | ||
284 | } | 293 | } |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index ed7df17..610f2d9 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -42,22 +42,13 @@ namespace OpenSim.Region.ClientStack | |||
42 | { | 42 | { |
43 | public class RegionApplicationBase | 43 | public class RegionApplicationBase |
44 | { | 44 | { |
45 | protected IGenericConfig localConfig; | 45 | protected PhysicsManager m_physicsManager; |
46 | protected PhysicsManager physManager; | ||
47 | protected AssetCache AssetCache; | 46 | protected AssetCache AssetCache; |
48 | protected InventoryCache InventoryCache; | 47 | protected InventoryCache InventoryCache; |
49 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); | 48 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); |
50 | protected DateTime startuptime; | 49 | protected DateTime startuptime; |
51 | protected NetworkServersInfo serversData; | 50 | protected NetworkServersInfo serversData; |
52 | 51 | ||
53 | public string m_physicsEngine; | ||
54 | public bool m_sandbox = false; | ||
55 | public bool m_loginserver; | ||
56 | public bool user_accounts = false; | ||
57 | public bool gridLocalAsset = false; | ||
58 | protected bool configFileSetup = false; | ||
59 | public string m_config; | ||
60 | |||
61 | protected List<UDPServer> m_udpServer = new List<UDPServer>(); | 52 | protected List<UDPServer> m_udpServer = new List<UDPServer>(); |
62 | protected List<RegionInfo> regionData = new List<RegionInfo>(); | 53 | protected List<RegionInfo> regionData = new List<RegionInfo>(); |
63 | protected List<IWorld> m_localWorld = new List<IWorld>(); | 54 | protected List<IWorld> m_localWorld = new List<IWorld>(); |
@@ -66,53 +57,9 @@ namespace OpenSim.Region.ClientStack | |||
66 | 57 | ||
67 | protected LogBase m_log; | 58 | protected LogBase m_log; |
68 | 59 | ||
69 | public RegionApplicationBase() | 60 | public RegionApplicationBase( ) |
70 | { | ||
71 | |||
72 | } | ||
73 | |||
74 | public RegionApplicationBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) | ||
75 | { | ||
76 | this.configFileSetup = useConfigFile; | ||
77 | m_sandbox = sandBoxMode; | ||
78 | m_loginserver = startLoginServer; | ||
79 | m_physicsEngine = physicsEngine; | ||
80 | m_config = configFile; | ||
81 | } | ||
82 | |||
83 | /*protected World m_localWorld; | ||
84 | public World LocalWorld | ||
85 | { | ||
86 | get { return m_localWorld; } | ||
87 | }*/ | ||
88 | |||
89 | /// <summary> | ||
90 | /// Performs initialisation of the world, such as loading configuration from disk. | ||
91 | /// </summary> | ||
92 | public virtual void StartUp() | ||
93 | { | 61 | { |
94 | } | 62 | |
95 | |||
96 | protected virtual void SetupLocalGridServers() | ||
97 | { | ||
98 | } | ||
99 | |||
100 | protected virtual void SetupRemoteGridServers() | ||
101 | { | ||
102 | |||
103 | } | ||
104 | |||
105 | protected virtual void SetupScene() | ||
106 | { | ||
107 | } | ||
108 | |||
109 | protected virtual void SetupHttpListener() | ||
110 | { | ||
111 | } | ||
112 | |||
113 | protected virtual void ConnectToRemoteGridServer() | ||
114 | { | ||
115 | |||
116 | } | 63 | } |
117 | } | 64 | } |
118 | } | 65 | } |