Don't crash for wip-tracks / karts (wrong shader name or incomplete terrain)
This commit is contained in:
parent
813b08bc73
commit
9c2f91c11b
@ -522,7 +522,8 @@ std::shared_ptr<video::IImage>
|
||||
{
|
||||
// Load colorization mask
|
||||
std::shared_ptr<video::IImage> mask;
|
||||
if (SP::getSPShader(m_material->getShaderName())->useAlphaChannel())
|
||||
SPShader* sps = SP::getSPShader(m_material->getShaderName());
|
||||
if (sps && sps->useAlphaChannel())
|
||||
{
|
||||
Log::debug("SPTexture", "Don't use colorization mask or factor"
|
||||
" with shader using alpha channel for %s", m_path.c_str());
|
||||
|
@ -730,7 +730,8 @@ void World::resetAllKarts()
|
||||
for (KartList::iterator i = m_karts.begin(); i != m_karts.end(); i++)
|
||||
{
|
||||
if ((*i)->isGhostKart()) continue;
|
||||
(*i)->getBody()->setGravity((*i)->getMaterial()->hasGravity() ?
|
||||
(*i)->getBody()->setGravity(
|
||||
(*i)->getMaterial() && (*i)->getMaterial()->hasGravity() ?
|
||||
(*i)->getNormal() * -g : Vec3(0, -g, 0));
|
||||
}
|
||||
for(int i=0; i<60; i++) Physics::getInstance()->update(1.f/60.f);
|
||||
|
Loading…
Reference in New Issue
Block a user