Commit graph

809 commits

Author SHA1 Message Date
Kelsi
6d213ad49b Fix M2 game object orientation to use +90° render yaw like characters
M2 game objects (signs, posts) were using orientation - 90° while
characters/NPCs use orientation + 90° for the canonical-to-render yaw
conversion. Both renderers build model matrices identically, so they
need the same offset. The old -90° was calibrated when terrain was
rotated 90°; with correct terrain the signs appeared sideways.
2026-02-22 02:31:16 -08:00
Kelsi
25bd05a631 Add Discord badge to README 2026-02-21 22:09:52 -08:00
Kelsi
b012906887 Add Vulkan Y-flip to projection matrix and ignore node_modules
Negate projection[1][1] to correct for Vulkan's Y-down NDC convention.
Also add node_modules/ to .gitignore to prevent accidental commits.
2026-02-21 22:05:11 -08:00
Kelsi
4fc3689dcc Fix sky and clouds orientation for Z-up world coordinates
Skybox: replace sphere-mesh approach with a fullscreen triangle that
reconstructs the world-space ray direction analytically via inverse
projection/view matrices. Eliminates clip.w=0 degeneracy at the horizon
and correctly maps altitude to dir.z in the Z-up coordinate system.

Clouds: hemisphere mesh was storing altitude in aPos.y (Y-up convention);
the Z-up view matrix projected this sideways, making clouds appear
vertical. Store altitude in aPos.z and update the fragment shader to
read dir.z as altitude and dir.xy as the horizontal UV plane.
2026-02-21 22:04:17 -08:00
Kelsi
69cf39ba02 Activate WMO/char/M2 render loop, purge dead GL block, add underwater overlay
- renderWorld() now calls wmoRenderer, characterRenderer, m2Renderer (+smoke,
  particles) in the correct opaque→transparent order; water moved after all
  opaques; per-subsystem timing active in live path
- Deleted the 310-line #if 0 GL stub block and removed #include <GL/glew.h>
  (last GL reference in renderer.cpp)
- Full-screen overlay pipeline (postprocess.vert + overlay.frag, alpha blend,
  no depth test/write) for underwater tint; lazily initialized, renders a blue
  tint when camera is meaningfully below the water surface; canal vs open-water
  tint colours preserved from original design
- overlay.frag.glsl / overlay.frag.spv added
2026-02-21 22:04:17 -08:00
Kelsi
dea52744a4 Character renderer is fully Vulkan. 2026-02-21 22:04:17 -08:00
Kelsi
83b576e8d9 Vulcan Nightmare
Experimentally bringing up vulcan support
2026-02-21 22:04:17 -08:00
Kelsi
863a786c48 Merge remote-tracking branch 'origin/master' 2026-02-21 22:01:32 -08:00
Kelsi
cfac229fed Include code of conduct 2026-02-21 21:58:07 -08:00
Kelsi Rae Davis
12597294d9 Merge pull request #2 from VPeruS/docker-build
[build] Added configuration to allow building in container
2026-02-21 07:32:56 -08:00
vperus
95f5321833 [build] Added configuration to allow building in container 2026-02-21 17:04:56 +02:00
Kelsi Rae Davis
2d010ffe1a Merge pull request #3 from rursache/fix/extract-mpq-case-check
Fix MPQ detection failing when files are lowercase .mpq
2026-02-21 05:09:52 -08:00
Radu Ursache
ca852345a1 Fix MPQ detection failing when files are lowercase .mpq
The sanity check `ls *.MPQ *.mpq` fails under `set -o pipefail`
when only one case variant exists, because ls exits non-zero for
the unmatched glob pattern and pipefail propagates that failure.

Use `compgen -G` to check each glob pattern independently instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:02:07 +02:00
Kelsi
21f7b0f199 Remove nearest-known displayId model fallback cache for missing creature display mappings - that was weird and I'm done with the horror show 2026-02-21 04:18:14 -08:00
Kelsi
fa3060bdf7 Harden runtime against stutter-inducing log floods and missing display IDs
- Re-gate M2 glow diagnostics behind WOWEE_M2_GLOW_DIAG and DEBUG

