Two bugs in loadPatchArchives():
1. isLetterPatch detection was inverted (rfind != 0 is false for all
"patch-*" entries), making the disable flags non-functional
2. Patch file lookup used exact std::filesystem::exists() which is
case-sensitive on Linux — Patch-A.MPQ wouldn't match patch-a.mpq
Now scans the data directory once and builds a case-insensitive lookup
map, so any case variant (Patch-A.MPQ, patch-a.mpq, PATCH-A.MPQ) is
found correctly.
logoutToLogin() was only clearing a handful of flags, leaving stale
entity instance maps, pending spawn queues, transport state, mount
state, and charge state from the previous session. On second login,
these stale GUIDs and instance IDs caused invalid renderer operations
and crashes.
Now clears: creature/player/gameObject instance maps, all pending
spawn queues, transport doodad batches, mount/charge state, player
identity, and renderer world geometry (WMO instances, M2 models,
quest markers). Also disconnects TransportManager from WMORenderer
before teardown to prevent dangling pointer access.
Camera collision with WMO walls and M2 doodads caused erratic zoom
and pull-through at doorway transitions. Terrain-only camera floor
clamping is retained.
- Add build.ps1/bat, rebuild.ps1/bat, debug_texture.ps1/bat (Windows equivalents
of existing bash scripts, using directory junctions for Data link)
- Fix asset extractor: StormLib is not thread-safe even with separate handles per
thread. Serialize all MPQ reads behind a mutex while keeping CRC computation and
disk writes parallel. Previously caused 99.8% extraction failures with >1 thread.
- Add SFileHasFile() check during enumeration to skip listfile-only entries
- Add diagnostic logging for extraction failures (first 5 per thread + summary)
- Use std::filesystem::temp_directory_path() instead of hardcoded /tmp/ in
character_renderer.cpp debug dumps
- Update debug_texture.sh to use $TMPDIR fallback and glob for actual dump filenames
Recreate Vulkan swapchain in LoadingScreen::render() when the dirty flag
is set, so resizing the window during world loading no longer renders
into a stale swapchain with mismatched framebuffers.
- Windows: SetThreadAffinityMask to pin main thread to core 0 and
exclude workers from core 0
- macOS: thread_policy_set with THREAD_AFFINITY_POLICY tags to hint
scheduler separation (tag 1 for main, tag 2 for workers)
Water deduplication: merge per-chunk water surfaces into per-tile surfaces
to reduce Vulkan descriptor set usage from ~8900 to ~100-200. Uses hybrid
approach — groups with ≤4 chunks stay per-chunk (preserving shore detail),
larger groups merge into 128×128 tile-wide surfaces.
Re-add incremental tile finalization state machine (reverted in 9b90ab0)
to spread GPU uploads across frames and prevent city stuttering.
Pin main thread to CPU core 0 and exclude worker threads from core 0
to reduce scheduling jitter on the render/game loop.
StormLib's bundled libtomcrypt uses x86 inline assembly (bswapl/movl)
gated by __MINGW32__, which is defined on CLANGARM64 too. Pass
-DLTC_NO_BSWAP to force portable C byte-swap fallback.
The incremental advanceFinalization state machine broke water rendering
in ways that couldn't be resolved. Reverted to the original monolithic
finalizeTile approach. The other performance optimizations (bone SSBO
pre-allocation, WMO distance culling, M2 adaptive distance tiers)
are kept.
Phase-splitting across frames caused water surfaces to not render
correctly. Changed processReadyTiles to run all phases for each tile
before moving to the next, with time budget checked between tiles.
Replace monolithic finalizeTile() with a phased state machine that spreads
GPU upload work across multiple frames (TERRAIN→M2→WMO→WATER→AMBIENT→DONE).
Each advanceFinalization() call does one bounded unit of work within the
per-frame time budget, eliminating 50-300ms frame hitches when entering cities.
Additional performance improvements:
- Pre-allocate bone SSBOs at M2 instance creation instead of lazily during
first render frame, preventing hitches when many skinned characters appear
- Enable WMO distance culling (800 units) with active-group exemption so
the player's current floor/neighbors are never culled
- Add 4-tier adaptive M2 render distance (250/400/600/1000 based on count)
- Remove dead PendingM2Upload queue code superseded by incremental system
Fix tile re-enqueueing bug: keep tiles in pendingTiles until committed to
loadedTiles (not when moved to finalizingTiles_) so streamTiles() doesn't
re-enqueue tiles mid-finalization. Also handle unloadTile() for tiles in
the finalizingTiles_ deque to prevent orphaned water/M2/WMO resources.
- Fix StormLib package name: libstormlib-dev → libstorm-dev (correct
Ubuntu package name) across all CI workflows and extract_assets.sh
- Build StormLib from source on Windows CI (no MSYS2 package exists),
ensuring asset_extract.exe is included in release archives
- Update extract_assets.sh/.ps1 to prefer pre-built asset_extract
binary next to the script (release archives) before trying build dir
- Move ADTTerrain allocations from stack to heap in prepareTile() to
fix stack overflow on macOS (worker threads default to 512 KB stack,
two ADTTerrain structs ≈ 560 KB exceeded that)
Tag-triggered (v*) workflow that builds all 5 platforms and creates
a GitHub Release with bundled binaries, Data/, and asset extraction
tools (asset_extract, extraction scripts, pipeline GUI).
Warden: copy/skip pair order was reversed — format is [copy][data][skip]
per MaNGOS/TrinityCore, not [skip][copy][data]. All copy sizes read as 0,
causing module load failure and server disconnect.
DBC: when binary DBCs aren't available (no MPQ extraction), fall back to
expansion CSV files even for visual DBCs (CreatureDisplayInfo, CharSections,
ItemDisplayInfo, etc.) instead of failing with "DBC not found".
- BLP: blp_convert takes one arg, not two; was passing an output path
that caused conversion failures
- M2: vertex header offsets were wrong (used 80/100 instead of 60/68),
producing garbage vertex counts that failed the sanity check
- Add "Hide .anim/.skin" checkbox (on by default) to filter ~30k
companion files from the directory tree
Manifest keys use backslashes but tree splitting used forward slashes,
causing all 241k entries to land at root level. Combined with O(N)
any(startswith) checks per entry, this produced an O(N^2) hang. Re-key
manifest by the forward-slash 'p' field and build a directory index in
a single O(N) pass so tree operations are O(1) lookups.
When M2Renderer's descriptor pool was exhausted, batch.materialSet
would be VK_NULL_HANDLE and the bind was skipped, but the draw call
still executed using the previously bound descriptor set from
CharacterRenderer — causing game objects to render with the player's
skin/armor textures. Skip the entire batch instead.
New tab lets users explore extracted assets visually: BLP textures
rendered via blp_convert+Pillow, M2/WMO wireframes with mouse-drag
rotation and zoom, DBC/CSV tables with named columns from
dbc_layouts.json, ADT heightmap grids, text file viewer, audio
metadata, and hex dumps. Directory tree lazy-loads from manifest.json
with search and file-type filtering.
Cover all new features: cancel extraction, background override rebuild,
zip-slip protection, extractor auto-detection order, readonly dropdowns,
and selection preservation. Reorganize into per-tab sections with tables.
- Fix zip slip vulnerability: validate extracted paths stay within target
- Fix redundant mkdir before rmtree in rebuild_override()
- Add build/asset_extract and Windows .ps1 fallback to extractor search
- Preserve pack list selection across refreshes
- Add Cancel Extraction button with process.terminate()
- Run override rebuild in background thread to avoid UI freeze
- Fix locale combobox state to readonly
- Add asset_pipeline/ to .gitignore
- Make script executable
- Add -Wno-missing-field-initializers for GCC (Vulkan designated
initializer patterns in valid C++20 trigger this)
- Mark extern/ and vk-bootstrap as SYSTEM includes to suppress
warnings from vendored headers (VMA, stb, miniaudio, nlohmann)
- vk_utils.hpp: mark unused 'msg' parameter with [[maybe_unused]]
- world_packets.cpp: write exactMatch field to auction list packet
(was accepted as parameter but never serialized)
- game_screen.cpp: remove unused bagIcons array and unused info variable
- talent_screen.cpp: remove unused nextRank and pMin variables
The CLANGARM64 runner's cached MSYS2 install has outdated PGP keys,
causing "signature is unknown trust" errors. Setting update: true
refreshes the keyring before installing packages.
vk_mem_alloc.h was in extern/ but gitignored, causing macOS CI to fail
with 'vk_mem_alloc.h' file not found. Whitelist it alongside the other
vendored headers.
Latest vk-bootstrap HEAD uses Vulkan 1.4 types
(VkPhysicalDeviceVertexAttributeDivisorFeatures) that don't exist in
the Vulkan 1.3.275 headers shipped by Ubuntu 24.04. Pin to v1.3.302,
the latest release compatible with Vulkan 1.3 headers.
Some distros and CMake versions fail to find Vulkan via FindVulkan.cmake
even when libvulkan-dev is installed. Fall back to pkg-config (vulkan.pc)
and create the Vulkan::Vulkan imported target manually if needed.
- Add vk-bootstrap as a git submodule (was in extern/ but not tracked,
causing "vk-bootstrap not found" on all CI jobs)
- Whitelist extern/vk-bootstrap in .gitignore
- Move stormlib to a separate optional install step on both Windows CI
jobs (mingw-w64-x86_64-stormlib doesn't exist in MSYS2 repos)
Linux CI was missing libvulkan-dev, vulkan-tools, and glslc, causing
find_package(Vulkan REQUIRED) to fail. Also update BUILD_INSTRUCTIONS
Ubuntu and Arch sections to include Vulkan/shaderc packages.