Minor code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4150 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -39,7 +39,7 @@ CheckManager::CheckManager(const XMLNode &node, Track *track)
|
||||
m_all_checks.push_back(cl);
|
||||
if(cl->getType()==CheckStructure::CT_NEW_LAP)
|
||||
{
|
||||
track->getQuadGraph().setStartCoordinate(cl->getCenterPoint());
|
||||
track->getQuadGraph().setStartCoordinate(*cl);
|
||||
}
|
||||
} // checkline
|
||||
else if(type=="check-sphere")
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "io/xml_node.hpp"
|
||||
#include "tracks/check_line.hpp"
|
||||
#include "tracks/quad_set.hpp"
|
||||
|
||||
const int QuadGraph::UNKNOWN_SECTOR = -1;
|
||||
@@ -64,8 +65,9 @@ QuadGraph::~QuadGraph()
|
||||
* and a kart just before the start line will have a getDistanceFromStart()
|
||||
* which is the length of the track.
|
||||
*/
|
||||
void QuadGraph::setStartCoordinate(const Vec3 &start_point)
|
||||
void QuadGraph::setStartCoordinate(const CheckLine &cl)
|
||||
{
|
||||
Vec3 start_point=cl.getCenterPoint();
|
||||
int sector=UNKNOWN_SECTOR;
|
||||
findRoadSector(start_point, §or);
|
||||
if(sector==UNKNOWN_SECTOR)
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "tracks/graph_node.hpp"
|
||||
#include "tracks/quad_set.hpp"
|
||||
|
||||
class CheckLine;
|
||||
|
||||
/** This class stores a graph of quads. */
|
||||
class QuadGraph {
|
||||
|
||||
@@ -91,7 +93,7 @@ public:
|
||||
=video::SColor(127, 255, 255, 255) );
|
||||
#endif
|
||||
void mapPoint2MiniMap(const Vec3 &xyz, Vec3 *out) const;
|
||||
void setStartCoordinate(const Vec3 &start_point);
|
||||
void setStartCoordinate(const CheckLine &cl);
|
||||
|
||||
/** Returns the number of nodes in the graph. */
|
||||
unsigned int getNumNodes() const { return m_all_nodes.size(); }
|
||||
|
||||
Reference in New Issue
Block a user