Fix #616 - dancing stars appearing in fixed place

Stars object was being created before data was loaded in. Moving it
to Kart::init() instead. (::loadData has to be called first)


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11107 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
wardje
2012-04-10 15:43:13 +00:00
parent cddea4ae65
commit fd80c17a33

View File

@@ -142,14 +142,6 @@ Kart::Kart (const std::string& ident, unsigned int world_kart_id,
m_terrain_sound = NULL;
m_previous_terrain_sound = NULL;
// Create the stars effect
m_stars_effect =
new Stars(getNode(),
core::vector3df(0.0f,
getKartModel()->getModel()
->getBoundingBox().MaxEdge.Y,
0.0f) );
} // Kart
// -----------------------------------------------------------------------------
@@ -200,6 +192,13 @@ void Kart::init(RaceManager::KartType type, bool is_first_kart)
m_kart_gfx = new KartGFX(this);
m_skidding = new Skidding(this,
m_kart_properties->getSkiddingProperties());
// Create the stars effect
m_stars_effect =
new Stars(getNode(),
core::vector3df(0.0f,
getKartModel()->getModel()
->getBoundingBox().MaxEdge.Y,
0.0f) );
reset();
} // init