stop warning about integer division cast to float

melanie
UbitUmarov 2016-11-09 22:12:27 +00:00
parent 1e1d0d8204
commit 53003db4cf
2 changed files with 4 additions and 5 deletions

View File

@ -67,8 +67,6 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields
public bool EmergencyMonitoring = false;
/// <summary>
/// Show debug information about animations.
/// </summary>
@ -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(

View File

@ -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;