Don't allow slipstream if the kart ahead is being rescued/exploded.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7491 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-01-20 06:14:32 +00:00
parent 0cb39ad40c
commit aa0e75d1f4

View File

@ -360,9 +360,11 @@ void SlipStream::update(float dt)
for(unsigned int i=0; i<num_karts; i++)
{
m_target_kart= world->getKart(i);
// Don't test for slipstream with itself.
if(m_target_kart==m_kart ||
m_target_kart->isEliminated() ) continue;
// Don't test for slipstream with itself, a kart that is being
// rescued or exploding, or an eliminated kart
if(m_target_kart==m_kart ||
m_target_kart->playingEmergencyAnimation() ||
m_target_kart->isEliminated() ) continue;
// If the kart we are testing against is too slow, no need to test
// slipstreaming. Note: We compare the speed of the other kart