From b3eeb5a8dcdb91d47037234540c5045cdfb9977a Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Sun, 23 Sep 2007 23:55:29 +0000
Subject: * Purged 'Regions' code pending Agent layer grok. * Changed so prims
aren't loaded until AFTER parcels. * The region startup flow is still an
ungodly rats nest.
---
OpenSim/Region/Environment/Scenes/Scene.cs | 19 ++++++-------------
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 12 +-----------
2 files changed, 7 insertions(+), 24 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index adf501e..22f69a5 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -49,7 +49,6 @@ using OpenSim.Region.Environment.Types;
using OpenSim.Region.Physics.Manager;
using OpenSim.Region.Terrain;
using Timer = System.Timers.Timer;
-using OpenSim.Region.Environment.Regions;
namespace OpenSim.Region.Environment.Scenes
{
@@ -64,8 +63,6 @@ namespace OpenSim.Region.Environment.Scenes
/// publicized so it can be accessed from SceneObjectGroup.
protected float timeStep = 0.1f;
- private Regions.Region m_region;
-
private Random Rand = new Random();
private uint _primCount = 702000;
private readonly Mutex _primAllocateMutex = new Mutex(false);
@@ -162,8 +159,6 @@ namespace OpenSim.Region.Environment.Scenes
{
updateLock = new Mutex(false);
- m_region = new Regions.Region(this);
-
m_moduleLoader = moduleLoader;
authenticateHandler = authen;
commsManager = commsMan;
@@ -373,7 +368,10 @@ namespace OpenSim.Region.Environment.Scenes
///
internal void Broadcast(Action whatToDo)
{
- m_region.Broadcast(whatToDo);
+ ForEachScenePresence( delegate( ScenePresence presence )
+ {
+ whatToDo(presence.ControllingClient);
+ });
}
///
///
@@ -458,7 +456,7 @@ namespace OpenSim.Region.Environment.Scenes
///
/// Loads the World's objects
///
- public void LoadPrimsFromStorage()
+ public virtual void LoadPrimsFromStorage()
{
MainLog.Instance.Verbose("Loading objects from datastore");
List PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID);
@@ -790,11 +788,6 @@ namespace OpenSim.Region.Environment.Scenes
m_scenePresences.Remove(agentID);
}
- lock (m_region)
- {
- m_region.Remove(agentID);
- }
-
lock (Entities)
{
Entities.Remove(agentID);
@@ -1135,7 +1128,7 @@ namespace OpenSim.Region.Environment.Scenes
}
public void SendUrlToUser(LLUUID avatarID, string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned,
- string message, string url)
+ string message, string url)
{
if (m_scenePresences.ContainsKey(avatarID))
{
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index fa37b9f..f594789 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -35,7 +35,6 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Physics.Manager;
-using OpenSim.Region.Environment.Regions;
namespace OpenSim.Region.Environment.Scenes
{
@@ -214,13 +213,6 @@ namespace OpenSim.Region.Environment.Scenes
set { m_isChildAgent = value; }
}
- private RegionSubscription m_regionSubscription;
-
- public RegionSubscription RegionSubscription
- {
- get { return m_regionSubscription; }
- }
-
#endregion
#region Constructor(s)
@@ -234,8 +226,6 @@ namespace OpenSim.Region.Environment.Scenes
///
public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo)
{
- m_regionSubscription = new RegionSubscription( client );
-
m_scene = world;
m_uuid = client.AgentId;
@@ -881,7 +871,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public static void CreateDefaultTextureEntry()
+ static ScenePresence()
{
LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012");
--
cgit v1.1