diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 12 |
2 files changed, 7 insertions, 24 deletions
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; | |||
49 | using OpenSim.Region.Physics.Manager; | 49 | using OpenSim.Region.Physics.Manager; |
50 | using OpenSim.Region.Terrain; | 50 | using OpenSim.Region.Terrain; |
51 | using Timer = System.Timers.Timer; | 51 | using Timer = System.Timers.Timer; |
52 | using OpenSim.Region.Environment.Regions; | ||
53 | 52 | ||
54 | namespace OpenSim.Region.Environment.Scenes | 53 | namespace OpenSim.Region.Environment.Scenes |
55 | { | 54 | { |
@@ -64,8 +63,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
64 | /// publicized so it can be accessed from SceneObjectGroup. | 63 | /// publicized so it can be accessed from SceneObjectGroup. |
65 | protected float timeStep = 0.1f; | 64 | protected float timeStep = 0.1f; |
66 | 65 | ||
67 | private Regions.Region m_region; | ||
68 | |||
69 | private Random Rand = new Random(); | 66 | private Random Rand = new Random(); |
70 | private uint _primCount = 702000; | 67 | private uint _primCount = 702000; |
71 | private readonly Mutex _primAllocateMutex = new Mutex(false); | 68 | private readonly Mutex _primAllocateMutex = new Mutex(false); |
@@ -162,8 +159,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
162 | { | 159 | { |
163 | updateLock = new Mutex(false); | 160 | updateLock = new Mutex(false); |
164 | 161 | ||
165 | m_region = new Regions.Region(this); | ||
166 | |||
167 | m_moduleLoader = moduleLoader; | 162 | m_moduleLoader = moduleLoader; |
168 | authenticateHandler = authen; | 163 | authenticateHandler = authen; |
169 | commsManager = commsMan; | 164 | commsManager = commsMan; |
@@ -373,7 +368,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
373 | /// <returns></returns> | 368 | /// <returns></returns> |
374 | internal void Broadcast(Action<IClientAPI> whatToDo) | 369 | internal void Broadcast(Action<IClientAPI> whatToDo) |
375 | { | 370 | { |
376 | m_region.Broadcast(whatToDo); | 371 | ForEachScenePresence( delegate( ScenePresence presence ) |
372 | { | ||
373 | whatToDo(presence.ControllingClient); | ||
374 | }); | ||
377 | } | 375 | } |
378 | /// <summary> | 376 | /// <summary> |
379 | /// | 377 | /// |
@@ -458,7 +456,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
458 | /// <summary> | 456 | /// <summary> |
459 | /// Loads the World's objects | 457 | /// Loads the World's objects |
460 | /// </summary> | 458 | /// </summary> |
461 | public void LoadPrimsFromStorage() | 459 | public virtual void LoadPrimsFromStorage() |
462 | { | 460 | { |
463 | MainLog.Instance.Verbose("Loading objects from datastore"); | 461 | MainLog.Instance.Verbose("Loading objects from datastore"); |
464 | List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID); | 462 | List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(m_regInfo.SimUUID); |
@@ -790,11 +788,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
790 | m_scenePresences.Remove(agentID); | 788 | m_scenePresences.Remove(agentID); |
791 | } | 789 | } |
792 | 790 | ||
793 | lock (m_region) | ||
794 | { | ||
795 | m_region.Remove(agentID); | ||
796 | } | ||
797 | |||
798 | lock (Entities) | 791 | lock (Entities) |
799 | { | 792 | { |
800 | Entities.Remove(agentID); | 793 | Entities.Remove(agentID); |
@@ -1135,7 +1128,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1135 | } | 1128 | } |
1136 | 1129 | ||
1137 | public void SendUrlToUser(LLUUID avatarID, string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, | 1130 | public void SendUrlToUser(LLUUID avatarID, string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, |
1138 | string message, string url) | 1131 | string message, string url) |
1139 | { | 1132 | { |
1140 | if (m_scenePresences.ContainsKey(avatarID)) | 1133 | if (m_scenePresences.ContainsKey(avatarID)) |
1141 | { | 1134 | { |
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; | |||
35 | using OpenSim.Framework.Types; | 35 | using OpenSim.Framework.Types; |
36 | using OpenSim.Framework.Utilities; | 36 | using OpenSim.Framework.Utilities; |
37 | using OpenSim.Region.Physics.Manager; | 37 | using OpenSim.Region.Physics.Manager; |
38 | using OpenSim.Region.Environment.Regions; | ||
39 | 38 | ||
40 | namespace OpenSim.Region.Environment.Scenes | 39 | namespace OpenSim.Region.Environment.Scenes |
41 | { | 40 | { |
@@ -214,13 +213,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
214 | set { m_isChildAgent = value; } | 213 | set { m_isChildAgent = value; } |
215 | } | 214 | } |
216 | 215 | ||
217 | private RegionSubscription m_regionSubscription; | ||
218 | |||
219 | public RegionSubscription RegionSubscription | ||
220 | { | ||
221 | get { return m_regionSubscription; } | ||
222 | } | ||
223 | |||
224 | #endregion | 216 | #endregion |
225 | 217 | ||
226 | #region Constructor(s) | 218 | #region Constructor(s) |
@@ -234,8 +226,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
234 | /// <param name="regionDat"></param> | 226 | /// <param name="regionDat"></param> |
235 | public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) | 227 | public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) |
236 | { | 228 | { |
237 | m_regionSubscription = new RegionSubscription( client ); | ||
238 | |||
239 | m_scene = world; | 229 | m_scene = world; |
240 | m_uuid = client.AgentId; | 230 | m_uuid = client.AgentId; |
241 | 231 | ||
@@ -881,7 +871,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
881 | } | 871 | } |
882 | } | 872 | } |
883 | 873 | ||
884 | public static void CreateDefaultTextureEntry() | 874 | static ScenePresence() |
885 | { | 875 | { |
886 | LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); | 876 | LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); |
887 | textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012"); | 877 | textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012"); |