Commit Graph

265 Commits

Author SHA1 Message Date
Shauren
21e7ffe1b7 Core/Misc: Fix windows nopch build
Closes #25363
2021-09-01 20:33:48 +02:00
Ovahlord
ce1901524f Tools/VMapExtrator: ported m2 model bounds issue fix from master branch 2021-08-28 14:39:19 +02:00
Shauren
659cb0992f Core/Vmaps: Fixed crash in unloading vmaps
Closes #26536
2021-05-22 10:24:47 +02:00
Ovahlord
7a1ce34333 fixed a warning 2021-04-25 09:50:48 +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
3cc50b98a6 CI/CircleCI: Expose binaries built on Circle CI as docker images in the Circle CI artifacts 2021-03-11 10:53:51 +01:00
Shauren
b9c72c3c7f Dep/Boost: Support for boost 1.74 2021-03-11 10:37:55 +01:00
Shauren
fbffbbbe14 Dep: Switch to boost process instead of old standalone version 2021-02-19 15:21:15 +01:00
Ovahlord
0299fa4fe1 Core/Misc: replace boost::optional with std::optional 2021-02-19 14:07:43 +01:00
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
6a8ecc3ee3 Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888
# Conflicts:
#	src/common/Collision/DynamicTree.cpp
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/World/World.cpp
2020-08-29 13:49:21 +02:00
Warpten
2b2fc5fb8a Core/Spells: remove PrepareSpellScript and PrepareAuraScript macros and make Hooklist use emplace behaivior (#174) 2020-08-28 15:40:26 +02:00
Shauren
476ce2107d Core/Networking: Initialize MPSCQueueIntrusive dummy node without undefined behavior 2020-08-23 17:48:16 +02:00
Shauren
a24e11cdd3 Core/Networking: Switch to intrusive variant of MPSC queue to halve the number of memory allocations for packet sending (#24659)
# Conflicts:
#	src/server/game/Server/WorldSocket.h
2020-08-23 17:47:57 +02:00
Shauren
1a7f437b6d Core/Util: Added another template utility - find_type_if
* Trinity::find_type_if - Find a type matching predicate in a given template parameter pack
2020-08-23 17:42:19 +02:00
Shauren
4362a1fff1 Core/Util: Added new utilities
* Trinity::new_from_tuple - same as std::make_from_tuple except allocates object using "new"
* Trinity::is_tuple - detects whether given type is a tuple specialization
* advstd::type_identity - C++20 std::type_identity

# Conflicts:
#	src/common/Utilities/Tuples.h
2020-08-23 17:42:08 +02:00
Ovahlord
eb2559ae80 fixed build 2020-08-06 13:48:02 +02:00
Ovahlord
d45d4ed0de Core/Misc: apply missile canceling codestyle changes based on master branch feedback 2020-08-06 13:38:28 +02:00
Ovahlord
f42d242996 Core/Spells: implement and enable SMSG_MISSILE_CANCEL and use it in Murozond encounter 2020-08-04 16:53:59 +02:00
ariel-
e4ba06c828 Core/Utils: restored previous behaviour of RandomResize 2020-07-24 10:31:01 +02:00
Ovahlord
aec1d1a2fa Misc: fixed build 2020-07-23 17:00:54 +02:00
Treeston
d5816cc224 nopch fix 2020-07-22 17:18:37 +02:00
Treeston
544b6a3381 Misc: assert -> ASSERT
# Conflicts:
#	src/common/DataStores/DBCFileLoader.h
#	src/server/scripts/Commands/cs_debug.cpp
2020-07-22 17:16:21 +02:00
Shauren
db5a6d2738 Nopch fix 2 2020-07-22 13:46:16 +02:00
Treeston
ec04d3b2cd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
Giacomo Pozzoni
52d9bb2538 Core/Threads: Replace Boost TLS with C++11 one (#15782)
* Core/Threads: Replace Boost TLS with C++11 one

Replace boost::thread_specific_ptr<T> thread-local storage with C++11 thread_local to remove libboost_thread dependency from common project

* Fix no-pch build
2020-07-18 22:48:03 +02:00
Peter Keresztes Schmidt
a06e5d7d40 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs 2020-07-18 22:43:24 +02:00
Ovahlord
d46fb93657 Core/Pools: ported pooling updates from 335 branch 2020-07-13 11:17:19 +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
jackpoz
cb6611b048 Core/MMAPs: Fix small steps being considered as NAV_AREA_GROUND_STEEP 2020-06-26 21:27:04 +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
funjoker
a70b9d3be8 Misc: Fix nopch build 2020-06-11 20:34:03 +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
Shauren
40f80fc0ed Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-06-11 01:35:27 +02:00
Warpten
0af44ccc01 Core/Spells: implement DoT clipping
* Core/Spells: Implementation of DoT clipping.
* Core/Utilities: Backport "EnumFlags v3.0" from master.
* Core/Spells: Switch AURA_REMOVE_MODE to a flag set.
2020-06-04 18:16:03 +02:00
Warpten
3994e2a183 Core/Errors: Fix a bad formatting call. (#115) 2020-06-02 20:01:30 +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
Shauren
ca881f7e3f Core/DBLayer: Implement async transaction completion callbacks 2020-04-15 21:41:14 +02:00
Ovahlord
2a9fc25269 Core/Misc: fixed more no pch errors 2020-03-11 13:42:42 +01:00
Ovahlord
5db48393bc Core/Collision: improved codestyle accross the board 2020-03-05 18:20:41 +01:00
Ovahlord
d9b854ad59 Core/Datastores: backported hotfix system implementation 2020-02-21 23:13:38 +01:00
Ghaster
df173c7e1c Core/Bnet: Cleanup/Improve Battle.net account commands (#33) 2020-02-19 02:52:11 +01:00
jackpoz
6eb44dff00 Core/Misc: Fix clang 6.0 warnings
Ported from e9bcae1fad
2020-01-31 21:41:33 +01:00
jackpoz
183789053e Core/Misc: Fix GCC 8 warnings 2020-01-31 21:19:25 +01:00
jackpoz
8714c2be57 Core/Utils: Handle UTF-8 conversion errors
Replace the output string when a UTF-8 conversion error happen with an error message instead of using an empty string, swallowing any message that the caller wanted to log.
2020-01-31 20:51:51 +01:00
Treeston
cd3fa07389 Core/Utils: some code style adjustments, 6d6077e follow-up 2020-01-31 20:50:06 +01:00
Treeston
3ab2d9575e Core/Utils: Fix Unicode handling 2020-01-31 20:49:10 +01:00