Improved documentation, fix bug that rubber ball would not

handle losing its target correctly.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9786 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-09-09 00:27:44 +00:00
parent 7b0be185d4
commit a06e4a3ba8

View File

@ -453,12 +453,12 @@ float RubberBall::getMaxTerrainHeight() const
} // getMaxTerrainHeight
// ----------------------------------------------------------------------------
void RubberBall::checkDistanceToTarget()
/** Determines the distance to the target kart. If the target is close, the
* rubber ball will switch from following the quad graph structure to
* directly aim at the target.
*/
void RubberBall::checkDistanceToTarget()
{
// If aiming at target phase, keep on aiming at target.
// ----------------------------------------------------
if(m_aiming_at_target) return;
const LinearWorld *world = dynamic_cast<LinearWorld*>(World::getWorld());
if(!world) return; // FIXME battle mode