aboutsummaryrefslogtreecommitdiff
path: root/src/tools
AgeCommit message (Collapse)Author
2022-02-27Tool/MMAP: Fixed invalid check causing certain tiles not to build (#27833)robinsch
example: mmaps_generator 230 will cause tile 33, 29 to not build because of the check. causing NPCs to not have mmap information in some parts of the map. .go xyz 1380 -831 -88 230 has no mmap tile information because of above check. https://i.imgur.com/Pypeu4f.png
2022-01-01MMAP: Build ADT floor just like WMO floor below liquid (#27503)killerwife
Fixes ocean floor pathfinding
2021-12-17Tools/MMAPs: Show an error when running mmaps_generator built in Debug mode ↵Giacomo Pozzoni
(#27412) * Tools/MMAPs: Show an error when running mmaps_generator built in Debug mode * Fix GCC build
2021-09-17Tools/Mapextractor: Remove reading MWMO from mapextractorShauren
Ref #26537
2021-07-28Core/Misc: Remove whitespacejackpoz
2021-07-28Core/MMAPs: Reduce chances of breaking tile connectionsjackpoz
Reduce chances of breaking tile connections caused by floating point rounding issues.
2021-04-24Vmap: Introduce skipping of antiportals and unreachable mogp (#26331)killerwife
* Vmap: Introduce skipping of antiportals and unreachable mogp * Reduce differences with master branch * Update VMAP and MMAP versions * Update MMAPs version Co-authored-by: jackpoz <giacomopoz@gmail.com>
2021-04-04MapExtraction: Fix water height redundancy algorithm ignoring "no water" ↵killerwife
(#26324) * MapExtraction: Fix water height redundancy algorithm ignoring "no water" * Update MMAP_VERSION * Change map version Co-authored-by: jackpoz <giacomopoz@gmail.com>
2021-04-04Core/Maps: Change .map file version from FourCC to uint32 (#26326)Giacomo Pozzoni
2021-01-03Core: whitespace cleanup, reduce double blank line to single (#25795)Kargatum
* Core/Misc: fix double empty line * worldserver.conf
2020-12-06Improve multithreading of mmaps_generator (#25625)Giacomo Pozzoni
* Build/Misc: Add a few *San CMake flags Add the following flags for the related tools: - MSAN for Memory Sanitizer - UBSAN for Undefined Behavior Sanitizer - TSAN for Thread Sanitizer * Remove unused parameter * Fix UBSan reported issue * Disable G3D buffer pools when using Thread Sanitizer as it has its custom locking mechanisms * Code cleanup * Move threads from maps to tiles * Move tile building logic to TileBuilder class * Fix memory leak in TileBuilder * Fix build * Store TileBuilder as raw pointer for now, it will be changed later on to use modern C++ constructs * Fix crash on shutdown * Revert pvs-studio change * Fix generating 1 single tile not closing the program
2020-10-10Core/MMAPs: Restore single slope angle of 55°jackpoz
Re-generating MMAPs IS required. Partially reverts 995a443da219ec773febd7dd29d18f3cefaa1f3b . Having 2 different slope angles of 55° and 85° created too many polygons to fit in the current mmtile structure. This caused some polygons to become disconnected from each other, creating the old "invisible walls" effect. Because of this and because of the performance hit when loading a mmtile caused by the increase of polygon numbers, this commit reverts the recent changes and sets by default the slope angle to 55°. Feel free to restore the previous behaviour by running .\mmaps_generator --maxAngle 85 --maxAngleNotSteep 55 , specifying the map id as number if a single map should have different slope values. This is the last commit that will change MMAPs version to force re-generating them. Any future change that will affect only the generation settings will be optional (but recommended).
2020-10-04Tools/MMapsGenerator: Add some more input parameters to improve mmaps load ↵Giacomo Pozzoni
performances (#25520) * Some research about mmaps load performances * Tools/MMapsGenerator: Add some more input parameters Add some more input parameters which affect the resulting mmaps: - --smallOutputSize: sets both walkableSlopeAngle and walkableSlopeAngleNotSteep to 55°, reducing by a lot the .mmtile size and the number of polys. A rcFilterLedgeSpans() call is included too to filter out some polys. Default to false. - --maxAngle: Restore this parameter removed some commits ago. Specifies the max walkable angle of a Creature when in combat. Default to 85 - --maxAngleNotSteep: Max walkable angle of a Player and of a Creature out of combat. Must be less or equal than --maxAngle. Default to 55. A performance profiling comparison highlighted that .mmtile load grows exponential with the number of polys. A small server with GridUnload enabled and without preloading all grids on startup will be more affected than a big server with GridUnload disabled and preloading grids on startup.
2020-08-20Tools/VMapExtractor: Make Shauren happy, fmt::sprintf -> Trinity::StringFormatTreeston
2020-08-20Tools/VMapExtractor: Clean-up some patches of horrendously creaky code to ↵Treeston
make them slightly less creaky (and get rid of gcc warnings)
2020-08-07Core/CrashHandler: #ifdef cleanup to make VS not choke when parsing, fixed ↵Shauren
file being all red in editor
2020-08-04Core/Misc: Fix static analysis issues (#25194)Giacomo Pozzoni
2020-07-16Misc: Remove some unneeded/duplicated includes (#25051)Peter Keresztes Schmidt
2020-06-24fixed indentation for cmake filesipriver
2020-06-17Handle different slopes in mmaps (#24765)Giacomo Pozzoni
* Tools/MMAPs: Remove input argument --maxAngle Remove input argument --maxAngle . This should be just hardcoded in MapBuilder::GetMapSpecificConfig() so all settings are easily found in the same place instead of being spread around. * Tools/MMAPs: Add new area type NAV_AREA_GROUND_STEEP Add new area type NAV_AREA_GROUND_STEEP for ground with slope in the range (55, 70] . NAV_AREA_GROUND is used for ground with range [0, 55] . NAV_AREA_GROUND_STEEP takes priority over NAV_AREA_GROUND. * Tools/MMAPs: Fix NAV_GROUND_STEEP flag not being saved in the mmtile * Core/PathFinding: Implement NAV_GROUND_STEEP flag Implement NAV_GROUND_STEEP flag, used only by Creatures that are in combat or evading. * Distinguish between RC_WALKABLE_AREA and NAV_AREA_GROUND. * Allow mobs in combat to walk on steeps up to 80° * Allow mobs in combat to walk on steeps up to 85°. Disable rcFilterLedgeSpans() filter as it removed long steep spans. * Increase cost of steep spans to try making creatures walk around obstacles instead of walking on them * Revert last commit
2020-06-05Tools/MMAPs: Output the time spent in a human readable formatjackpoz
2020-05-31Cherry-pick some cmake commits (#24720)Giacomo Pozzoni
* Build system: Support new in cmake 3.17 Ninja Multi-Config generator (cherry picked from commit 369b618d4f160816818681ed7e41063e2d9ba5b5) * Build system: Fixed PCH with MSVC & Ninja generator (cherry picked from commit d669f46b6d5190dabc686a35656e8b03f5ec325b) * Core: Fix clang 10 warnings (cherry picked from commit 7272508cb4b51ec5591b6f0e542ea29091db7546) # Conflicts: # src/common/Utilities/Util.h # src/server/bnetserver/REST/LoginRESTService.cpp # src/server/game/Entities/Object/Position.h # src/server/game/Entities/Player/Player.cpp # src/server/game/Guilds/GuildFinderMgr.h # src/server/game/Movement/Spline/MoveSplineFlag.h # src/server/shared/Dynamic/LinkedList.h * Build system: Set -Wno-deprecated-copy only for clang 10 (cherry picked from commit 7fdeb259ba398d5d9343a5dcd1a89562dfcbe981) * Core/Misc: GCC build and warning fixes (cherry picked from commit 4d69cc1c567180b408ddbadb9edf26859cf4c006) # Conflicts: # src/common/Utilities/Util.cpp # src/server/database/Database/MySQLConnection.cpp # src/server/game/Battlefield/Zones/BattlefieldTB.cpp # src/server/game/DataStores/M2Stores.cpp # src/server/game/DungeonFinding/LFGMgr.cpp # src/server/game/DungeonFinding/LFGPlayerData.cpp # src/server/game/Entities/GameObject/GameObject.cpp # src/server/game/Entities/Item/Item.cpp # src/server/game/Entities/Object/Updates/UpdateFields.h # src/server/game/Entities/Player/Player.cpp # src/server/game/Entities/Player/RestMgr.cpp # src/server/game/Entities/Unit/Unit.cpp # src/server/game/Handlers/PetHandler.cpp # src/server/game/Server/Packets/GuildPackets.h # src/server/game/Spells/Auras/SpellAuraEffects.cpp # src/server/game/Spells/Auras/SpellAuras.cpp # src/server/game/Spells/Spell.cpp # src/server/game/Spells/SpellInfo.cpp # src/server/game/Spells/SpellMgr.cpp # src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp # src/server/scripts/Kalimdor/HallsOfOrigination/instance_halls_of_origination.cpp # src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp # src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp # src/server/scripts/Northrend/zone_sholazar_basin.cpp # src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp # src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp # src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp # src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp # src/tools/vmap4_extractor/gameobject_extract.cpp # src/tools/vmap4_extractor/model.cpp # src/tools/vmap4_extractor/vec3d.h * Build system: Print found git version when warning about it being too old (cherry picked from commit 1ae72db201189877c1b863fac140eb4b0a45c5bb) * Build system: Removed hard requirement on BOOST_ROOT being set as environment variable, it can now be also passed as command line argument to cmake and fix compile warning with boost 1.73 (cherry picked from commit 161944b7643c62f9e7705c64e42d42e5d07f1959) # Conflicts: # dep/boost/CMakeLists.txt * Remove some code that was already removed from 335 and then cherry-picked into master Co-authored-by: Shauren <shauren.trinity@gmail.com>
2020-05-15Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)Giacomo Pozzoni
* Core/MMAPs: Adjust walkable climb Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb. * Temporarily disable static collision (the whole check should be removed) * Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP * Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells) * Code refactor * Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH * Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors. * Remove whitespace * Revert 4a197ba22af4eed01be632ea2dd7d103a963f043 as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End * Cleanup PathGenerator raycast case * Fix PathGenerator raycast broken if start and end are on same poly. Fix PathGenerator raycast broken if no wall is hit. Remove unused case of using raycast with an existing previous path (can be added back properly if needed). Remove forcing poly length to 2 when we actually have already the right number. * Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast. Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead. * Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision) * Add far from poly flags * Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly * Fix blink close to walls with no valid polygon behind the wall * Require to re-extract mmaps Co-authored-by: Ovah <dreadkiller@gmx.de>
2020-03-20Core/Misc: Fix invalid utf-8 commentsShauren
2020-02-26Tools/MMaps: Fix strange paths in Blackfathom Deepsjackpoz
Increase the agent height by x2 to reduce the chance of having underground mmap layers wrongly picked by recast.
2020-02-14Core/Misc: Remove redundant null pointer checks before delete (#24140)Ujp8LfXBJ6wCPR
* Identified by clang-tidy readability-delete-null-pointer
2020-01-09Core/PathGenerator: Fix path generator returning shortcuts when start and ↵Giacomo Pozzoni
end are on the same polygon (#24036) * Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon Fix path generator returning shortcuts when start and end are on the same polygon by handling this case as if start and end were on 2 different polygons. This will ensure BuildPointPath() gets called which calls FindSmoothPath(), making sure each step is not longer than SMOOTH_PATH_STEP_SIZE (4 yards) * Change ingame cast error message to SPELL_FAILED_NOPATH from SPELL_FAILED_OUT_OF_RANGE if the generated path is too long
2020-01-02New yearAokromes
Say bye bye to every year changing dates
2019-08-18Tools/Misc: Document strange array access indexingShauren
Closes #23723
2019-02-23Tools build fixShauren
(cherry picked from commit 3c8210a1f3960e974a64da4ecc700819bc09e202)
2019-02-23Core/MMaps: Add rcMedianFilterWalkableArea() to mmaps generation processjackpoz
Add rcMedianFilterWalkableArea() to mmaps generation process to simplify some ground/water areas
2019-02-23Tools/mmaps_generator: Give land priority during area merges over liquidsShauren
Closes #21700 (cherry picked from commit edb2b16f546d18bb66f1527dddb6189f617ec1b3)
2019-02-23Tools/vmapextractor: Improved vmap detail level by extracting wmo doodads ↵Shauren
(tables, chairs etc) (cherry picked from commit fb0a1de5c1b96268ab4b4b383973699c81810724)
2019-02-23Tools/MMapsGenerator: Cleanup duplicated definitionsShauren
* rebuilding is not needed (cherry picked from commit 60c4c29da53da5bad7b40045d10478242d9ce764)
2019-02-23Warning fixShauren
(cherry picked from commit cfa948193c7fcdc8d2acacf7594fcb0a891516c3)
2019-02-23Tools:Shauren
* mapextractor - fixed compressing liquid data * vmapextractor - fixed extracting liquids inside WMOs * vmapextractor - implemented new WMO flags * vmapextractor - store model type for gameobject models * mmap_generator - fixed processing liquids broken in e5d23103f37c40d2e946fa0e2db66d2f527ad9af (cherry picked from commit 2c64bb97e6fddcbd15ef39fde3d0828bbf600ec6)
2019-02-23Tools/Mapextractor: Fixed determining deep waterShauren
(cherry picked from commit 2e648f9eb9a4f2079dce99e3f0c64f37d57a04a3)
2019-02-23Tools/Mapextractor: Implemented liquid object detectionShauren
(cherry picked from commit 82bf263f924144c7fb011acc8dcab3fe4d8c631b)
2019-02-23Tools/Misc: Partial cherry-pick of 7b235ce6e4da0e9c19fa9c6306bc7a71c7fb905dShauren
2019-02-23Tools/Misc: Partial cherry-pick of 457c93bc4b6e5015852a6b7f5d05262b2efbd24aShauren
2019-02-23Tools/Misc: Partial cherry-pick of fe4d11c65a512c61ccb924fbf3dc20c8cfc84dc7Shauren
2019-01-27Tools/MMaps: Allow to specify different Recast settings for different mapsjackpoz
Allow to specify different Recast settings for different maps, currently handled in GetMapSpecificConfig() as a switch statement. Set walkableRadius to 0 in Blade's Edge Arena (Map ID 562) so the pets can walk on the thin rope between the bridge and the pillar.
2019-01-26Dep/Recast: Update recastnavigation to ↵jackpoz
https://github.com/recastnavigation/recastnavigation/commit/14b2631527c4792e95b2c78ebfa8ac4cd3413363 Rebuilding mmaps IS required
2019-01-01Happy New Year, folks. It's 2019!Treeston
2018-01-01Update copyright note for 2018tkrokli
Best wishes for the new year.
2017-12-21Build: Inherit the features and warning flags privatelyNaios
(cherry picked from commit 12853475186569b2f47f1d69f817cbef8e590d83)
2017-11-25Misc: More cleanupAokromes
2017-11-22Merge pull request #20024 from Golrag/fix_collisionWarpten
Core/VMaps: Fix no collision triangles
2017-11-18Tools/MMaps: Improve MMaps qualityjackpoz
Lower Detail Sample Distance and Detail Sample Max Error to get more accurate MMap data, in particular mmap height. More info about Detail Mesh at http://digestingduck.blogspot.it/2009_07_01_archive.html and http://digestingduck.blogspot.it/2009_08_01_archive.html
2017-11-18Dep/Recast: Update recastnavigation to ↵jackpoz
https://github.com/recastnavigation/recastnavigation/commit/2c85309280dbc9c82029e7ab16dfb01b9235c74e