Bugfix: rubber ball was not deleted when being shot while the firing

kart was first (among the still driving karts).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9953 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2011-10-06 23:25:25 +00:00
parent 31924c2efb
commit 598ab4b5c1

View File

@@ -68,11 +68,11 @@ RubberBall::RubberBall(Kart *kart, Track* track)
// Just init the previoux coordinates with some value that's not getXYZ()
m_previous_xyz = m_owner->getXYZ();
// A negative value indicates that the timer is not active
m_delete_timer = -1.0f;
computeTarget();
// If there is no target (i.e. the firing kart is first kart that is
// still racing, start the delete timer.
m_delete_timer = m_target!=m_owner ? -1.0f : 10.0f;
// initialises the current graph node
TrackSector::update(getXYZ(), kart, track);