From 92df6095d5aed4f008dfdad7a597e72fdc70217d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 14 May 2017 05:49:01 +0100 Subject: don't round to nearest int --- OpenSim/Region/CoreModules/World/Land/DwellModule.cs | 4 ++-- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs index 55a341e..22480e6 100644 --- a/OpenSim/Region/CoreModules/World/Land/DwellModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/DwellModule.cs @@ -130,14 +130,14 @@ namespace OpenSim.Region.CoreModules.World.Land { ILandObject parcel = m_scene.LandChannel.GetLandObject(parcelID); if (parcel != null && parcel.LandData != null) - return (int)(parcel.LandData.Dwell + 0.5f); + return (int)(parcel.LandData.Dwell); return 0; } public int GetDwell(LandData land) { if (land != null) - return (int)(land.Dwell + 0.5f); + return (int)(land.Dwell); return 0; } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 9affe7d..ccb85f6 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -1849,7 +1849,7 @@ namespace OpenSim.Region.CoreModules.World.Land float newdwell = (float)(cur * 1.666666666667e-5); LandData.Dwell = newdwell; - if(Math.Abs(newdwell - dwell) > 1.0) + if(Math.Abs(newdwell - dwell) >= 0.9) m_scene.EventManager.TriggerLandObjectAdded(this); } } -- cgit v1.1