Fixed compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7775 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-02-28 22:56:51 +00:00
parent 0576f8c1e2
commit 16f32c4471
2 changed files with 8 additions and 4 deletions

View File

@ -117,8 +117,10 @@ public:
for (unsigned int n=0; n<count; n++)
{
scene::SParticle& curr = particlearray[n];
const int i = (curr.pos.X - track_x)/track_x_len*(HEIGHT_MAP_RESOLUTION);
const int j = (curr.pos.Z - track_z)/track_z_len*(HEIGHT_MAP_RESOLUTION);
const int i = (int)( (curr.pos.X - track_x)
/track_x_len*(HEIGHT_MAP_RESOLUTION) );
const int j = (int)( (curr.pos.Z - track_z)
/track_z_len*(HEIGHT_MAP_RESOLUTION) );
if (i >= HEIGHT_MAP_RESOLUTION || j >= HEIGHT_MAP_RESOLUTION) continue;
if (i < 0 || j < 0) continue;
@ -141,7 +143,9 @@ public:
if (m_first_time)
{
curr.pos.Y = m_height_map[i][j] + (curr.pos.Y - m_height_map[i][j])*((rand()%500)/500.0f);
curr.pos.Y = m_height_map[i][j]
+ (curr.pos.Y - m_height_map[i][j])
*((rand()%500)/500.0f);
}
else
{

View File

@ -1024,7 +1024,7 @@ void Kart::handleMaterialGFX()
float create;
if (distance < 2.0f)
{
create = pk->getMaxRate();
create = (float)pk->getMaxRate();
}
else if (distance < 4.0f)
{