add default_number_of_laps
This commit is contained in:
@@ -98,7 +98,7 @@ void GrandPrixData::changeTrackNumber(const unsigned int number_of_tracks,
|
||||
continue;
|
||||
|
||||
m_tracks.push_back(id);
|
||||
m_laps.push_back(3); // TODO: Take the default number from the track
|
||||
m_laps.push_back(track_manager->getTrack(index)->getDefaultNumberOfLaps());
|
||||
m_reversed.push_back(false); // This will be changed later
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,6 +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= 3;
|
||||
m_all_nodes.clear();
|
||||
m_all_physics_only_nodes.clear();
|
||||
m_all_cached_meshes.clear();
|
||||
@@ -483,6 +484,7 @@ 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)
|
||||
|
||||
@@ -206,7 +206,7 @@ private:
|
||||
/** True if this track (textures and track data) should be cached. Used
|
||||
* for the overworld. */
|
||||
bool m_cache_track;
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
/** A list of textures that were cached before the track is loaded.
|
||||
@@ -388,7 +388,7 @@ private:
|
||||
|
||||
float m_displacement_speed;
|
||||
float m_caustics_speed;
|
||||
|
||||
|
||||
/** The levels for color correction
|
||||
* m_color_inlevel(black, gamma, white)
|
||||
* m_color_outlevel(black, white)*/
|
||||
@@ -398,6 +398,9 @@ private:
|
||||
/** List of all bezier curves in the track - for e.g. camera, ... */
|
||||
std::vector<BezierCurve*> m_all_curves;
|
||||
|
||||
/** The number of laps the track will be raced if no other value is given.*/
|
||||
int m_default_number_of_laps;
|
||||
|
||||
void loadTrackInfo();
|
||||
void loadQuadGraph(unsigned int mode_id, const bool reverse);
|
||||
void convertTrackToBullet(scene::ISceneNode *node);
|
||||
@@ -602,7 +605,7 @@ public:
|
||||
|
||||
bool getBloom() const { return m_bloom; }
|
||||
float getBloomThreshold() const { return m_bloom_threshold; }
|
||||
|
||||
|
||||
/** Return the color levels for color correction shader */
|
||||
core::vector3df getColorLevelIn() const { return m_color_inlevel; }
|
||||
core::vector2df getColorLevelOut() const { return m_color_outlevel; }
|
||||
@@ -610,11 +613,12 @@ public:
|
||||
bool hasLensFlare() const { return m_lensflare; }
|
||||
bool hasGodRays() const { return m_godrays; }
|
||||
bool hasShadows() const { return m_shadows; }
|
||||
|
||||
|
||||
void addNode(scene::ISceneNode* node) { m_all_nodes.push_back(node); }
|
||||
|
||||
float getDisplacementSpeed() const { return m_displacement_speed; }
|
||||
float getCausticsSpeed() const { return m_caustics_speed; }
|
||||
const int getDefaultNumberOfLaps() const { return m_default_number_of_laps;}
|
||||
bool operator<(const Track &other) const;
|
||||
}; // class Track
|
||||
|
||||
|
||||
Reference in New Issue
Block a user