From 4a17587b8df120d8a588533933ffb374c87c5d7a Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Mon, 16 Jul 2007 18:10:27 +0000
Subject: * Restructured the RegionApplicationBase.
---
OpenSim/Framework/General/NpcClientBase.cs | 2 +-
OpenSim/Region/Application/OpenSimMain.cs | 29 +++++++----
.../Region/ClientStack/RegionApplicationBase.cs | 59 ++--------------------
3 files changed, 23 insertions(+), 67 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/General/NpcClientBase.cs b/OpenSim/Framework/General/NpcClientBase.cs
index 044431b..c31b628 100644
--- a/OpenSim/Framework/General/NpcClientBase.cs
+++ b/OpenSim/Framework/General/NpcClientBase.cs
@@ -9,7 +9,7 @@ using libsecondlife.Packets;
namespace OpenSim.Framework
{
- public class NpcClientBase :IClientAPI
+ public class NpcClientBase : IClientAPI
{
public event ImprovedInstantMessage OnInstantMessage;
public event ChatFromViewer OnChatFromViewer;
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
public class OpenSimMain : RegionApplicationBase, conscmd_callback
{
+ public string m_physicsEngine;
+ protected IGenericConfig localConfig;
+ public bool m_sandbox = false;
+ public bool m_loginserver;
+ public bool user_accounts = false;
+ public bool gridLocalAsset = false;
+ protected bool configFileSetup = false;
+ public string m_config;
+
protected CommunicationsManager commsManager;
// private CheckSumServer checkServer;
@@ -59,6 +68,7 @@ namespace OpenSim
private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log";
public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
+ :base( )
{
this.configFileSetup = useConfigFile;
m_sandbox = sandBoxMode;
@@ -71,7 +81,7 @@ namespace OpenSim
///
/// Performs initialisation of the world, such as loading configuration from disk.
///
- public override void StartUp()
+ public void StartUp()
{
this.serversData = new NetworkServersInfo();
@@ -109,8 +119,8 @@ namespace OpenSim
startuptime = DateTime.Now;
- this.physManager = new PhysicsManager();
- this.physManager.LoadPlugins();
+ this.m_physicsManager = new PhysicsManager();
+ this.m_physicsManager.LoadPlugins();
this.SetupScene();
@@ -129,7 +139,7 @@ namespace OpenSim
}
# region Setup methods
- protected override void SetupLocalGridServers()
+ protected void SetupLocalGridServers()
{
try
{
@@ -145,7 +155,7 @@ namespace OpenSim
}
- protected override void SetupRemoteGridServers()
+ protected void SetupRemoteGridServers()
{
try
{
@@ -160,7 +170,7 @@ namespace OpenSim
}
}
- protected override void SetupScene()
+ protected void SetupScene()
{
IGenericConfig regionConfig;
Scene scene;
@@ -221,8 +231,7 @@ namespace OpenSim
scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
scene.LoadWorldMap();
- m_log.Verbose("Main.cs:Startup() - Starting up messaging system");
- scene.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
+ scene.PhysScene = this.m_physicsManager.GetPhysicsScene( this.m_physicsEngine );
scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D());
scene.LoadPrimsFromStorage();
@@ -268,7 +277,7 @@ namespace OpenSim
}
}
- protected override void SetupHttpListener()
+ protected void SetupHttpListener()
{
httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort);
@@ -278,7 +287,7 @@ namespace OpenSim
}
}
- protected override void ConnectToRemoteGridServer()
+ protected void ConnectToRemoteGridServer()
{
}
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
{
public class RegionApplicationBase
{
- protected IGenericConfig localConfig;
- protected PhysicsManager physManager;
+ protected PhysicsManager m_physicsManager;
protected AssetCache AssetCache;
protected InventoryCache InventoryCache;
protected Dictionary clientCircuits = new Dictionary();
protected DateTime startuptime;
protected NetworkServersInfo serversData;
- public string m_physicsEngine;
- public bool m_sandbox = false;
- public bool m_loginserver;
- public bool user_accounts = false;
- public bool gridLocalAsset = false;
- protected bool configFileSetup = false;
- public string m_config;
-
protected List m_udpServer = new List();
protected List regionData = new List();
protected List m_localWorld = new List();
@@ -66,53 +57,9 @@ namespace OpenSim.Region.ClientStack
protected LogBase m_log;
- public RegionApplicationBase()
- {
-
- }
-
- public RegionApplicationBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
- {
- this.configFileSetup = useConfigFile;
- m_sandbox = sandBoxMode;
- m_loginserver = startLoginServer;
- m_physicsEngine = physicsEngine;
- m_config = configFile;
- }
-
- /*protected World m_localWorld;
- public World LocalWorld
- {
- get { return m_localWorld; }
- }*/
-
- ///
- /// Performs initialisation of the world, such as loading configuration from disk.
- ///
- public virtual void StartUp()
+ public RegionApplicationBase( )
{
- }
-
- protected virtual void SetupLocalGridServers()
- {
- }
-
- protected virtual void SetupRemoteGridServers()
- {
-
- }
-
- protected virtual void SetupScene()
- {
- }
-
- protected virtual void SetupHttpListener()
- {
- }
-
- protected virtual void ConnectToRemoteGridServer()
- {
-
+
}
}
}
--
cgit v1.1