- Deduplicate missing/failed texture warnings in asset and M2 texture loaders

- Deduplicate unhandled opcode warnings by state/opcode key in non-IN_WORLD phases

- Throttle malformed spline point-count warnings across world/classic/tbc parsers

- Ignore suspiciously huge display IDs from malformed packets with throttled warning

- Add nearest-known displayId model fallback cache for missing creature display mappings

- Clear display fallback caches on expansion reload and logout
2026-02-21 04:05:53 -08:00
Kelsi
dc91b316ed Refine lantern glow-card replacement and preserve lamp geometry
- Add per-batch glow metadata (lantern hint, card-like classification, tint)

- Track normalized texture keys and log lantern/light texture sets once for diagnostics

- Force sprite replacement for known Stormwind/Night Elf glow textures

- Keep lantern/light meshes visible while hiding only classified glow-card submeshes

- Choose glow sprite tint from texture hints (cool/red/warm) to avoid orange-only cards

- Broaden lantern glow detection to handle gameobject lights with nonstandard material setups
2026-02-21 03:51:42 -08:00
Kelsi
d40cfcad90 Reduce Stormwind stutter from spawn retry churn and log I/O
- Cache non-renderable creature display IDs and fail-fast future spawn attempts

- Mark GUIDs tied to non-renderable displays as permanent failures to avoid long retry loops

- Skip queued spawn retry work immediately for known non-renderable display IDs

- Clear non-renderable display cache on expansion reload/logout

- Downgrade high-volume UNIT spawn logs to debug and fix mislabeled time-sync log
2026-02-21 03:29:13 -08:00
Kelsi
f8fc34ff2c Narrow glow-card replacement to preserve lamp/sconce textures
- restrict glow sprite substitution to elven-like light models only
- keep Stormwind lamps and generic torch sconces rendering authored glass/grate/flame cards
- remove over-broad flame heuristic that turned many light fixtures into plain glow orbs
2026-02-21 03:26:21 -08:00
Kelsi
7a4a21c8bf Align lens flare with sky-locked sun rendering
- anchor flare sun position to camera + sun direction to match celestial billboard projection
- remove world-space parallax drift that caused flare/sun misalignment while moving
2026-02-21 03:23:24 -08:00
Kelsi
8156942b66 Align sun placement and shadow direction to active lighting
- drive shadow light direction from live LightingManager directionalDir
- normalize shadow light to downward-facing convention with grazing-angle guard
- make celestial/sky sun placement robust to directionalDir convention mismatches
- keep visible sun above horizon while preserving shadow alignment
2026-02-21 03:21:08 -08:00
Kelsi
566e7138f3 Refine sun rendering: remove white washout, add subtle atmospheric turbulence
- render sun with alpha blend while keeping moon additive glow
- add dedicated always-running sun haze timer (decoupled from moon phase cycling)
- constrain sun sprite with radial alpha mask and low-alpha discard to remove square artifact
- tune sun tint warmer without over-yellowing
- replace noisy/pulsing haze with slower flow-warp turbulence and lower amplitude
2026-02-21 03:10:45 -08:00
Kelsi
19759d506a Soften and grain cloud silhouettes against skybox
- make cloud mask transition broader for less distinct cutout edges
- increase high-frequency noise contribution for grainier cloud breakup
- apply edge-band fringe modulation with stronger feathering
- lower and remap final alpha to blend cloud boundaries more naturally into the sky
2026-02-21 02:58:57 -08:00
Kelsi
4f40a0287c Skip additive FX batches on attached weapon models
- filter blendMode >= 3 batches when rendering weapon attachments
- avoids detached flat card artifacts on certain swords while keeping core weapon geometry
2026-02-21 02:52:31 -08:00
Kelsi
e81ed3d91b Hide target selection circle for gameobjects
- gate selection-circle rendering to UNIT and PLAYER targets only
- clear selection circle for non-unit target types (including gameobjects)
- keep target position updates unchanged for facing/interaction logic
2026-02-21 02:52:05 -08:00
Kelsi
9da875c8ba Fix elven lantern glow cards rendering as flat disks
- route small lantern/lamp/torch/candle emissive batches to glow-sprite path
- broaden light-emitter detection beyond additive-only blend modes
- add a secondary wider low-alpha halo layer for softer glow falloff
- keep elven-style lantern tint in cool blue while preserving warm tint elsewhere

