From 53003db4cf8fe468a4c417db72c0dfd9b6c30404 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 9 Nov 2016 22:12:27 +0000 Subject: [PATCH] stop warning about integer division cast to float --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++--- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 168080fa8e..ca32940cd2 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -67,8 +67,6 @@ namespace OpenSim.Region.Framework.Scenes #region Fields - public bool EmergencyMonitoring = false; - /// /// Show debug information about animations. /// @@ -4606,7 +4604,8 @@ Label_GroupsDone: } // TODO: This check should probably be in QueryAccess(). - ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, RegionInfo.RegionSizeX / 2, RegionInfo.RegionSizeY / 2); + ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, + (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); if (nearestParcel == null) { m_log.InfoFormat( diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 1141f541dd..f5f83caad0 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -246,11 +246,11 @@ namespace OpenSim.Region.Framework.Scenes // try to work around that scale down X and Y acording to region size, so reducing the resolution // // viewers need to scale up - float scaleX = m_parentScene.RegionInfo.RegionSizeX / Constants.RegionSize; + float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize; if (scaleX == 0) scaleX = 1.0f; scaleX = 1.0f / scaleX; - float scaleY = m_parentScene.RegionInfo.RegionSizeY / Constants.RegionSize; + float scaleY = (float)m_parentScene.RegionInfo.RegionSizeY / (float)Constants.RegionSize; if (scaleY == 0) scaleY = 1.0f; scaleY = 1.0f / scaleY;