Bugfix: at the time the check sphere is created world does not

have the karts created, and therefore an invalid number of karts
was used.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5539 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-06-22 12:48:11 +00:00
parent fd1d89d5cf
commit fca5de3e7d

View File

@ -40,7 +40,7 @@ CheckSphere::CheckSphere(CheckManager *check_manager, const XMLNode &node,
node.get("radius", &m_radius2);
m_radius2 *= m_radius2;
node.get("xyz", &m_center_point);
unsigned int num_karts = World::getWorld()->getNumKarts();
unsigned int num_karts = race_manager->getNumberOfKarts();
m_is_inside.resize(num_karts);
m_distance2.resize(num_karts);
for(unsigned int i=0; i< num_karts; i++)