This avoids rendering hard flat glow planes and restores a softer volumetric-looking lantern glow.
2026-02-21 02:49:26 -08:00
Kelsi
b2b196aa33 Reduce creature spawn stutter from repeated missing-display logging
- add one-time warning caches for missing CreatureDisplayInfo and missing model path lookups
- log each missing displayId/model-path only once instead of every spawn retry/frame
- remove duplicate empty-model-path warning in spawnOnlineCreature (already reported by lookup path)

This cuts high-frequency log I/O and string formatting in hotspots when server sends unknown displayIds, while preserving first-occurrence diagnostics.
2026-02-21 02:43:06 -08:00
Kelsi
0c8798d6b5 Improve player and foliage shadow quality and stability
- ensure player transform sync is not gated by third-person so player shadow stays consistent

- hold shadow projection center during movement and snap once on stop to remove delayed catch-up

- smooth foliage caster transitions using blended phase-shifted UV samples

- tune foliage motion frequencies/amplitudes for less popping

- increase shadow map resolution to 2048 and retune terrain PCF texel scale

- increase global shadow strength from 0.62 to 0.68 for stronger, clearer shadows
2026-02-21 02:28:47 -08:00
Kelsi
7717ab8d6b Stabilize foliage shadows and smooth motion transitions
- keep shadow projection center fixed while moving to remove per-frame projection churn flicker

- replace delayed post-move catch-up with immediate stop transition and idle smoothing

- rework foliage shadow caster motion to use blended phase-shifted UV samples for continuous position transitions

- reduce high-frequency foliage threshold popping by removing threshold warping path

- sharpen terrain receive filtering with tuned 5-tap PCF weights/offset for more detailed shadows

- raise shadow map resolution to 1536 and keep light-space texel snapping for stable sampling

- set shadows enabled by default and lower global shadow strength from 0.65 to 0.62

- keep foliage animation speed consistent between moving and idle at 80%
2026-02-21 02:23:08 -08:00
Kelsi
1003b25ff4 Improve runtime stutter handling and ground clutter performance
- reduce per-tile ground clutter generation pressure and enforce tighter caps to avoid spikes

- remove expensive detail dedupe scans from the hot render path

- add progressive/lazy clutter updates around player movement to smooth frame pacing

- lower noisy runtime INFO logging to DEBUG/throttled paths

- keep terrain/game screen updates responsive while preserving existing behavior
2026-02-21 01:26:16 -08:00
Kelsi
c04e97e375 Fix street sign interaction text and M2 sign orientation
Add page-text support for sign-like gameobject interactions by handling SMSG_GAMEOBJECT_PAGETEXT and SMSG_PAGE_TEXT_QUERY_RESPONSE, and issuing CMSG_PAGE_TEXT_QUERY when page IDs are available from cached GO template data.

Normalize received page text tokens before chat display and add a fallback for basic signpost GO type clicks to print sign names when no page data is present.

Correct M2 gameobject yaw alignment for signposts/arrows by applying render-space -90deg offset consistently across spawn, position update, and move-callback transforms; keep WMO orientation path unchanged.
2026-02-20 23:31:30 -08:00
Kelsi
ace24e8ccc Fix quest accept/abandon flow and expansion-specific accept packet format
Normalize WoW quest text tokens during parsing so quest titles/details no longer leak raw markup like  and |n into UI. Apply to WotLK and Classic parser paths, including quest list parsing in GameHandler.

