Commit Graph

495 Commits

Author SHA1 Message Date
jackpoz
f53708fec1 Core/MMAPs: Restore single slope angle of 55°
Re-generating MMAPs IS required.
Partially reverts 995a443da2 .

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 369b618d4f)

* Build system: Fixed PCH with MSVC & Ninja generator

(cherry picked from commit d669f46b6d)

* Core: Fix clang 10 warnings

(cherry picked from commit 7272508cb4)

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

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

* 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 8c09b6e58b)
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
Ovahlord
6f5ac9d93c Core/Maps: fixed map hole format that was causing invalid height data being returned. Re-extracting maps is required. 2020-03-05 18:21:12 +01:00
jackpoz
004e39d88c 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-27 14:05:47 +01:00
Ovahlord
de74f05f90 Core/Vmaps: sync wmo related code with master branch 2020-02-27 14:02:13 +01:00
Giacomo Pozzoni
cad41332ba 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-02-20 21:29:46 +01:00
Aokromes
d6d3f06f06 New year 2020-01-04 18:32:38 +01:00
funjoker
6c56916b29 Misc: Update copyright information
Happy new year
2020-01-01 18:47:28 +01:00
Ovahlord
15f09fb82b Core/Misc: fixed warnings and building connection patcher with boost versions below 1.61 2019-11-06 00:51:04 +01:00
ModoX
ec40d87fe6 Tools/Patcher: tempfixed patching for Mac clients 2019-10-05 18:34:12 +02:00
Ovahlord
92d25a9f85 Tools/Patcher: added patterns and patches for Mac 2019-09-30 02:54:59 +02:00
Ovahlord
2084124420 Tools/Patcher: add Windows x64 patterns 2019-09-29 18:33:42 +02:00
Ovahlord
11b2f60586 Tools/Patcher: fixed x86 windows patterns and fixed patching battle.net dll file 2019-09-29 16:59:45 +02:00
Ovahlord
2ef48597a1 Tools/Patcher: backported module download 2019-09-29 07:58:51 +02:00
Ovahlord
cc180bbcbd Tools/Patcher: fixed some codestyle and keep the console open when a error happens 2019-09-29 02:38:57 +02:00
Shauren
3b3c6ca09d Tools: Added universal TrinityCore banner with git version info to all tools 2019-09-29 01:44:59 +02:00
Duarte Duarte
13c91911b3 Tools/ConnectionPatcher: Fix a typo when checking if moduleName dir exists 2019-09-29 01:41:14 +02:00
Shauren
7febdf4094 Tools/Patcher: Optimized loading binary file by patcher 2019-09-29 01:38:32 +02:00
Nayd
84e89ce9c8 Tools/ConnectionPatcher: Pause program when an error happens
Similar to what is done in mmaps_generator and vmap4_extractor.
This hopefully reduces the number of problems that Windows users have
when patching fails.
2019-09-29 01:33:46 +02:00
Bernd Lörwald
66101f2abc tools/connection_patcher: add executable permissions to binary to avoid the rare case where permissions of replaced file are ignored 2019-09-29 01:33:00 +02:00
Bernd Lörwald
67e81e9e11 Tools/ConnectionPatcher: allow to find pattern multiple times 2019-09-29 01:31:20 +02:00
Bernd Lörwald
4cd46a5786 Tools/ConnectionPatcher: fix: use patterns for mac on mac 2019-09-29 01:29:41 +02:00
Bernd Lörwald
ac75f9369d Tools/ConnectionPatcher: fix: don't try setting permissions for non-existing file when patching module 2019-09-29 01:28:23 +02:00
Bernd Lörwald
f62e49f3ef Tools/ConnectionPatcher: add documentation on what is patched 2019-09-29 01:27:33 +02:00
Ovahlord
178a60c440 Tools/Patcher: added missing files from 7a18cc2987 2019-09-29 01:24:53 +02:00
Shauren
40c865612a Tools/Patcher
* Client patcher no longer has to be ran from administrator level command line to successfully create bnet module
* Set patched bnet module as readonly to prevent wow from deleting it
2019-09-29 01:24:21 +02:00
Shauren
d1017e1c62 Tools/Patcher: Removed "Connection" patch and added rsa modulus patch 2019-09-29 01:19:26 +02:00
Bernd Lörwald
9db2b4d53f Tools/connection_patcher: use user readable characters for '.logon.battle.net' pattern 2019-09-29 01:08:04 +02:00
Shauren
6f0ff86f5f Tools/Patcher: Added pattern & patch for portal to all build configurations 2019-09-29 01:05:20 +02:00
bloerwald
b8464b993b Tools/connection_patcher: remove c# code, add c++ code with minor modification, move to tools, integrate into cmake
note: no longer downloads nonexistent modules
note: now throws on not finding patterns
new dependency: boost.filesystem
2019-09-29 00:47:38 +02:00
Ovahlord
b96f544f94 Tools/MMapsGenerator: merged a missing hole format change 2019-02-26 00:22:57 +01:00
Ovahlord
8acc08fcba Dep: merged RecastNavigation updates from 3.3.5 branch 2019-02-25 08:25:59 +01:00
Ovahlord
fe7bcac696 Core/Maps: ported all master branch changes for map extractor including height map extraction
* new maps, and mmaps are required
2019-02-25 07:37:47 +01:00
Ovahlord
1e4cc2293a Core/Datastores: use generated member names for MapEntry fields
* load all dbc fields of MapEntry
2019-02-24 00:14:44 +01:00
Ovahlord
36bd27e347 Core/Tools: reduced differences for extractors between master and 434 branch 2019-02-24 00:09:48 +01:00
Ovahlord
8374ed3b1a Tools/VmapExtractor: codestyle cleanup for reading map dbc files 2019-01-21 11:41:06 +01:00
Ovahlord
d7c3969af7 Tools/Extracors: cleanup for vmap extractors to reduce differences between 434 and master branch 2019-01-21 11:07:29 +01:00