Fixed afall camera not working when SFX are disabled
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8502 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
0cf4133d8a
commit
b183a8b250
@ -986,11 +986,10 @@ void Kart::handleMaterialSFX(const Material *material)
|
|||||||
*/
|
*/
|
||||||
void Kart::handleMaterialGFX()
|
void Kart::handleMaterialGFX()
|
||||||
{
|
{
|
||||||
// Nothing to do if there are no particles.
|
|
||||||
if (!m_terrain_particles) return;
|
|
||||||
|
|
||||||
const Material *material = getMaterial();
|
const Material *material = getMaterial();
|
||||||
|
|
||||||
|
if (m_terrain_particles)
|
||||||
|
{
|
||||||
// First test: give the terrain effect, if the kart is
|
// First test: give the terrain effect, if the kart is
|
||||||
// on top of a surface (i.e. not falling), actually touching
|
// on top of a surface (i.e. not falling), actually touching
|
||||||
// something with the wheels, and the material has not the
|
// something with the wheels, and the material has not the
|
||||||
@ -1043,6 +1042,7 @@ void Kart::handleMaterialGFX()
|
|||||||
m_terrain_particles->setCreationRate(create);
|
m_terrain_particles->setCreationRate(create);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Now the kart is either falling, or driving on a terrain which
|
// Now the kart is either falling, or driving on a terrain which
|
||||||
// has the 'below surface' flag set. Detect if there is a surface
|
// has the 'below surface' flag set. Detect if there is a surface
|
||||||
@ -1059,6 +1059,8 @@ void Kart::handleMaterialGFX()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_terrain_particles)
|
||||||
|
{
|
||||||
// Use the middle of the contact points of the two rear wheels
|
// Use the middle of the contact points of the two rear wheels
|
||||||
// as the point from which to cast the ray upwards
|
// as the point from which to cast the ray upwards
|
||||||
const btWheelInfo::RaycastInfo &ri2 =
|
const btWheelInfo::RaycastInfo &ri2 =
|
||||||
@ -1116,8 +1118,7 @@ void Kart::handleMaterialGFX()
|
|||||||
|
|
||||||
// handleMaterialSFX(surface_material);
|
// handleMaterialSFX(surface_material);
|
||||||
}
|
}
|
||||||
//if (m_camera != NULL) m_camera->setFallMode(true);
|
}
|
||||||
//m_camera->setFallMode(false);
|
|
||||||
|
|
||||||
} // handleMaterialGFX
|
} // handleMaterialGFX
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user