Allow rescue to be triggered even when the wheels are not on the ground

(the kart might get stuck sitting on a wall with all wheels in the air).
See r1940 on 0.5rc1.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1942 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2008-05-19 14:16:16 +00:00
parent f89f697b7f
commit a03cdc0a6f

View File

@@ -178,13 +178,11 @@ void PlayerKart::update(float dt)
m_collectable.use() ;
m_controls.fire = false;
}
#ifdef DEBUG
// Allow rescuing while still falling ... it's convenient for debugging, but
// not for a release
// We can't restrict rescue to fulfil isOnGround() (which would be more like
// MK), since e.g. in the City track it is possible for the kart to end
// up sitting on a brick wall, with all wheels in the air :((
if ( m_controls.rescue )
#else
if ( isOnGround() && m_controls.rescue )
#endif
{
sound_manager -> playSfx ( SOUND_BEEP ) ;
forceRescue();