Harden quest state handling by mapping abandon requests to authoritative server quest-log slots (PLAYER_QUEST_LOG_START) instead of local vector order, with a guarded fallback when update fields are unavailable.

Improve accept de-duplication by trusting server slot state over stale local cache; allow re-accept when local/server state diverges and trigger resync semantics.

Add expansion-aware CMSG_QUESTGIVER_ACCEPT_QUEST builders: WotLK sends guid+questId+unk1(uint32), while TBC/Classic/Turtle send guid+questId only. Wire GameHandler through PacketParsers for compatibility across expansions and cores.
2026-02-20 23:20:02 -08:00
Kelsi
73273a6ab5 Refine NPC virtual weapon and facial-hair resolution
- prioritize AzerothCore-compatible virtual item base indices (including 56) for NPC held weapons\n- resolve UNIT_VIRTUAL_ITEM_SLOT values strictly via Item.dbc entry -> DisplayID to avoid display-ID collisions\n- keep NPC offhand detached in this path to prevent erroneous shields/hilts\n- tighten facial geoset filtering to selected variants with minimal fallback (1xx/2xx/3xx)\n- reduce beard/sideburn overdraw while preserving selected chin/mustache channel
2026-02-20 23:09:56 -08:00
Kelsi
d76537a8aa Fix NPC virtual weapons and stabilize facial hair geosets
- resolve creature virtual item values as Item.dbc entry -> DisplayID before direct ItemDisplayInfo fallback\n- use correct WotLK virtual item base index set (starting at 56) and keep retry attach loop for late update fields\n- keep NPC main-hand weapon attachment path and clear erroneous offhand attachments\n- refactor NPC virtual weapon attach into helper with per-creature retry tracking\n- tighten humanoid facial hair geoset selection to avoid loading all beard/sideburn meshes\n- adjust facial 3xx preference to favor chin-hair channel when available
2026-02-20 23:04:57 -08:00
Kelsi
ce6887071c Refine NPC hair and facial geoset selection
- select humanoid scalp geoset by race/sex/style and filter overlapping scalp variants\n- constrain group 1 connectors to selected hair connector with safe fallback\n- add facial geoset handling for groups 100/200/300 from CharFacialHairStyles\n- allow selected facial 100 and fallback 100/101 when needed\n- map facial 200/300 directly from DBC indices (supports valid 200/300 variants)\n- keep existing NPC arm accessory suppression and clothing normalization
2026-02-20 22:28:07 -08:00
Kelsi
4e66f123eb Stabilize NPC arm appearance by removing accessory arm geosets
- exclude group 3 and group 8 from NPC geoset normalization to prevent looped/extra arm meshes\n- keep group 4 bare fallback (401) so forearms remain present\n- retain slot-aware NPC texture compositing so equipped NPCs can still tint/texturize arms without mesh artifacts
2026-02-20 22:16:57 -08:00
Kelsi
bffe8788bf Restore NPC tabard geoset selection
- include group 12 in humanoid clothing normalization\n- only enable tabard geoset when CreatureDisplayInfoExtra slot 9 is present\n- keep cape/robe conflict normalization behavior unchanged
2026-02-20 21:54:06 -08:00
Kelsi
40ce3ec97d Fix NPC clothing geoset selection and cape visibility rules
- normalize humanoid NPC clothing geosets at spawn time to avoid conflicting overlays\n- force pants-first selection for group 13 to prevent robe/kilt meshes on trouser NPCs\n- hide cloak groups for NPCs unless a renderable cape texture can actually be resolved\n- avoid falling back to missing equipment texture paths during region compositing\n- stop model-scope type-2 cape texture writes that could leak cape/white textures across shared model IDs\n- add group texture override usage in character renderer draw path\n- update character preview equipment application to reuse preview applyEquipment path\n- keep hand-only keybone fallback for attachments to prevent helmet/anchor misbinds
2026-02-20 21:50:32 -08:00
Kelsi
7e1a463061 Fix hostile target selection when faction flags are wrong
- make tab-target accept units that are either faction-hostile or actively aggressive toward the player\n- fix cases where enemies remain un-tab-targetable after combat starts due to stale/friendly faction state\n- prefer hostile UNIT picks over nearby GAMEOBJECT picks for both left-click target and right-click interact flows\n- keep existing dead-unit filtering and interaction behavior intact while improving combat target acquisition
2026-02-20 20:37:55 -08:00
Kelsi
44a947163d Smooth login music start and lower auth-screen volume
Add configurable fade-in support to MusicManager playback paths and use it for auth/login intro tracks to avoid abrupt starts. Apply a login-only 20% music attenuation while the auth screen is active, then restore the previous music volume when leaving login so in-game volume remains unchanged.
2026-02-20 20:34:06 -08:00
Kelsi
3368dbb9ec Fix NPC apparel fallback and reduce world-entry stutter
Hide NPC cloak/object-skin mesh when no cape texture resolves by using a transparent texture fallback, preventing skin-texture bleed on cloaks. Tighten NPC equipment region compositing by slot and add safe humanoid geoset selection to avoid robe-over-pants conflicts and odd pants texturing.

