Commit Graph

314 Commits

Author SHA1 Message Date
jackpoz
6e34e07c48 Tools/MMAPs: Output the time spent in a human readable format 2020-06-05 19:58:02 +02:00
Giacomo Pozzoni
8c09b6e58b Cherry-pick some cmake commits (#24720)
* Build system: Support  new in cmake 3.17 Ninja Multi-Config generator

(cherry picked from commit 369b618d4f)

* Build system: Fixed PCH with MSVC & Ninja generator

(cherry picked from commit d669f46b6d)

* Core: Fix clang 10 warnings

(cherry picked from commit 7272508cb4)

# 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 7fdeb259ba)

* Core/Misc: GCC build and warning fixes

(cherry picked from commit 4d69cc1c56)

# 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 1ae72db201)

* 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 161944b764)

# 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-31 14:17:26 +02:00
Giacomo Pozzoni
c0b75bf40d Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)
* 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 4a197ba22a 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-05-15 20:43:12 +02:00
Shauren
6259763469 Core/Misc: Fix invalid utf-8 comments 2020-03-20 21:53:20 +01:00
jackpoz
3b0a89a2ea Tools/MMaps: Fix strange paths in Blackfathom Deeps
Increase the agent height by x2 to reduce the chance of having underground mmap layers wrongly picked by recast.
2020-02-26 21:06:39 +01:00
Ujp8LfXBJ6wCPR
9264e5b6f0 Core/Misc: Remove redundant null pointer checks before delete (#24140)
* Identified by clang-tidy readability-delete-null-pointer
2020-02-14 12:45:34 +01:00
Giacomo Pozzoni
29bf280e34 Core/PathGenerator: Fix path generator returning shortcuts when start and 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-09 19:38:45 +01:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Shauren
aa0d468e04 Tools/Misc: Document strange array access indexing
Closes #23723
2019-08-18 12:40:38 +02:00
Shauren
f912963b4b Tools build fix
(cherry picked from commit 3c8210a1f3)
2019-02-23 22:00:05 +01:00
jackpoz
7ddbc18aaf Core/MMaps: Add rcMedianFilterWalkableArea() to mmaps generation process
Add rcMedianFilterWalkableArea() to mmaps generation process to simplify some ground/water areas
2019-02-23 22:00:05 +01:00
Shauren
7b561373a8 Tools/mmaps_generator: Give land priority during area merges over liquids
Closes #21700

(cherry picked from commit edb2b16f54)
2019-02-23 22:00:05 +01:00
Shauren
8d19fcbc46 Tools/vmapextractor: Improved vmap detail level by extracting wmo doodads (tables, chairs etc)
(cherry picked from commit fb0a1de5c1)
2019-02-23 22:00:05 +01:00
Shauren
0e083a0356 Tools/MMapsGenerator: Cleanup duplicated definitions
* rebuilding is not needed

(cherry picked from commit 60c4c29da5)
2019-02-23 22:00:05 +01:00
Shauren
ecab7db7b0 Warning fix
(cherry picked from commit cfa948193c)
2019-02-23 22:00:05 +01:00
Shauren
8d1bb258fc Tools:
* 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 e5d23103f3

(cherry picked from commit 2c64bb97e6)
2019-02-23 22:00:05 +01:00
Shauren
fd30618f12 Tools/Mapextractor: Fixed determining deep water
(cherry picked from commit 2e648f9eb9)
2019-02-23 22:00:05 +01:00
Shauren
e6bfa71e4d Tools/Mapextractor: Implemented liquid object detection
(cherry picked from commit 82bf263f92)
2019-02-23 22:00:04 +01:00
Shauren
fee666f02f Tools/Misc: Partial cherry-pick of 7b235ce6e4 2019-02-23 22:00:04 +01:00
Shauren
98949b75ed Tools/Misc: Partial cherry-pick of 457c93bc4b 2019-02-23 22:00:04 +01:00
Shauren
2924283f07 Tools/Misc: Partial cherry-pick of fe4d11c65a 2019-02-23 22:00:04 +01:00
jackpoz
e4658a1307 Tools/MMaps: Allow to specify different Recast settings for different maps
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-27 15:20:38 +01:00
jackpoz
5ff88ea04a Dep/Recast: Update recastnavigation to 14b2631527
Rebuilding mmaps IS required
2019-01-26 20:44:27 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Naios
85e460802d Build: Inherit the features and warning flags privately
(cherry picked from commit 1285347518)
2017-12-21 23:31:11 +01:00
Aokromes
59e94fd9bb Misc: More cleanup 2017-11-25 02:39:27 +01:00
Warpten
9614f9d8cf Merge pull request #20024 from Golrag/fix_collision
Core/VMaps: Fix no collision triangles
2017-11-22 15:16:36 +01:00
jackpoz
f8fd0b7a2c Tools/MMaps: Improve MMaps quality
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-18 20:31:22 +01:00
jackpoz
7ef22e4305 Dep/Recast: Update recastnavigation to 2c85309280 2017-11-18 20:29:25 +01:00
jackpoz
64ca471734 Tools/VMaps: Fix build issue on VS2017 2017-11-18 20:28:02 +01:00
Rochet2
0a3e2339ef Tools/MMapsGenerator: Use system supported threads instead of hardcoded amount (#19255)
- Use unsigned int for thread count
- Use std::thread::hardware_concurrency() to try estimate available threads instead of hardcoded 3 threads by default
- Print thread count always regardless of using --threads switch or not
2017-08-08 22:52:55 +02:00
ariel-
f0357a861d Core/Tools: fix whitespace 2017-07-19 12:40:01 -03:00
keke222
15f6a02b72 Tools: Automatically create directories for tools (#17971) 2017-07-17 10:18:35 +02:00
Golrag
89d641f1e6 Core/VMaps: Fix no collision triangles 2017-07-14 18:00:51 +02:00
Rochet2
b9f276f0a0 Tools/MMapsGenerator: Get all tiles in beginning and calulate proper total tile count (#20013) 2017-07-13 17:31:24 +02:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Golrag
c35793941b Core/VMaps: Fix LoS in Strand of the Ancients (#19847)
Core/Collision: Fixed MOPY chunk flags enum.

Also avoid loading destructible WMOs into vmaps.

VMap re-extraction is required.

Closes #15798.
2017-06-05 16:32:35 -05:00
jackpoz
8f2bcd79da Core/Misc: Fix static analysis issues 2017-02-25 17:07:22 +01:00
Shauren
29937aaa75 Tools/mmaps_generator: Mak percentage progress slightly more accurate
#18832
2017-01-14 15:16:04 +01:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
zori
0df0cb30ca Correct Nav type for WMO objects (#18364)
* Tools/MMaps: Correct liquid type for WMO objects

* MMaps: Update version to 6
2016-12-03 17:48:55 +01:00
ariel-
881cd78ae3 Core/Map: missing file change in last commit 2016-12-02 20:19:04 -03:00
Mikhail Redko
3d7a86bf1e Tools/VMAPs: Fix extractor crash when some .mpq files does not exist (#18130) 2016-10-23 22:44:07 +02:00
Eilo
0a53d0b1fa Tools/mmaps_generator: Added estimated percentage progress to console output (#17798) 2016-08-21 11:44:22 +02:00
jackpoz
1d7013e0e2 Core/MMAPs: Update recast
Update recast to 64385e9ed0
2016-08-17 22:00:35 +02:00
jackpoz
2585c62e6f Tools/MMapGenerator: Avoid saving uninitialized padding bytes to disk
Initialize padding bytes in MmapTileHeader struct to avoid saving uninitialized data to disk, causing issues when binary-comparing *.mmtile files.
2016-08-17 15:07:02 +02:00
r00ty-tc
de918a0f64 Core/Maps - Improvements to Cinematic function
- Moves to own class for reading, storage and player subclass
 - Proper destruction handling for player (ensure cinematic is ended)
 - Timeout for cinematic if it reaches past the end without completing
 - boost::filesystem::path used for path/filename transform
 - Correct for assert trigger under certain circumstances
 - Other changes previously suggested
2016-05-11 11:56:25 +02:00
r00ty-tc
87b4533046 [Core/Maps] Activate creatures and objects during opening cinematics and other flyby
cameras (sunwell etc).

Requires re-running map extractor to extract camera m2 files from data
files. These are very small.

Closes #4755
Closes #16772
2016-04-14 01:34:17 +02:00
Naios
abda7a910a CMake: Use inherited dependencies in common and tools 2016-03-18 02:52:57 +01:00