aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-05-14 05:39:22 +0100
committerUbitUmarov2017-05-14 05:39:22 +0100
commitf968118e23f08a2923f1a190f301d842346951af (patch)
tree0431c3573df04075df1fba9738aa823ec66f9c1e
parent fix remote requests for dwell, so dwell module still called (diff)
downloadopensim-SC_OLD-f968118e23f08a2923f1a190f301d842346951af.zip
opensim-SC_OLD-f968118e23f08a2923f1a190f301d842346951af.tar.gz
opensim-SC_OLD-f968118e23f08a2923f1a190f301d842346951af.tar.bz2
opensim-SC_OLD-f968118e23f08a2923f1a190f301d842346951af.tar.xz
don't do dwell if there is no module active
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index cb54184..9affe7d 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -58,6 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Land
58 58
59 protected ExpiringCache<UUID, bool> m_groupMemberCache = new ExpiringCache<UUID, bool>(); 59 protected ExpiringCache<UUID, bool> m_groupMemberCache = new ExpiringCache<UUID, bool>();
60 protected TimeSpan m_groupMemberCacheTimeout = TimeSpan.FromSeconds(30); // cache invalidation after 30 seconds 60 protected TimeSpan m_groupMemberCacheTimeout = TimeSpan.FromSeconds(30); // cache invalidation after 30 seconds
61 IDwellModule m_dwellModule;
61 62
62 private bool[,] m_landBitmap; 63 private bool[,] m_landBitmap;
63 public bool[,] LandBitmap 64 public bool[,] LandBitmap
@@ -268,6 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Land
268 { 269 {
269 LandData = landData.Copy(); 270 LandData = landData.Copy();
270 m_scene = scene; 271 m_scene = scene;
272 m_dwellModule = m_scene.RequestModuleInterface<IDwellModule>();
271 } 273 }
272 274
273 public LandObject(UUID owner_id, bool is_group_owned, Scene scene, LandData data = null) 275 public LandObject(UUID owner_id, bool is_group_owned, Scene scene, LandData data = null)
@@ -276,7 +278,10 @@ namespace OpenSim.Region.CoreModules.World.Land
276 if (m_scene == null) 278 if (m_scene == null)
277 LandBitmap = new bool[Constants.RegionSize / landUnit, Constants.RegionSize / landUnit]; 279 LandBitmap = new bool[Constants.RegionSize / landUnit, Constants.RegionSize / landUnit];
278 else 280 else
281 {
279 LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; 282 LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit];
283 m_dwellModule = m_scene.RequestModuleInterface<IDwellModule>();
284 }
280 285
281 if(data == null) 286 if(data == null)
282 LandData = new LandData(); 287 LandData = new LandData();
@@ -1819,7 +1824,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1819 } 1824 }
1820 1825
1821 // need to update dwell here bc landdata has no parent info 1826 // need to update dwell here bc landdata has no parent info
1822 if(LandData != null) 1827 if(LandData != null && m_dwellModule != null)
1823 { 1828 {
1824 double now = Util.GetTimeStampMS(); 1829 double now = Util.GetTimeStampMS();
1825 double elapsed = now - LandData.LastDwellTimeMS; 1830 double elapsed = now - LandData.LastDwellTimeMS;