Reduce login/runtime hitching by deferring non-critical world-system initialization across frames, lowering per-frame transport doodad spawn budget, and demoting high-volume transport/MO_TRANSPORT diagnostics to debug. Gate M2 glow diagnostics behind WOWEE_M2_GLOW_DIAG and make zone music prewarm opt-in via WOWEE_PREWARM_ZONE_MUSIC.
2026-02-20 20:31:04 -08:00
Kelsi
48d9de810d Reduce runtime streaming stutter by throttling heavy spawn workloads
- Add per-frame cap for first-time creature model loads to spread expensive model/texture decode work across frames instead of burst loading.

- Keep cached creature spawns flowing while deferring uncached display IDs, preserving world population updates with smoother frame pacing.

- Defer transport WMO doodad instancing into a queued batch processor with a strict per-frame budget to avoid multi-hundred-ms spikes when ships/elevators register.

- Process deferred transport doodad batches in both normal gameplay update and loading-screen warmup loop so heavy transport setup can be amortized before and after world entry.

- Cleanup pending transport doodad batches on gameobject despawn to prevent stale work and avoid attaching children to removed parents.

- Lower character texture cache miss logging from INFO to DEBUG to reduce log I/O contention during movement-heavy asset streaming.
2026-02-20 20:00:44 -08:00
Kelsi
2da2e75253 Refine gameobject chest interaction flow and remove temporary debug logging
- Keep WotLK chest flow stock-like by relying on GAMEOBJ_USE/REPORT_USE instead of forcing eager CMSG_LOOT.

- Preserve fallback eager-loot behavior for Classic/Turtle paths with bounded retries.

- Improve GO targeting usability by allowing gameobject pick/retarget in world click logic.

- Remove temporary loot/chest diagnostic LOG_INFO traces added during chest-open debugging.
2026-02-20 19:51:04 -08:00
Kelsi
a11c9ae22b Add melee auto-attack range state fields to GameHandler
Declare autoAttackOutOfRangeTime_ and autoAttackRangeWarnCooldown_ in GameHandler to match existing combat logic in game_handler.cpp and keep header/source state in sync.
2026-02-20 17:53:33 -08:00
Kelsi
1ce406c9e1 Fix selection circle occlusion in WMO interiors
Keep the targeting ring anchored near target feet by filtering floor probes to a local Z window, preventing unrelated upper/lower WMO surfaces from hijacking ring height.

Also keeps the ring render pass after WMO geometry and before character/M2 passes so it remains visible through terrain/WMO while still rendering behind units.
2026-02-20 17:52:45 -08:00
Kelsi
9954b656f2 Improve melee out-of-range handling and hit sync
Use latest authoritative target coordinates for melee range checks and add heartbeat resync while auto-attack intent is active but hits are not confirmed.

