feat(Tools/MMapsGenerator): Improve multithreading of mmaps_generator (#10963)
* cherry-pick commit (699edaa014)
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
parent
26c66e0d79
commit
769eea2cc0
5 changed files with 258 additions and 86 deletions
|
|
@ -328,7 +328,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
MapBuilder builder(maxAngle, maxAngleNotSteep, skipLiquid, skipContinents, skipJunkMaps,
|
||||
skipBattlegrounds, debugOutput, bigBaseUnit, mapnum, offMeshInputPath);
|
||||
skipBattlegrounds, debugOutput, bigBaseUnit, mapnum, offMeshInputPath, threads);
|
||||
|
||||
uint32 start = getMSTime();
|
||||
if (file)
|
||||
|
|
@ -336,9 +336,9 @@ int main(int argc, char** argv)
|
|||
else if (tileX > -1 && tileY > -1 && mapnum >= 0)
|
||||
builder.buildSingleTile(mapnum, tileX, tileY);
|
||||
else if (mapnum >= 0)
|
||||
builder.buildMap(uint32(mapnum));
|
||||
builder.buildMaps(uint32(mapnum));
|
||||
else
|
||||
builder.buildAllMaps(threads);
|
||||
builder.buildMaps({});
|
||||
|
||||
if (!silent)
|
||||
printf("Finished. MMAPS were built in %u ms!\n", GetMSTimeDiffToNow(start));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue