Fixed compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7804 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-03-04 02:10:26 +00:00
parent 362514998b
commit 4fac382508

View File

@ -254,7 +254,7 @@ void SlipStream::setIntensity(float f, const Kart *kart)
MovingTexture::setSpeed(f, 0); MovingTexture::setSpeed(f, 0);
int c = f*255; int c = (int)(f*255);
if (c > 255) c = 255; if (c > 255) c = 255;
const unsigned int bcount = m_node->getMesh()->getMeshBufferCount(); const unsigned int bcount = m_node->getMesh()->getMeshBufferCount();
@ -264,7 +264,7 @@ void SlipStream::setIntensity(float f, const Kart *kart)
irr::video::S3DVertex* vertices = (video::S3DVertex*)mb->getVertices(); irr::video::S3DVertex* vertices = (video::S3DVertex*)mb->getVertices();
for (unsigned int i=0; i<mb->getVertexCount(); i++) for (unsigned int i=0; i<mb->getVertexCount(); i++)
{ {
const int color = c*(vertices[i].Color.getAlpha()/255.0f); const int color = (int)(c*(vertices[i].Color.getAlpha()/255.0f));
vertices[i].Color.setRed( color ); vertices[i].Color.setRed( color );
vertices[i].Color.setGreen( color ); vertices[i].Color.setGreen( color );
vertices[i].Color.setBlue( color ); vertices[i].Color.setBlue( color );