stop warning about integer division cast to float
parent
1e1d0d8204
commit
53003db4cf
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue