Fixed #973: the main track mesh added to the bullet physics twice, since
the index 'main_track' was set at the wrong location (before the main track was loaded, see r9757). Also removed unnecessary loop when reading track.xml files. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12756 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5dfa231a23
commit
40c02fba2e
@ -1406,30 +1406,24 @@ void Track::loadTrackModel(bool reverse_track, unsigned int mode_id)
|
||||
upwards_distance);
|
||||
}
|
||||
|
||||
unsigned int main_track_count = m_all_nodes.size();
|
||||
unsigned int start_position_counter = 0;
|
||||
|
||||
// we need to check for fog before loading the main track model
|
||||
for(unsigned int i=0; i<root->getNumNodes(); i++)
|
||||
if(const XMLNode *node = root->getNode("sun"))
|
||||
{
|
||||
const XMLNode *node = root->getNode(i);
|
||||
const std::string name = node->getName();
|
||||
|
||||
if(name=="sun")
|
||||
{
|
||||
node->get("xyz", &m_sun_position );
|
||||
node->get("ambient", &m_default_ambient_color);
|
||||
node->get("sun-specular", &m_sun_specular_color);
|
||||
node->get("sun-diffuse", &m_sun_diffuse_color);
|
||||
node->get("fog", &m_use_fog);
|
||||
node->get("fog-color", &m_fog_color);
|
||||
node->get("fog-density", &m_fog_density);
|
||||
node->get("fog-start", &m_fog_start);
|
||||
node->get("fog-end", &m_fog_end);
|
||||
}
|
||||
node->get("xyz", &m_sun_position );
|
||||
node->get("ambient", &m_default_ambient_color);
|
||||
node->get("sun-specular", &m_sun_specular_color);
|
||||
node->get("sun-diffuse", &m_sun_diffuse_color);
|
||||
node->get("fog", &m_use_fog);
|
||||
node->get("fog-color", &m_fog_color);
|
||||
node->get("fog-density", &m_fog_density);
|
||||
node->get("fog-start", &m_fog_start);
|
||||
node->get("fog-end", &m_fog_end);
|
||||
}
|
||||
|
||||
loadMainTrack(*root);
|
||||
unsigned int main_track_count = m_all_nodes.size();
|
||||
|
||||
LodNodeLoader lod_loader;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user