Fix plunger crash

This commit is contained in:
Vincent Lejeune 2014-09-21 18:28:13 +02:00
parent 4df40c3de5
commit 034058f63a
2 changed files with 5 additions and 2 deletions

View File

@ -250,8 +250,6 @@ void STKMeshSceneNode::render()
GLenum itype = mesh.IndexType;
size_t count = mesh.IndexCount;
if (!mesh.textures[0])
mesh.textures[0] = getUnicolorTexture(video::SColor(255, 255, 255, 255));
compressTexture(mesh.textures[0], true);
if (UserConfigParams::m_azdo)
{

View File

@ -32,6 +32,7 @@
#include "physics/physics.hpp"
#include "race/race_manager.hpp"
#include "utils/string_utils.hpp"
#include "graphics/glwrap.hpp"
#include "utils/log.hpp" //TODO: remove after debugging is done
@ -69,6 +70,10 @@ RubberBand::RubberBand(Plunger *plunger, AbstractKart *kart)
verts[i].Color = color;
}
// Color
mb->getMaterial().setTexture(0, getUnicolorTexture(video::SColor(255, 255, 255, 255)));
// Gloss
mb->getMaterial().setTexture(1, getUnicolorTexture(video::SColor(0, 0, 0, 0)));
updatePosition();
m_node = irr_driver->addMesh(m_mesh);
irr_driver->applyObjectPassShader(m_node);