Fix potential crash
This commit is contained in:
parent
c3f589561c
commit
af5b23e5c6
@ -333,7 +333,8 @@ void SkiddingAI::update(float dt)
|
||||
|
||||
// If we are faster, try to predict the point where we will hit
|
||||
// the other kart
|
||||
if(m_kart_ahead->getSpeed() < m_kart->getSpeed())
|
||||
if((m_kart_ahead->getSpeed() < m_kart->getSpeed()) &&
|
||||
!m_kart_ahead->isGhostKart())
|
||||
{
|
||||
float time_till_hit = m_distance_ahead
|
||||
/ (m_kart->getSpeed()-m_kart_ahead->getSpeed());
|
||||
|
Loading…
x
Reference in New Issue
Block a user