* renamed some scene to world

* passing on NotImplemented from Update()
afrisby
lbsa71 2007-08-06 13:40:45 +00:00
parent e40a052745
commit 07b011af3a
5 changed files with 16 additions and 112 deletions

View File

@ -110,6 +110,7 @@ namespace OpenSim
{ {
Directory.CreateDirectory(Util.logDir()); Directory.CreateDirectory(Util.logDir());
} }
m_log = new LogBase(Path.Combine(Util.logDir(), m_logFilename), "Region", this, m_silent); m_log = new LogBase(Path.Combine(Util.logDir(), m_logFilename), "Region", this, m_silent);
MainLog.Instance = m_log; MainLog.Instance = m_log;
@ -226,107 +227,6 @@ namespace OpenSim
} }
#endregion #endregion
/*private void SetupFromConfigFile(IGenericConfig configData)
{
// Log filename
string attri = "";
attri = configData.GetAttribute("LogFilename");
if (String.IsNullOrEmpty(attri))
{
}
else
{
m_logFilename = attri;
}
// SandBoxMode
attri = "";
attri = configData.GetAttribute("SandBox");
if ((attri == "") || ((attri != "false") && (attri != "true")))
{
this.m_sandbox = false;
configData.SetAttribute("SandBox", "false");
}
else
{
this.m_sandbox = Convert.ToBoolean(attri);
}
// LoginServer
attri = "";
attri = configData.GetAttribute("LoginServer");
if ((attri == "") || ((attri != "false") && (attri != "true")))
{
this.m_loginserver = false;
configData.SetAttribute("LoginServer", "false");
}
else
{
this.m_loginserver = Convert.ToBoolean(attri);
}
// Sandbox User accounts
attri = "";
attri = configData.GetAttribute("UserAccount");
if ((attri == "") || ((attri != "false") && (attri != "true")))
{
this.user_accounts = false;
configData.SetAttribute("UserAccounts", "false");
}
else if (attri == "true")
{
this.user_accounts = Convert.ToBoolean(attri);
}
// Grid mode hack to use local asset server
attri = "";
attri = configData.GetAttribute("LocalAssets");
if ((attri == "") || ((attri != "false") && (attri != "true")))
{
this.m_gridLocalAsset = false;
configData.SetAttribute("LocalAssets", "false");
}
else if (attri == "true")
{
this.m_gridLocalAsset = Convert.ToBoolean(attri);
}
attri = "";
attri = configData.GetAttribute("PhysicsEngine");
switch (attri)
{
default:
throw new ArgumentException(String.Format( "Invalid value [{0}] for PhysicsEngine attribute, terminating", attri ) );
case "":
case "basicphysics":
this.m_physicsEngine = "basicphysics";
configData.SetAttribute("PhysicsEngine", "basicphysics");
ScenePresence.PhysicsEngineFlying = false;
break;
case "RealPhysX":
this.m_physicsEngine = "RealPhysX";
ScenePresence.PhysicsEngineFlying = true;
break;
case "OpenDynamicsEngine":
this.m_physicsEngine = "OpenDynamicsEngine";
ScenePresence.PhysicsEngineFlying = true;
break;
case "BulletXEngine":
this.m_physicsEngine = "BulletXEngine";
ScenePresence.PhysicsEngineFlying = true;
break;
}
configData.Commit();
}*/
/// <summary> /// <summary>
/// Performs any last-minute sanity checking and shuts down the region server /// Performs any last-minute sanity checking and shuts down the region server
/// </summary> /// </summary>
@ -339,7 +239,7 @@ namespace OpenSim
m_log.Verbose("Closing console and terminating"); m_log.Verbose("Closing console and terminating");
for (int i = 0; i < m_localScenes.Count; i++) for (int i = 0; i < m_localScenes.Count; i++)
{ {
((Scene)m_localScenes[i]).Close(); m_localScenes[i].Close();
} }
m_log.Close(); m_log.Close();
Environment.Exit(0); Environment.Exit(0);

View File

@ -122,9 +122,9 @@ namespace OpenSim.Region.ClientStack
} }
protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions) protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AgentCircuitManager authenSessions)
{ {
return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions ); return new ClientView(remoteEP, initialcirpack, clientThreads, scene, assetCache, packServer, inventoryCache, authenSessions );
} }
/// <summary> /// <summary>

View File

@ -15,9 +15,9 @@ namespace OpenSim.Region.Environment
{ {
protected Scene m_scene; protected Scene m_scene;
public PermissionManager(Scene world) public PermissionManager(Scene scene)
{ {
m_scene = world; m_scene = scene;
} }
public delegate void OnPermissionErrorDelegate(LLUUID user, string reason); public delegate void OnPermissionErrorDelegate(LLUUID user, string reason);

View File

@ -57,10 +57,10 @@ namespace OpenSim.Region.Environment.Scenes
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public AllNewSceneObjectGroup2(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) public AllNewSceneObjectGroup2(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
{ {
m_regionHandle = regionHandle; m_regionHandle = regionHandle;
m_scene = world; m_scene = scene;
this.Pos = pos; this.Pos = pos;
LLVector3 rootOffset = new LLVector3(0, 0, 0); LLVector3 rootOffset = new LLVector3(0, 0, 0);

View File

@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes
#region Constructors #region Constructors
/// <summary> /// <summary>
/// Creates a new World class, and a region to go with it. /// Creates a new Scene class, and a region to go with it.
/// </summary> /// </summary>
/// <param name="clientThreads">Dictionary to contain client threads</param> /// <param name="clientThreads">Dictionary to contain client threads</param>
/// <param name="regionHandle">Region Handle for this region</param> /// <param name="regionHandle">Region Handle for this region</param>
@ -198,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
/// <summary> /// <summary>
/// Performs per-frame updates on the scene, this should be the central world loop /// Performs per-frame updates on the scene, this should be the central scene loop
/// </summary> /// </summary>
public override void Update() public override void Update()
{ {
@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Scenes
// General purpose event manager // General purpose event manager
m_eventManager.TriggerOnFrame(); m_eventManager.TriggerOnFrame();
//backup world data //backup scene data
storageCount++; storageCount++;
if (storageCount > 1200) //set to how often you want to backup if (storageCount > 1200) //set to how often you want to backup
{ {
@ -293,9 +293,13 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
} }
catch (NotImplementedException)
{
throw;
}
catch (Exception e) catch (Exception e)
{ {
MainLog.Instance.Warn("scene", "World.cs: Update() - Failed with exception " + e.ToString()); MainLog.Instance.Error("Scene", "Update() - Failed with exception " + e.ToString());
} }
updateLock.ReleaseMutex(); updateLock.ReleaseMutex();
} }