diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 88 |
1 files changed, 27 insertions, 61 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 94a4e31..8f3495c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -40,7 +40,6 @@ using OpenSim.Framework.Communications; | |||
40 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
41 | using OpenSim.Framework.Servers; | 41 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Region.Environment.Interfaces; | 42 | using OpenSim.Region.Environment.Interfaces; |
43 | using OpenSim.Region.Environment.LandManagement; | ||
44 | using OpenSim.Region.Environment.Modules; | 43 | using OpenSim.Region.Environment.Modules; |
45 | using OpenSim.Region.Environment.Scenes.Scripting; | 44 | using OpenSim.Region.Environment.Scenes.Scripting; |
46 | using OpenSim.Region.Physics.Manager; | 45 | using OpenSim.Region.Physics.Manager; |
@@ -154,13 +153,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
154 | get { return m_authenticateHandler; } | 153 | get { return m_authenticateHandler; } |
155 | } | 154 | } |
156 | 155 | ||
157 | protected readonly LandManager m_LandManager; | ||
158 | // LandManager object instance that manages land related things. Parcel, primcounts etc.. | ||
159 | public LandManager LandManager | ||
160 | { | ||
161 | get { return m_LandManager; } | ||
162 | } | ||
163 | |||
164 | protected readonly EstateManager m_estateManager; | 156 | protected readonly EstateManager m_estateManager; |
165 | // an instance to the physics plugin's Scene object. | 157 | // an instance to the physics plugin's Scene object. |
166 | public PhysicsScene PhysicsScene | 158 | public PhysicsScene PhysicsScene |
@@ -256,8 +248,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
256 | 248 | ||
257 | m_eventManager = new EventManager(); | 249 | m_eventManager = new EventManager(); |
258 | 250 | ||
259 | m_LandManager = new LandManager(this, m_regInfo); | ||
260 | |||
261 | //Bind Storage Manager functions to some land manager functions for this scene | 251 | //Bind Storage Manager functions to some land manager functions for this scene |
262 | EventManager.OnLandObjectAdded += | 252 | EventManager.OnLandObjectAdded += |
263 | new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); | 253 | new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); |
@@ -335,8 +325,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
335 | 325 | ||
336 | protected virtual void RegisterDefaultSceneEvents() | 326 | protected virtual void RegisterDefaultSceneEvents() |
337 | { | 327 | { |
338 | m_eventManager.OnParcelPrimCountAdd += m_LandManager.addPrimToLandPrimCounts; | ||
339 | m_eventManager.OnParcelPrimCountUpdate += addPrimsToParcelCounts; | ||
340 | m_eventManager.OnPermissionError += SendPermissionAlert; | 328 | m_eventManager.OnPermissionError += SendPermissionAlert; |
341 | } | 329 | } |
342 | 330 | ||
@@ -837,10 +825,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
837 | 825 | ||
838 | private void UpdateLand() | 826 | private void UpdateLand() |
839 | { | 827 | { |
840 | if (m_LandManager.landPrimCountTainted) | 828 | if (LandChannel != null) |
841 | { | 829 | { |
842 | //Perform land update of prim count | 830 | if (LandChannel.isLandPrimCountTainted()) |
843 | performParcelPrimCountUpdate(); | 831 | { |
832 | LandChannel.performParcelPrimCountUpdate(); | ||
833 | } | ||
844 | } | 834 | } |
845 | } | 835 | } |
846 | 836 | ||
@@ -974,12 +964,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
974 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 964 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
975 | { | 965 | { |
976 | m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); | 966 | m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); |
977 | m_LandManager.allowedForcefulBans = false; | 967 | LandChannel.allowedForcefulBans = false; |
978 | } | 968 | } |
979 | else | 969 | else |
980 | { | 970 | { |
981 | m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); | 971 | m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); |
982 | m_LandManager.allowedForcefulBans = true; | 972 | LandChannel.allowedForcefulBans = true; |
983 | } | 973 | } |
984 | } | 974 | } |
985 | } | 975 | } |
@@ -1016,11 +1006,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1016 | 1006 | ||
1017 | if (landData.Count == 0) | 1007 | if (landData.Count == 0) |
1018 | { | 1008 | { |
1019 | m_LandManager.NoLandDataFromStorage(); | 1009 | LandChannel.NoLandDataFromStorage(); |
1020 | } | 1010 | } |
1021 | else | 1011 | else |
1022 | { | 1012 | { |
1023 | m_LandManager.IncomingLandObjectsFromStorage(landData); | 1013 | LandChannel.IncomingLandObjectsFromStorage(landData); |
1024 | } | 1014 | } |
1025 | } | 1015 | } |
1026 | 1016 | ||
@@ -1196,9 +1186,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1196 | { | 1186 | { |
1197 | if (Entities.ContainsKey(sceneObject.UUID)) | 1187 | if (Entities.ContainsKey(sceneObject.UUID)) |
1198 | { | 1188 | { |
1199 | m_LandManager.removePrimFromLandPrimCounts(sceneObject); | 1189 | LandChannel.removePrimFromLandPrimCounts(sceneObject); |
1200 | Entities.Remove(sceneObject.UUID); | 1190 | Entities.Remove(sceneObject.UUID); |
1201 | m_LandManager.setPrimsTainted(); | 1191 | LandChannel.setPrimsTainted(); |
1202 | m_innerScene.RemoveAPrimCount(); | 1192 | m_innerScene.RemoveAPrimCount(); |
1203 | } | 1193 | } |
1204 | } | 1194 | } |
@@ -1209,7 +1199,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1209 | /// <param name="prim"></param> | 1199 | /// <param name="prim"></param> |
1210 | public void AcknowledgeNewPrim(SceneObjectGroup prim) | 1200 | public void AcknowledgeNewPrim(SceneObjectGroup prim) |
1211 | { | 1201 | { |
1212 | prim.OnPrimCountTainted += m_LandManager.setPrimsTainted; | 1202 | prim.OnPrimCountTainted += LandChannel.setPrimsTainted; |
1213 | } | 1203 | } |
1214 | 1204 | ||
1215 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) | 1205 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) |
@@ -1350,7 +1340,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1350 | 1340 | ||
1351 | CreateAndAddScenePresence(client, child); | 1341 | CreateAndAddScenePresence(client, child); |
1352 | 1342 | ||
1353 | m_LandManager.sendParcelOverlay(client); | 1343 | LandChannel.sendParcelOverlay(client); |
1354 | CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); | 1344 | CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); |
1355 | } | 1345 | } |
1356 | } | 1346 | } |
@@ -1387,17 +1377,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
1387 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; | 1377 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; |
1388 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; | 1378 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; |
1389 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; | 1379 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; |
1390 | client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest); | 1380 | client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(LandChannel.handleParcelPropertiesRequest); |
1391 | client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest); | 1381 | client.OnParcelDivideRequest += new ParcelDivideRequest(LandChannel.handleParcelDivideRequest); |
1392 | client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest); | 1382 | client.OnParcelJoinRequest += new ParcelJoinRequest(LandChannel.handleParcelJoinRequest); |
1393 | client.OnParcelPropertiesUpdateRequest += | 1383 | client.OnParcelPropertiesUpdateRequest += |
1394 | new ParcelPropertiesUpdateRequest(m_LandManager.handleParcelPropertiesUpdateRequest); | 1384 | new ParcelPropertiesUpdateRequest(LandChannel.handleParcelPropertiesUpdateRequest); |
1395 | client.OnParcelSelectObjects += new ParcelSelectObjects(m_LandManager.handleParcelSelectObjectsRequest); | 1385 | client.OnParcelSelectObjects += new ParcelSelectObjects(LandChannel.handleParcelSelectObjectsRequest); |
1396 | client.OnParcelObjectOwnerRequest += | 1386 | client.OnParcelObjectOwnerRequest += |
1397 | new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); | 1387 | new ParcelObjectOwnerRequest(LandChannel.handleParcelObjectOwnersRequest); |
1398 | client.OnParcelAccessListRequest += new ParcelAccessListRequest(m_LandManager.handleParcelAccessRequest); | 1388 | client.OnParcelAccessListRequest += new ParcelAccessListRequest(LandChannel.handleParcelAccessRequest); |
1399 | client.OnParcelAccessListUpdateRequest += | 1389 | client.OnParcelAccessListUpdateRequest += |
1400 | new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest); | 1390 | new ParcelAccessListUpdateRequest(LandChannel.handleParcelAccessUpdateRequest); |
1401 | 1391 | ||
1402 | client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); | 1392 | client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); |
1403 | client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest; | 1393 | client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest; |
@@ -1445,7 +1435,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1445 | 1435 | ||
1446 | if (avatar.IsChildAgent) | 1436 | if (avatar.IsChildAgent) |
1447 | { | 1437 | { |
1448 | avatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement; | 1438 | avatar.OnSignificantClientMovement += LandChannel.handleSignificantClientMovement; |
1449 | } | 1439 | } |
1450 | 1440 | ||
1451 | return avatar; | 1441 | return avatar; |
@@ -2021,31 +2011,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2021 | } | 2011 | } |
2022 | return LLUUID.Zero; | 2012 | return LLUUID.Zero; |
2023 | } | 2013 | } |
2024 | 2014 | ||
2025 | /// <summary> | ||
2026 | /// | ||
2027 | /// </summary> | ||
2028 | public void performParcelPrimCountUpdate() | ||
2029 | { | ||
2030 | m_LandManager.resetAllLandPrimCounts(); | ||
2031 | m_eventManager.TriggerParcelPrimCountUpdate(); | ||
2032 | m_LandManager.finalizeLandPrimCountUpdate(); | ||
2033 | m_LandManager.landPrimCountTainted = false; | ||
2034 | } | ||
2035 | |||
2036 | /// <summary> | ||
2037 | /// | ||
2038 | /// </summary> | ||
2039 | public void addPrimsToParcelCounts() | ||
2040 | { | ||
2041 | foreach (EntityBase obj in Entities.Values) | ||
2042 | { | ||
2043 | if (obj is SceneObjectGroup) | ||
2044 | { | ||
2045 | m_eventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj); | ||
2046 | } | ||
2047 | } | ||
2048 | } | ||
2049 | 2015 | ||
2050 | /// <summary> | 2016 | /// <summary> |
2051 | /// This method is a way for the Friends Module to create an instant | 2017 | /// This method is a way for the Friends Module to create an instant |
@@ -2455,7 +2421,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2455 | 2421 | ||
2456 | public LLUUID GetLandOwner(float x, float y) | 2422 | public LLUUID GetLandOwner(float x, float y) |
2457 | { | 2423 | { |
2458 | Land land = LandManager.getLandObject(x, y); | 2424 | ILandObject land = LandChannel.getLandObject(x, y); |
2459 | if (land == null) | 2425 | if (land == null) |
2460 | { | 2426 | { |
2461 | return LLUUID.Zero; | 2427 | return LLUUID.Zero; |
@@ -2468,12 +2434,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2468 | 2434 | ||
2469 | public LandData GetLandData(float x, float y) | 2435 | public LandData GetLandData(float x, float y) |
2470 | { | 2436 | { |
2471 | return LandManager.getLandObject(x, y).landData; | 2437 | return LandChannel.getLandObject(x, y).landData; |
2472 | } | 2438 | } |
2473 | 2439 | ||
2474 | public void SetLandMusicURL(float x, float y, string url) | 2440 | public void SetLandMusicURL(float x, float y, string url) |
2475 | { | 2441 | { |
2476 | Land land = LandManager.getLandObject(x, y); | 2442 | ILandObject land = LandChannel.getLandObject(x, y); |
2477 | if (land == null) | 2443 | if (land == null) |
2478 | { | 2444 | { |
2479 | return; | 2445 | return; |
@@ -2487,7 +2453,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2487 | 2453 | ||
2488 | public void SetLandMediaURL(float x, float y, string url) | 2454 | public void SetLandMediaURL(float x, float y, string url) |
2489 | { | 2455 | { |
2490 | Land land = LandManager.getLandObject(x, y); | 2456 | ILandObject land = LandChannel.getLandObject(x, y); |
2491 | 2457 | ||
2492 | if (land == null) | 2458 | if (land == null) |
2493 | { | 2459 | { |