Changed: #964 Allow disabling of consistency check in rbank build tool, because it's immensely slow.

This commit is contained in:
kaetemi 2010-06-07 07:36:00 +02:00
parent d97fbb4340
commit 86413711f6
3 changed files with 35 additions and 25 deletions

View file

@ -1614,21 +1614,23 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
sint lsurf = cborder.Left;
sint rsurf = cborder.Right;
if (lsurf >= 0)
if (CheckConsistency)
{
CComputableSurface& surf = Surfaces[lsurf];
if (!surf.checkConsistency())
if (lsurf >= 0)
{
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, lsurf);
CComputableSurface& surf = Surfaces[lsurf];
if (!surf.checkConsistency())
{
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, lsurf);
}
}
}
if (rsurf >= 0)
{
CComputableSurface& surf = Surfaces[rsurf];
if (!surf.checkConsistency())
if (rsurf >= 0)
{
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, rsurf);
CComputableSurface& surf = Surfaces[rsurf];
if (!surf.checkConsistency())
{
nlwarning("Before smooth of border '%d', surface '%d' not consistent", border, rsurf);
}
}
}
@ -1643,21 +1645,23 @@ void NLPACS::CZoneTessellation::generateBorders(float smooth)
totalBefore += before;
totalAfter += after;
if (lsurf >= 0)
if (CheckConsistency)
{
CComputableSurface& surf = Surfaces[lsurf];
if (!surf.checkConsistency())
if (lsurf >= 0)
{
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, lsurf);
CComputableSurface& surf = Surfaces[lsurf];
if (!surf.checkConsistency())
{
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, lsurf);
}
}
}
if (rsurf >= 0)
{
CComputableSurface& surf = Surfaces[rsurf];
if (!surf.checkConsistency())
if (rsurf >= 0)
{
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, rsurf);
CComputableSurface& surf = Surfaces[rsurf];
if (!surf.checkConsistency())
{
nlwarning("After smooth of border '%d', surface '%d' not consistent", border, rsurf);
}
}
}
}

View file

@ -77,6 +77,7 @@ extern std::string GlobalUL;
extern std::string GlobalDR;
extern bool ProcessGlobal;
extern bool Verbose;
extern bool CheckConsistency;
extern CPrimChecker PrimChecker;
@ -392,7 +393,8 @@ public:
template<class A>
void floodFill(CSurfElement *first, sint32 surfId, const A &cmp, CZoneTessellation *zoneTessel)
{
nldebug("flood fill surface %d", surfId);
if (Verbose)
nldebug("flood fill surface %d", surfId);
std::vector<CSurfElement *> stack;
sint i;
@ -433,7 +435,8 @@ public:
}
}
nldebug("%d elements added", Elements.size());
if (Verbose)
nldebug("%d elements added", Elements.size());
Center = NLMISC::CVector::Null;
for (i=0; i<(sint)Elements.size(); ++i)

View file

@ -86,6 +86,7 @@ string LevelDesignWorldPath;
string IgLandPath;
string IgVillagePath;
bool Verbose = false;
bool CheckConsistency = true;
CPrimChecker PrimChecker;
@ -187,6 +188,8 @@ void initMoulinette()
WaterThreshold = getFloat(cf, "WaterThreshold", 1.0);
CheckConsistency = getBool(cf, "CheckConsistency", true);
//if (TessellateZones || MoulineZones)
{
ZoneExt = getString(cf, "ZoneExt", ".zonew");