57 Commits

Author SHA1 Message Date
Shauren
6a767c3bd6 Core/MMaps: Implemented dynamic mmap tile rebuilding for destructible objects 2025-11-06 19:42:17 +01:00
Shauren
157a16d790 Tools/vmap_extractor: Preserve destructible models to use them in mmaps_generator 2025-11-01 14:26:48 +01:00
Shauren
0b4f02c002 Core/Vmaps: Don't ignore gameobject model rotation when calculating liquid level 2025-10-31 13:49:07 +01:00
Shauren
03e2aa6737 Core/Vmaps: Rename VMapManager2 to VMapManager 2025-10-25 00:55:34 +02:00
Shauren
62aefda51d Core/GameObjects: Don't ignore collision for destructible gameobjects in destroyed state - they simply have a different model 2025-10-15 11:57:59 +02:00
Shauren
62dbb0619b Core/Vmaps: Minor cleanup (formatting) and documentation updates for BIH::build copy vs move choice 2024-12-11 19:44:03 +01:00
Shauren
53b4501ce9 Core/Vmaps: Don't ignore model rotation when calculating liquid level
Closes #30205
2024-11-28 17:08:56 +01:00
Shauren
b13b5142f1 Core/Utilities: Extend make_unique_ptr_with_deleter functionality to allow it to create deleters with compile time constant functions (reduces its size to just sizeof(void*)) 2024-10-01 21:03:44 +02:00
Shauren
b3763c338d Added missing GameObjectModel::iLosBlockingDisabled initialization in constructor 2024-07-17 10:30:09 +02:00
Shauren
2756ca1c35 Core/GameObject: Implemented NotLOSBlocking door property 2024-07-17 00:21:03 +02:00
Shauren
d05dbaaecb Core/Vmaps: Fixed use after free and deadlocks when loading a model file fails 2024-07-06 22:52:11 +02:00
Shauren
35a2d49971 Core/Vmaps: Optimize loading vmaps
* Changed spawn id to BIH tree index mapping from generated on load to baked in tile files
* Remove map holding model load counts and moved that to ModelInstance instead
2024-07-05 21:20:25 +02:00
Shauren
c8a55f4a18 Core/Vmaps: Minor cleanup in vmap4assembler - use unique_ptr to manage file handles 2024-07-05 13:09:00 +02:00
Shauren
ff4fc1ad4e Core/Vmaps: Replace manual reference counting with shared_ptr and slightly reduce memory use by deduplicating model name strings 2024-07-04 22:56:00 +02:00
Shauren
28c9474337 Core/vmaps: Improved WMO detection for group models that don't have floor 2024-03-25 12:18:37 +01:00
Shauren
45ee989c70 Core/vmaps: Removed vmap lookup functions duplicating functionality of each other 2024-03-07 00:23:52 +01:00
Shauren
a70e758ba5 Tools/vmap_extractor: Move information about model type from spawns in vmap tiles to model file itself 2024-03-06 00:04:19 +01:00
Shauren
1aa04cabe1 Tools/mmaps_generator: Added const on some functions interfacing with vmaps 2024-03-06 00:04:19 +01:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
ModoX
6ce6665992 Core/Vmaps: Fix inconsistency of hitInstance and hitModel to cause wrong area ids (#28632)
Closes #28326

Co-authored-by: Gosha <284210+Lordron@users.noreply.github.com>
2022-12-30 00:02:40 +01:00
Shauren
a2ec80b14c Core/vmaps: Stop worldserver startup when gameobject models cannot be loaded 2022-12-20 16:01:28 +01:00
Shauren
c13d26e1fa Core/GameObjects: Use all axis rotations for gameobject model collision, not just orientation 2022-05-22 14:53:05 +02:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Giacomo Pozzoni
99ee958e0a Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis

* Core/Vmaps: Code cleanup after e777161888

(cherry picked from commit cfc8f7b442)
2022-02-04 12:18:15 +01:00
Shauren
453b59de57 Core/Maps: Adjusted logic in GetFullTerrainStatusForPosition to closer match what the client does regarding being inside WMOs
Closes #21625
Closes #21624
Closes #21516

(cherry picked from commit b9c6bbb51d)
2021-09-25 01:04:21 +02:00
Shauren
e821693c16 Core/Vmaps: Reduce memory used by vmaps, part 2 2021-04-25 00:11:42 +02:00
Shauren
bb8f22ed20 Core/Vmaps: Reduce memory used by vmaps (and their size, slightly) 2021-04-25 00:11:36 +02:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston
51ce3b1c1d [3.3.5] Get zone/area IDs from vmap data in the liquid update (#19840)
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
* Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject
* Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields
* Clean up liquid state handling on Unit and Player
* Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.

Closes #16489

(cherry picked from commit f6c849729b)
2020-07-16 22:00:24 +02:00
Shauren
6040f8eb31 Core/Collision: Port new parts for retrieving area/liquid data from gameobjects added when porting 42f9deb21e to 3.3.5 2020-06-28 12:26:39 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
25594c5a8e Core/Misc: Fix static analysis issues
Fix static analysis issues reported by Coverity
2019-02-16 17:37:16 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
ariel-
0764ac47e0 Core/Collision: fix no-PCH build
(cherry-picked from 65b6202bd8)
2018-12-09 14:18:42 +01:00
HelloKitty
46c69df3a7 Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528

(cherry-picked from 01d715eaef)
2018-12-09 14:18:42 +01:00
Shauren
24d30dab84 Core/VMAPS: Fixed vmaps in single WMO instances like ragefire chasm
* Fixed some models not always being spawned because they only appear in one tile file but are large enough to cross tile boundaries (lava in Firelands at Ragnaros place)

Closes #21879
2018-04-27 20:23:52 +02:00
Shauren
dad56a224d Core/GameObjects: Skip gameobjects with M2 models when searching for area info (perf optimization, they dont have any area info) 2018-04-08 00:04:20 +02:00
Shauren
a71d4b70ff Add missing fclose 2018-04-07 22:20:30 +02:00
Shauren
2c64bb97e6 Tools:
* mapextractor - fixed fatigue in Thousand Needles
* 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
2018-04-07 21:56:19 +02:00
Shauren
b095c4cd30 Core/Misc: Removed obsolete NO_CORE_FUNCS 2018-04-02 20:05:08 +02:00
Gacko
bb0056bbe9 Fix non-PCH build. 2018-03-29 21:17:55 +02:00
Shauren
42f9deb21e Core/Maps: Implemented getting area id from gameobject spawns
Yes, you can now spawn LK platform anywhere and it will treat you as inside Icecrown Citadel
2018-03-28 22:01:22 +02:00
Shauren
4798d9ce7a Core/VMaps: Implement loading phased tiles
Closes #15163
2018-03-25 19:28:36 +03:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
joschiwald
dc43a08d36 Core/Misc: Fixed new-delete-type-mismatch issue reported by AddressSanitizer 2018-01-28 23:34:14 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
joschiwald
b68b7ecd9f Fixed warning 2017-05-05 21:32:20 +02:00
joschiwald
036f67c0c1 Core/Collision: Replaced phasemask with proper phases in GameObject collision calculation 2017-05-05 21:22:58 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00