Details:

- Switch melee distance calculations from interpolated entity position to getLatestX/Y/Z in start, periodic auto-attack checks, and NOTINRANGE retry gating.

- Send MSG_MOVE_HEARTBEAT during melee sync ticks when facing is already aligned but server hasn’t confirmed active swings yet (or target is marked out-of-range), preventing 'step forward to start hitting' behavior.

- Keep existing warning throttling and stop logic intact.
2026-02-20 17:47:10 -08:00
Kelsi
9a0415ad6b Fix bag bar drag/drop with container bags
Allow equipped bags to be moved through the shared inventory pickup/drop flow, including dragging from bag contents to bag bar and back from bag bar into bag/backpack slots.

Changes:

- Add InventoryScreen APIs to begin pickup from an equipment slot and drop held item into a target equipment slot.

- Treat inventory type 18 (bags) as valid drops on BAG1-BAG4 during slot validation.

- Route equipment placement in online mode through swapContainerItems with explicit src/dst addressing for deterministic bag slot moves.

- Update bag bar hover-drop path to use InventoryScreen drop API instead of direct local slot mutation.

- On bag bar drag start, hand off to inventory held-item drag when inventory/character UI is open so drops into bag/backpack slots work.
2026-02-20 17:41:19 -08:00
Kelsi
acb63d4f6e Hide post-login world hitch behind loading screen
- keep character-selection state until world entry load/finalize completes
- move expensive post-load setup (test transport + creature callback prep) before loading screen shutdown
- add bounded world warmup pass under loading screen to drain initial network/spawn backlog
- start intro camera pan after warmup so rotation begins when gameplay becomes visible
- guard test transport setup so it runs once per session
- add per-update world socket parse budget to prevent single-frame packet-drain stalls

This reduces visible 3-4s stutter after login by shifting startup work behind the loading screen and time-slicing packet processing.
2026-02-20 17:29:09 -08:00
Kelsi
954edc91b8 Harden quest accept state and resync quest log on login
- add idempotent pending-accept tracking with timeout and per-quest cleanup hooks
- stop optimistic local quest insertion on accept; rely on server-authoritative updates
- handle QUEST_INVALID already-on/completed as reconciliation paths for pending accepts
- trigger quest metadata + status resync when accept state drifts
- add login-time quest log rebuild from PLAYER_QUEST_LOG server slots
- query quest metadata for server-slot quests to hydrate titles/objectives
- clear stale pending quest accept/query state on fresh world entry
- improve gossip quest selection fallback by trusting server quest slots when local cache is missing

This reduces duplicate accept/state mismatch loops (notably reason=13) and stabilizes WotLK quest behavior after relogs.
2026-02-20 17:14:13 -08:00
Kelsi
ebaeea43cb Fix NPC movement animation sync and minimap marker behavior
- Use interpolated moveInstanceTo() for normal server NPC position deltas so walk/run animations play instead of visual sliding
- Keep hard snaps only for dead units and large corrections/teleports
- Add per-creature render position cache to drive interpolation safely across frames and clear it on spawn/despawn/reset
- Keep minimap controls visible regardless of quest-status availability
- Correct minimap NPC/quest marker projection mapping to match minimap shader transform
- Add optional nearby NPC minimap dots setting (default OFF), exposed in Gameplay > Interface and persisted in settings
2026-02-20 16:40:22 -08:00
Kelsi
504d5d2b15 Fix combat interaction, creature skin fallback, clipping, and minimap marker anchoring
- Right-click attack fallback for non-interactable hostile creatures
- Robust creature skin path resolution for WotLK/non-humanoid display skin fields
- Strengthened client-side anti-overlap spacing for active melee targets (including wolf/worg models)
- Minimap questgiver markers now use live minimap view radius and exact minimap center to prevent player-relative drift
2026-02-20 16:27:21 -08:00