Commit Graph
530 Commits
Author SHA1 Message Date
funjoker e4a33bd4df Tools/Launcher: do not close console when launched with --console 2023-10-13 14:03:41 +02:00
Ovahlord a2658b436c buildfix 2023-10-10 12:20:03 +02:00
Ovahlord a1e5045fa6 buildfix 2023-10-10 11:42:38 +02:00
Ovahlord 17f5be5a63 pch buildfix for tools 2023-10-10 03:38:00 +02:00
Ovahlord 5c13baf230 Core/Misc: removed unused includes and removed unit include from vehicle.h 2023-10-10 03:01:05 +02:00
Ovahlord b49f95e1e9 Build: added support for unity builds in most projects except for StormLib, ZLib and Scripts 2023-10-09 21:40:38 +02:00
funjoker 9d6a808ba6 Tools/Launcher: Add launcher as alternative to patcher (#409)
* Tools/Launcher: Introduce version 1 of the client launcher/patcher

the launcher downloads all needed modules and patches the needed one

the launcher patches the RSA key in memory before WoW window opens

the launcher injects the client_patcher_xx.dll inside Wow

the client_patcher_xx.dll hooks LoadLibraryW and awaits Battle.net.dll load

the client_patcher_xx.dll patches the Battle.net.dll memory before it is returned to process

client_patcher_xx.dll unhooks itself

* Tools/Launcher: MinHook only for tools and on windows
2023-07-30 18:39:03 +02:00
Ovahlord e7e4c79ef1 Tools:VMapExtractor: converted filenames and paths to strings 2023-07-08 21:11:02 +02:00
Ovahlord 3cfee9d3d0 Tools/MapExtractor: converted filenames and paths to strings 2023-07-08 20:42:55 +02:00
Ovahlord 328dff8d77 Tools/ConnectionPatcher: remove unreferenced variable for commonAppData is only being used by windows binaries 2023-07-08 14:47:25 +02:00
Daniel S. Reichenbach a7527a8698 Core/Misc: added support for OpenSSL 3, dropped support for OpenSSL 1.0 and fixed build for Fixed build for MariaDB 2023-07-07 21:01:49 +02:00
Ovahlord f34534465a Build: enable C++20 and updated all compiler requirements
* ported some header and cmake updates from master branch
2023-07-04 23:49:57 +02:00
ipriver 408c386830 fixed indentation for cmake files
(cherry picked from commit a46d047f9466c6f16597755bb7c771a9d1a147f2)
(cherry picked from commit bde36062b7a0bf621086e73a5d419cd8637e9e96)
2023-05-19 22:26:00 +02:00
Ovahlord 1528eda26e Tools/VMaps Extractor: reduce difference between branches 2022-10-20 22:17:02 +02:00
Shauren 0ba58aeb6e Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c648
2022-10-08 00:25:32 +02:00
Shauren 21e9854686 Core/Maps & Extractors: Move copypasted map file headers into a single shared file and replace #defines with enums 2022-10-07 22:16:46 +02:00
Shauren 8c447da29d Core/Misc: Rename MapDefines.h to MMapDefines.h as it contains mmap defines exclusively 2022-10-07 19:09:42 +02:00
Shauren 16f699b049 Tools/mmaps_generator: Fixed loading db2 stores on linux
* Author @rapsys

Closes #21898

# Conflicts:
#	src/tools/mmaps_generator/PathCommon.h
2022-07-05 20:02:29 +02:00
robinsch ae97821c78 Tool/MMAP: Fixed invalid check causing certain tiles not to build (#27833)
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
# Conflicts:
#	src/tools/mmaps_generator/MapBuilder.cpp
2022-03-04 14:43:21 +01:00
funjoker 429584e5b8 Tools/Patcher: no hardcoded jump 2022-02-20 23:34:01 +01:00
funjoker 10e7828dbc Tools/Patcher: Fix incorrect Mac64 pattern and patches 2022-02-20 22:06:22 +01:00
Ovahlord 6a43cd1691 Tools/MMapsExtrator: ported multi-threading updates from master branch
closes #204
2022-01-04 22:50:02 +01:00
Shauren 171e6adf19 Tools/mmaps_generator: Made loading vmaps by mmaps_generator threadsafe 2022-01-04 22:18:43 +01:00
killerwife 0eaea1109e MMAP: Build ADT floor just like WMO floor below liquid (#27503)
Fixes ocean floor pathfinding
2022-01-01 16:43:25 +01:00
Tom Dymel dbff9a4060 Patch authentication modules under linux in the wine ProgramData path (#286)
* Patch authentication modules under linux in the wine ProgramData path

* Use posix compliant OS flags

* Use the correct pattern for x64

* Coalesce win32 specific lines of code
2021-10-05 21:46:03 +02:00
jackpoz 5d9b3b59d2 Core/Misc: Remove whitespace 2021-07-29 17:32:15 +02:00
jackpoz d53a176746 Core/MMAPs: Reduce chances of breaking tile connections
Reduce chances of breaking tile connections caused by floating point rounding issues.
2021-07-29 17:32:05 +02:00
Shauren 0cfbb218ce Core/Vmaps: Extract more doodad sets 2021-04-25 08:57:31 +02:00
Shauren a7089f5b26 Core/Vmaps: Reduce memory used by vmaps, part 2 2021-04-25 07:29:08 +02:00
Shauren e86ae8987b Core/Vmaps: Reduce memory used by vmaps (and their size, slightly) 2021-04-25 07:27:37 +02:00
killerwife d4b90631fe Tools/Map Extractor: Fix water height redundancy algorithm ignoring "no water" 2021-04-05 13:41:44 +02:00
Giacomo Pozzoni 490188de76 Core/Maps: Change .map file version from FourCC to uint32 2021-04-05 12:17:12 +02:00
killerwife 4ffac2516b Tools/vmap extractor: Skip unreachable WMO groups 2021-03-31 10:30:14 +02:00
Ovahlord 090afe38fa Tools/VmapExtractor: fixed a typo that was causing many WMOs being falsely skipped 2021-03-29 21:40:29 +02:00
Shauren 9f2eb5912b Tools/vmap extractor: Skip antiportal WMO groups 2021-03-29 21:12:35 +02:00
jackpoz f53708fec1 Core/MMAPs: Restore single slope angle of 55°
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).

# Conflicts:
#	src/tools/mmaps_generator/PathGenerator.cpp
2020-10-16 15:56:05 +02:00
Giacomo Pozzoni 1de869764d Tools/MMapsGenerator: Add some more input parameters to improve mmaps load 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.
# Conflicts:
#	src/tools/mmaps_generator/PathGenerator.cpp
2020-10-16 15:50:59 +02:00
Ovahlord e1d74d4dc6 Core/Misc: added more fallthrough attributes and added some missing breaks reported by CI 2020-07-19 12:24:58 +02:00
Ovahlord 8bd127f64b Tools: MMapsGenerator: fixed selecting the correct dbc directories when loading maps and liquids
closes #132
2020-07-08 22:26:22 +02:00
Ovahlord 73a15edd28 Tools/MapExtractor: remove unused argument from camera extraction function 2020-07-07 10:42:48 +02:00
Ovahlord d077c92011 Core/Datastores: ported locale related datastore updates in order to load storage locales properly when set in config 2020-07-07 02:39:07 +02:00
Shauren 0f3590ebb4 Core/Maps: Added optional *.tilelist file to map_extractor output which contains a list of existing tiles to speed up map creation in worldserver 2020-07-06 17:45:53 +02:00
jackpoz 6622a94384 Tools/MMAPs: Output the time spent in a human readable format
# Conflicts:
#	src/tools/mmaps_generator/PathGenerator.cpp
2020-06-22 11:34:55 +02:00
Giacomo Pozzoni 85532de2e9 Handle different slopes in mmaps (#24765)
* 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
# Conflicts:
#	src/server/game/Movement/PathGenerator.cpp
2020-06-18 02:16:11 +02:00
Ghaster d71bc0c0a8 Tools/mmaps_generator: Fixed brackets (#125) 2020-06-14 17:22:45 +02:00
funjoker 187d537fba Core/Misc: (try) Make Clang 10 happy 2020-06-11 21:12:34 +02:00
Giacomo Pozzoni 9fdf598792 Cherry-pick some cmake commits (#24720)
* 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)

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

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

* Remove some code that was already removed from 335 and then cherry-picked into master

Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 8c09b6e58b0e4f33b7a8e376a28709e693cf2914)
2020-06-11 20:24:00 +02:00
Giacomo Pozzoni e3bab35d5e 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>
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
2020-05-16 13:45:57 +02:00
Ovahlord d377b7c705 Tools/VMapExtractor: removed a unneeded output 2020-03-05 20:22:45 +01:00
Ovahlord d4ede67e1b Tools/MMaps: corrected hole format for terrain builder 2020-03-05 19:40:46 +01:00