Changed default number of laps to be 3 (and not the number of laps
used last time), which seems to be a better default. Some minor cosmetic changes.
This commit is contained in:
parent
9267e2d304
commit
fbf5bf4166
@ -111,13 +111,14 @@ void GrandPrixData::changeTrackNumber(const unsigned int number_of_tracks,
|
||||
rand() % available_tracks :
|
||||
track_indices[rand() % available_tracks];
|
||||
|
||||
std::string id = track_manager->getTrack(index)->getIdent();
|
||||
const Track *track = track_manager->getTrack(index);
|
||||
std::string id = track->getIdent();
|
||||
// Avoid duplicate tracks
|
||||
if (std::find(m_tracks.begin(), m_tracks.end(), id) != m_tracks.end())
|
||||
continue;
|
||||
|
||||
m_tracks.push_back(id);
|
||||
m_laps.push_back(track_manager->getTrack(index)->getDefaultNumberOfLaps());
|
||||
m_laps.push_back(track->getDefaultNumberOfLaps());
|
||||
m_reversed.push_back(false); // This will be changed later in the code
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ Track::Track(const std::string &filename)
|
||||
m_ident=="overworld";
|
||||
m_minimap_x_scale = 1.0f;
|
||||
m_minimap_y_scale = 1.0f;
|
||||
m_default_number_of_laps= UserConfigParams::m_num_laps;
|
||||
m_default_number_of_laps= 3;
|
||||
m_all_nodes.clear();
|
||||
m_all_physics_only_nodes.clear();
|
||||
m_all_cached_meshes.clear();
|
||||
@ -472,6 +472,7 @@ void Track::loadTrackInfo()
|
||||
root->get("groups", &m_groups);
|
||||
root->get("internal", &m_internal);
|
||||
root->get("reverse", &m_reverse_available);
|
||||
root->get("default-number-of-laps",&m_default_number_of_laps);
|
||||
root->get("push-back", &m_enable_push_back);
|
||||
root->get("clouds", &m_clouds);
|
||||
root->get("bloom", &m_bloom);
|
||||
@ -483,7 +484,6 @@ void Track::loadTrackInfo()
|
||||
root->get("caustics-speed", &m_caustics_speed);
|
||||
root->get("color-level-in", &m_color_inlevel);
|
||||
root->get("color-level-out", &m_color_outlevel);
|
||||
root->get("default-number-of-laps",&m_default_number_of_laps);
|
||||
|
||||
// Make the default for auto-rescue in battle mode and soccer mode to be false
|
||||
if(m_is_arena || m_is_soccer)
|
||||
|
Loading…
Reference in New Issue
Block a user