Skip to content

Commit

Permalink
Reinstate float casts to fix maps not loading.
Browse files Browse the repository at this point in the history
Broken in bdc51e1.

Fixes ticket:4404. Probably fixes ticket:4405.
  • Loading branch information
Cyp committed May 20, 2016
1 parent be9548b commit e75d0f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/radar.cpp
Expand Up @@ -168,7 +168,7 @@ bool resizeRadar()
memset(radarBuffer, 0, radarBufferSize);
if (rotateRadar)
{
RadarZoomMultiplier = std::max(RADWIDTH, RADHEIGHT) / std::max({radarTexWidth, radarTexHeight, 1});
RadarZoomMultiplier = (float)std::max(RADWIDTH, RADHEIGHT) / std::max({radarTexWidth, radarTexHeight, 1});
}
else
{
Expand Down Expand Up @@ -219,8 +219,8 @@ uint8_t GetRadarZoom()
/** Calculate the radar pixel sizes. Returns pixels per tile. */
static void CalcRadarPixelSize(float *SizeH, float *SizeV)
{
*SizeH = radarHeight / std::max(radarTexHeight, 1);
*SizeV = radarWidth / std::max(radarTexWidth, 1);
*SizeH = (float)radarHeight / std::max(radarTexHeight, 1);
*SizeV = (float)radarWidth / std::max(radarTexWidth, 1);
}

/** Given a position within the radar, return a world coordinate. */
Expand Down

0 comments on commit e75d0f9

Please sign in to comment.