Core/Game: fix all warnings related to converting doubles and floats.

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-22 12:39:39 -07:00
parent 399e35f8f5
commit 5cbae843d5
39 changed files with 378 additions and 380 deletions
@@ -156,9 +156,9 @@ DestinationHolder<TRAVELLER>::GetLocationNow(const Map * map, float &x, float &y
else if (HasDestination())
{
double percent_passed = (double)i_timeElapsed / (double)i_totalTravelTime;
const float distanceX = ((i_destX - i_fromX) * percent_passed);
const float distanceY = ((i_destY - i_fromY) * percent_passed);
const float distanceZ = ((i_destZ - i_fromZ) * percent_passed);
const float distanceX = (float)((i_destX - i_fromX) * percent_passed);
const float distanceY = (float)((i_destY - i_fromY) * percent_passed);
const float distanceZ = (float)((i_destZ - i_fromZ) * percent_passed);
x = i_fromX + distanceX;
y = i_fromY + distanceY;
float z2 = i_fromZ + distanceZ;
@@ -207,9 +207,9 @@ DestinationHolder<TRAVELLER>::GetLocationNowNoMicroMovement(float &x, float &y,
else
{
double percent_passed = (double)i_timeElapsed / (double)i_totalTravelTime;
x = i_fromX + ((i_destX - i_fromX) * percent_passed);
y = i_fromY + ((i_destY - i_fromY) * percent_passed);
z = i_fromZ + ((i_destZ - i_fromZ) * percent_passed);
x = (float)(i_fromX + ((i_destX - i_fromX) * percent_passed));
y = (float)(i_fromY + ((i_destY - i_fromY) * percent_passed));
z = (float)(i_fromZ + ((i_destZ - i_fromZ) * percent_passed));
}
}