diff --git a/src/tracks/quad_graph.cpp b/src/tracks/quad_graph.cpp index 01a858278..1879d8215 100644 --- a/src/tracks/quad_graph.cpp +++ b/src/tracks/quad_graph.cpp @@ -197,8 +197,12 @@ void QuadGraph::createDebugMesh() } // for i=1; iappend(new_v, (n-1)*4, ind, (n-1)*6); + // Instead of setting the bounding boxes, we could just disable culling, + // since the debug track should always be drawn. + //m_node->setAutomaticCulling(scene::EAC_OFF); + m_mesh_buffer->recalculateBoundingBox(); + m_mesh->setBoundingBox(m_mesh_buffer->getBoundingBox()); m_node = irr_driver->addMesh(m_mesh); - } // createDebugMesh // ----------------------------------------------------------------------------- diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index eea98eead..c74480cd2 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -596,8 +596,6 @@ void Track::loadDriveline() m_driveline_min = Vec3( 9999999.9f); m_driveline_max = Vec3(-9999999.9f); - - m_distance_from_start.reserve(DRIVELINE_SIZE); float d = 0.0f ; for ( size_t i = 0 ; i < DRIVELINE_SIZE ; ++i ) { @@ -609,7 +607,6 @@ void Track::loadDriveline() m_driveline_max.max(m_right_driveline[i]); m_driveline_max.max(m_left_driveline[i] ); - m_distance_from_start.push_back(d); // dfs[i] is not valid in windows here! d += (m_driveline[i]-m_driveline[ i==DRIVELINE_SIZE-1 ? 0 : i+1 ]).length(); } m_total_distance = d; diff --git a/src/tracks/track.hpp b/src/tracks/track.hpp index 6cb212cfa..882351ee4 100644 --- a/src/tracks/track.hpp +++ b/src/tracks/track.hpp @@ -127,8 +127,6 @@ public: //FIXME: should the driveline be set as a sgVec2? private: std::vector m_driveline; - std::vector m_distance_from_start; - std::vector m_path_width; //Left and Right drivelines for overhead map rendering. std::vector m_left_driveline; std::vector m_right_driveline;