Implemented command line option "--dont-load-navmesh" to disable
loading of any navmeshes (to avoid extremly slow loading times in debug mode, e.g. for temple).
This commit is contained in:
@@ -717,6 +717,12 @@ int handleCmdLinePreliminary()
|
||||
if (CommandLine::has("--easter", &n))
|
||||
UserConfigParams::m_easter_ear_mode = n;
|
||||
|
||||
// Useful for debugging: the temple navmesh needs 12 minutes in debug
|
||||
// mode to compute the distance matrix!!
|
||||
if(CommandLine::has("--dont-load-navmesh"))
|
||||
Track::m_dont_load_navmesh = true;
|
||||
|
||||
|
||||
return 0;
|
||||
} // handleCmdLinePreliminary
|
||||
|
||||
@@ -752,7 +758,7 @@ int handleCmdLine()
|
||||
if(CommandLine::has("--ftl-debug"))
|
||||
UserConfigParams::m_ftl_debug = true;
|
||||
if(CommandLine::has("--slipstream-debug"))
|
||||
UserConfigParams::m_slipstream_debug=true;
|
||||
UserConfigParams::m_slipstream_debug = true;
|
||||
if(CommandLine::has("--rendering-debug"))
|
||||
UserConfigParams::m_rendering_debug=true;
|
||||
if(CommandLine::has("--ai-debug"))
|
||||
|
||||
@@ -82,7 +82,8 @@
|
||||
using namespace irr;
|
||||
|
||||
|
||||
const float Track::NOHIT = -99999.9f;
|
||||
const float Track::NOHIT = -99999.9f;
|
||||
bool Track::m_dont_load_navmesh = false;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
Track::Track(const std::string &filename)
|
||||
@@ -588,9 +589,9 @@ void Track::loadTrackInfo()
|
||||
delete easter;
|
||||
}
|
||||
|
||||
if(file_manager->fileExists(m_root+"navmesh.xml"))
|
||||
if(file_manager->fileExists(m_root+"navmesh.xml") && !m_dont_load_navmesh)
|
||||
m_has_navmesh = true;
|
||||
else if(m_is_arena || m_is_soccer)
|
||||
else if ( (m_is_arena || m_is_soccer) && !m_dont_load_navmesh)
|
||||
{
|
||||
Log::warn("Track", "NavMesh is not found for arena %s, "
|
||||
"disable AI for it.\n", m_name.c_str());
|
||||
|
||||
@@ -396,6 +396,11 @@ public:
|
||||
bool reverseAvailable() const { return m_reverse_available; }
|
||||
void handleAnimatedTextures(scene::ISceneNode *node, const XMLNode &xml);
|
||||
|
||||
/** Flag to avoid loading navmeshes (useful to speedup debugging: e.g.
|
||||
* the temple navmesh distance matric computation takes around 12
|
||||
* minutes(!) in debug mode to be computed. */
|
||||
static bool m_dont_load_navmesh;
|
||||
|
||||
static const float NOHIT;
|
||||
|
||||
Track (const std::string &filename);
|
||||
|
||||
Reference in New Issue
Block a user