From f968118e23f08a2923f1a190f301d842346951af Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 14 May 2017 05:39:22 +0100 Subject: don't do dwell if there is no module active --- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World/Land') 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 protected ExpiringCache m_groupMemberCache = new ExpiringCache(); protected TimeSpan m_groupMemberCacheTimeout = TimeSpan.FromSeconds(30); // cache invalidation after 30 seconds + IDwellModule m_dwellModule; private bool[,] m_landBitmap; public bool[,] LandBitmap @@ -268,6 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Land { LandData = landData.Copy(); m_scene = scene; + m_dwellModule = m_scene.RequestModuleInterface(); } public LandObject(UUID owner_id, bool is_group_owned, Scene scene, LandData data = null) @@ -276,7 +278,10 @@ namespace OpenSim.Region.CoreModules.World.Land if (m_scene == null) LandBitmap = new bool[Constants.RegionSize / landUnit, Constants.RegionSize / landUnit]; else + { LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; + m_dwellModule = m_scene.RequestModuleInterface(); + } if(data == null) LandData = new LandData(); @@ -1819,7 +1824,7 @@ namespace OpenSim.Region.CoreModules.World.Land } // need to update dwell here bc landdata has no parent info - if(LandData != null) + if(LandData != null && m_dwellModule != null) { double now = Util.GetTimeStampMS(); double elapsed = now - LandData.LastDwellTimeMS; -- cgit v1.1