don't round to nearest int

0.9.0-post-fixes
UbitUmarov 2017-05-14 05:49:01 +01:00
parent f968118e23
commit 92df6095d5
2 changed files with 3 additions and 3 deletions

View File

@ -130,14 +130,14 @@ namespace OpenSim.Region.CoreModules.World.Land
{ {
ILandObject parcel = m_scene.LandChannel.GetLandObject(parcelID); ILandObject parcel = m_scene.LandChannel.GetLandObject(parcelID);
if (parcel != null && parcel.LandData != null) if (parcel != null && parcel.LandData != null)
return (int)(parcel.LandData.Dwell + 0.5f); return (int)(parcel.LandData.Dwell);
return 0; return 0;
} }
public int GetDwell(LandData land) public int GetDwell(LandData land)
{ {
if (land != null) if (land != null)
return (int)(land.Dwell + 0.5f); return (int)(land.Dwell);
return 0; return 0;
} }

View File

@ -1849,7 +1849,7 @@ namespace OpenSim.Region.CoreModules.World.Land
float newdwell = (float)(cur * 1.666666666667e-5); float newdwell = (float)(cur * 1.666666666667e-5);
LandData.Dwell = newdwell; LandData.Dwell = newdwell;
if(Math.Abs(newdwell - dwell) > 1.0) if(Math.Abs(newdwell - dwell) >= 0.9)
m_scene.EventManager.TriggerLandObjectAdded(this); m_scene.EventManager.TriggerLandObjectAdded(this);
} }
} }