More from feedback on RC1 : rescue removes the plunger from your face

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6884 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-12-08 01:48:32 +00:00
parent 23cde9398f
commit b49a807f2d

View File

@ -433,6 +433,7 @@ void Kart::reset()
m_bounce_back_time = 0.0f;
m_skidding = 1.0f;
m_time_last_crash = 0.0f;
m_view_blocked_by_plunger = 0.0f;
if(m_terrain_sound)
{
@ -864,16 +865,23 @@ void Kart::update(float dt)
if(m_kart_properties->hasSkidmarks())
m_skidmarks->update(dt);
const bool emergency = playingEmergencyAnimation();
if (emergency)
{
m_view_blocked_by_plunger = 0.0f;
}
// Remove the shadow if the kart is not on the ground (if a kart
// is rescued isOnGround might still be true, since the kart rigid
// body was removed from the physics, but still retain the old
// values for the raycasts).
if( (!isOnGround() || playingEmergencyAnimation()) && m_shadow_enabled)
if( (!isOnGround() || emergency) && m_shadow_enabled)
{
m_shadow_enabled = false;
m_shadow->disableShadow();
}
if(!m_shadow_enabled && isOnGround() && !playingEmergencyAnimation())
if(!m_shadow_enabled && isOnGround() && !emergency)
{
m_shadow->enableShadow();
m_shadow_enabled = true;