Commit graph

283 commits

Author SHA1 Message Date
Kelsi
8fee55f99f Fix /unstuckgy hang by skipping WMO floor search
Add CameraController::teleportTo() that directly places the player at
the target position without the expensive floor-search loop in reset().
The loop does hundreds of WMO collision checks which hangs in cities.
2026-02-08 15:13:55 -08:00
Kelsi
eb92a71b71 Fix trainer buy packet and grey out unmet prerequisites
CMSG_TRAINER_BUY_SPELL was missing the trainerId field — server expects
guid(8) + trainerId(4) + spellId(4) = 16 bytes, not 12. Spells with
unmet prerequisites (chainNode1/2/3), insufficient level, or already
known are now greyed out with disabled Train buttons. Tooltips show
prerequisite status in green/red.
2026-02-08 15:03:43 -08:00
Kelsi
ee155c3367 Fix trainer buy spell and add specialization tabs
Fix SMSG_BINDPOINTUPDATE opcode from 0x1B3 to 0x155 — the old value
collided with SMSG_TRAINER_BUY_SUCCEEDED, causing buy responses to be
misinterpreted as bindpoint updates. Add specialization tabs using
SkillLineAbility.dbc to group spells by class spec (category 7).
2026-02-08 14:46:01 -08:00
Kelsi
9a01261401 Add trainer dialog system with spell list UI and buy support 2026-02-08 14:33:39 -08:00
Kelsi
046d4615ea Fix M2 texture loading, /unstuckgy, and WMO floor detection
- Add mutex to AssetManager::loadTexture/loadDBC/fileExists to prevent
  StormLib thread-safety races that silently fail texture reads; stop
  caching texture load failures so transient errors are retried.
- Replace /unstuckgy DBC lookup (which used wrong coordinate transform)
  with hardcoded safe locations per map.
- Widen WMO floor raycast from single grid cell to ±1 unit range query
  to catch bridge/walkway triangles at cell boundaries.
- Tighten swept collision hit threshold (0.5 → 0.15) and grid query
  margin (2.5 → 1.5) to prevent false-positive wall pushes.
- Tighten post-wall-push Z snap lower bound (-1.0 → -0.3) to prevent
  gradual floor sinking.
2026-02-08 14:17:04 -08:00
Kelsi
387cc5ddf4 Fix WMO collision clipping in Stormwind
Relax swept collision hit threshold, expand spatial grid query range,
enable WMO floor detection in first person, raise ramp rejection
threshold, and snap Z after wall collision XY adjustment.
2026-02-08 13:24:56 -08:00
Kelsi
f6eaa2cf70 Add idle yawn emote and hearth home tooltip 2026-02-08 03:39:02 -08:00
Kelsi
189f4a0a58 Add bindpoint support and WMO snap fix 2026-02-08 03:32:00 -08:00
Kelsi
132a6ea3c9 Add /unstuckgy and 2GB terrain tile cache 2026-02-08 03:24:12 -08:00
Kelsi
6736ec328b Fix taxi flights, mounts, and movement recovery 2026-02-08 03:05:38 -08:00
Kelsi
d910073d7a Preload terrain textures on background thread and fix ramp Z-snapping
Load BLP texture data during prepareTile() and upload to GL cache in
finalizeTile(), eliminating file I/O stalls on the main thread. Reduce
ready tiles per frame to 1. Fix camera sweep to snap Z to ramp surfaces.
Change hearthstone action bar slot from spell to item.
2026-02-08 01:16:23 -08:00
Kelsi
0ce38cfb99 Add transport support, gameobject queries, and fix item use
- Add setInstancePosition() to M2Renderer and WMORenderer for moving
  transport instances at runtime
- Detect UPDATEFLAG_TRANSPORT on gameobjects and track transport GUIDs
- Parse player-on-transport state from movement blocks
- Wire transport move callback in Application to update render positions
- Implement CMSG_GAMEOBJECT_QUERY / SMSG_GAMEOBJECT_QUERY_RESPONSE so
  gameobjects display proper names instead of "Unknown"
- Add name/entry fields to GameObject entity class
- Fix CMSG_USE_ITEM packet: remove extra uint8 that shifted the item
  GUID by one byte, breaking hearthstone and all item usage
- Remove redundant CMSG_LOOT after CMSG_GAMEOBJECT_USE for chests
- Show PvP enabled/disabled state in toggle message
- Relax WMO ramp wall-collision step-up check to allow walking on
  gentle ramps where floor rise per step is under 0.1 units
- Add M2 fallback when WMO group files fail to load for gameobjects
- Handle re-creation of existing gameobject render instances by
  updating position instead of silently ignoring
2026-02-08 00:59:40 -08:00
Kelsi
5610faa958 Reduce WMO interior camera distance for tighter view 2026-02-08 00:21:10 -08:00
Kelsi
ed2a8a4e0a Fix tunnel camera, dismount buff clear, and ground sampling
Use WMO-aware floor detection for camera clearance so tunnels don't
push the camera up to terrain. Clear permanent auras on dismount via
mount display field. Use center-only sampling for terrain/WMO floors
to prevent offset probes from snapping to terrain above tunnels.
2026-02-08 00:18:47 -08:00
Kelsi
2b771ec92e Improve stair climbing and disable R hotkey
Skip wall collision when a walkable floor exists above current feet,
allowing smooth stair traversal without per-zone tuning. Disable R key
camera reset to avoid conflicts with chat.
2026-02-08 00:12:15 -08:00
Kelsi
a01cec68a4 Fix AURA_UPDATE_ALL parsing of per-effect amounts
Only read effect amount int32 for active effect indices (flags 0x01,
0x02, 0x04) instead of always reading 3. The over-read desynchronized
the packet position, corrupting subsequent aura slots in ALL updates.
2026-02-08 00:06:25 -08:00
Kelsi
aa462fdb1f Fix buff bar updates, stair collision, and right-click aura cancel
Clear aura list on AURA_UPDATE_ALL so dismount/WMO transitions refresh
properly. Increase WMO step height thresholds to reduce stair blocking.
Change buff cancel to right-click and support dismount via buff bar.
2026-02-08 00:00:12 -08:00
Kelsi
b3b1cc80c6 Fix tunnel/cave floor snapping to prevent floating through terrain
selectReachableFloor now picks the floor closest to the player instead of the highest, so tunnels and caves use the WMO floor rather than the terrain surface above.
2026-02-07 23:50:44 -08:00
Kelsi
7a2bb28dc0 Add arena/BG opcodes, fix mount speed, buff bar icons, and autorun cancel
Add 36 arena and battleground opcodes with handlers for queue status, team events, invites, and errors. Fix SMSG_FORCE_RUN_SPEED_CHANGE parsing (uint8 not uint32) and remove manual mount speed tracking. Buff bar now shows spell icons and is positioned below the minimap. Both mouse buttons cancel autorun.
2026-02-07 23:47:43 -08:00
Kelsi
22b9ee9726 Reduce collision trapping and improve /unstuck
Add root, branch, thorn, moss, ivy, and other natural doodads to the no-block foliage list. /unstuck now moves the player 5 units forward instead of resetting in place.
2026-02-07 23:34:28 -08:00
Kelsi
394e1a3f31 Improve chat with local echo, slash shortcuts, colored input, and clickable URLs
Sent messages now appear immediately in chat log. Channel shortcuts (/s, /g, /p, /w, etc.) switch the chat type dropdown and color the input text to match. URLs in chat are clickable and open in the system browser.
2026-02-07 23:32:27 -08:00
Kelsi
6d719f2c52 Fix spirit healer resurrection with correct opcodes
Corrected death/resurrection opcode values (SMSG_SPIRIT_HEALER_CONFIRM=0x222, CMSG_SPIRIT_HEALER_ACTIVATE=0x21C, SMSG_RESURRECT_REQUEST=0x15B, CMSG_RESURRECT_RESPONSE=0x15C) and added resurrect dialog UI.
2026-02-07 23:12:24 -08:00
Kelsi
7cd7ac43a9 Refine resurrection flow 2026-02-07 21:47:14 -08:00
Kelsi
ff6155e2f3 Fix chat focus and spirit healer confirm 2026-02-07 21:12:54 -08:00
Kelsi
c9e7caa938 Improve spirit healer dialog and target UI 2026-02-07 21:00:05 -08:00
Kelsi
38c9fdad6b Improve targeting, minimap, and bridge collisions 2026-02-07 20:51:53 -08:00
Kelsi
a7c0b4320b Reduce terrain texture seams 2026-02-07 20:28:50 -08:00
Kelsi
9f19d9fa1a Fix movement, mounts, and terrain seams 2026-02-07 20:24:25 -08:00
Kelsi
c5a4d04bf5 Add taxi path BFS for activation 2026-02-07 20:05:14 -08:00
Kelsi
5eebd805ba Fix mounted first-person camera pivot 2026-02-07 20:05:07 -08:00
Kelsi
0ebf4d1e5e Load emotes from DBC 2026-02-07 20:02:14 -08:00
Kelsi
361277cf5b Make mushrooms non-blocking foliage 2026-02-07 19:45:09 -08:00
Kelsi
e5c48dc9b7 Add gameobject interaction and taxi activation 2026-02-07 19:44:03 -08:00
Kelsi
a71902a571 Add tiled particle atlas support 2026-02-07 19:20:37 -08:00
Kelsi
866877cad0 Refine chat input focus behavior 2026-02-07 19:08:16 -08:00
Kelsi
8bdf0a2e79 Fix taxi node names and add flight path cost display
TaxiNodes.dbc name was read from field 6 (Korean locale, empty) instead
of field 5 (enUS). Add BFS-based cost computation from TaxiPath.dbc
edges and display gold/silver/copper next to each destination.
2026-02-07 19:04:15 -08:00
Kelsi
0d94bca896 Fix terrain streaming crash: pendingTiles data race and missing null checks
Guard pendingTiles.erase() with queueMutex in processReadyTiles and
unloadTile to prevent data race with worker threads. Add defensive null
checks in M2/WMO render and animation paths. Move cleanupUnusedModels
out of per-tile unload loop to run once after all tiles are removed.
2026-02-07 18:57:34 -08:00
Kelsi
c156f3d390 Prevent jump spamming, disable face-target while mounted, remove auto-attack on right-click target 2026-02-07 18:57:27 -08:00
Kelsi
2fb01abcaa Halve mount rider bob frequency to one bounce per stride 2026-02-07 18:40:54 -08:00
Kelsi
35fff9307d Add mount rider bob and hoofbeat sounds, improve world map
- Rider character bobs with mount's run animation (sinusoidal, 0.12u amplitude)
- Mount hoofbeat footstep sounds triggered at 4 points per animation cycle
- M key opens map directly to player's current zone instead of continent
- Mouse wheel scroll zooms map in/out between world, continent, and zone views
- Fog of war darkens unexplored zones on continent view, clears on visit
2026-02-07 18:38:36 -08:00
Kelsi
0874f4f239 Fix mount stability, speed parsing, combat dismount, and self-targeting
- Fix SMSG_FORCE_RUN_SPEED_CHANGE parsing (missing uint32 field caused garbage speed)
- Always send speed ACK to prevent server stall, even on invalid values
- Defer mount model loading to next frame to avoid render-loop hang
- Compute mount height from tight vertex bounds instead of M2 header bounds
- Dismount when entering combat or casting spells while mounted
- Prevent auto-attacking yourself when self-targeted
- Leave combat when 40+ yards from target, close vendor at 15+ yards
- Pre-open X11 display for reliable mouse release in signal handlers
2026-02-07 18:33:14 -08:00
Kelsi
643611ee79 Add mount system and crash mouse-release handler
Render mount M2 model under player with seated animation, apply creature
skin textures, server-driven speed via SMSG_FORCE_RUN_SPEED_CHANGE, and
/dismount command. X11 XUngrabPointer on crash/hang to always release mouse.
2026-02-07 17:59:40 -08:00
Kelsi
4a932dd8cd Fix corner and ramp collision clipping
- Remove early-out in wall collision so multiple wall faces are resolved
  per frame, preventing corner clip-through
- Update localTo after each wall push so subsequent triangles check
  against the corrected position
- Tighten collision sweep steps from 0.65 to 0.35 units (max 5 steps)
  for better tunneling prevention on thin walls and corners
2026-02-07 17:13:09 -08:00
Kelsi
87aaa30eed Fix carpet sliding and brighten WMO interiors 10%
- Carpet slide fix: use raw model bounds (rawMax.z) instead of radius-
  inflated effectiveTop for the on-top-of-object check, so thin objects
  like rugs correctly skip lateral push
- Brighten WMO interior vertex lighting from 2.2/0.3 to 2.4/0.35
2026-02-07 17:09:57 -08:00
Kelsi
2d2b9cc1fc Fix M2 interior lighting and carpet sliding
- M2 interior darkening now uses global player-inside-WMO flag instead
  of per-instance queries that were unreliable
- Fix carpet/rug sliding by skipping lateral collision push when player
  is standing on top of any stepable low object, not just platforms
2026-02-07 17:05:30 -08:00
Kelsi
84c3d1bf32 Fix /unstuck to use full floor search via camera reset
The previous approach used getFloorHeight which has tight spatial query
bounds and couldn't find WMO floors far above the player. Now uses
reset() which does multi-radius WMO/terrain scanning.
2026-02-07 17:01:41 -08:00
Kelsi
3c2a728ec4 Add taxi system, fix WMO interior lighting, ramp collision, and /unstuck
- Implement flight path system: SMSG_SHOWTAXINODES parser, CMSG_ACTIVATETAXIEXPRESS builder, BFS multi-hop pathfinding through TaxiNodes/TaxiPath DBC, taxi destination UI, movement blocking during flight
- Fix WMO interiors too dark by boosting vertex color lighting multiplier
- Dim M2 objects inside WMO interiors (rugs, furniture) via per-instance interior detection
- Fix ramp/stair clipping by lowering wall collision normal threshold from 0.85 to 0.55
- Restore 5-sample cardinal footprint for ground detection to fix rug slipping
- Fix /unstuck command to reset player Z to WMO/terrain floor height
- Handle MSG_MOVE_TELEPORT_ACK and SMSG_TRANSFER_PENDING for hearthstone teleports
- Fix spawning under Stormwind with online-mode camera controller reset
2026-02-07 16:59:20 -08:00
Kelsi
c5a1fe927b Cancel auto-run on left mouse double-click 2026-02-07 16:08:06 -08:00
Kelsi
d9fe774d5f Fix auto-run not triggering run/swim animation
isMoving() re-read raw key states and didn't account for autoRunning flag,
so the animation state machine never saw movement during auto-run.
2026-02-07 16:07:21 -08:00
Kelsi
eb6e42eb59 Add tilde key toggle for auto-run
Pressing ~ toggles auto-run (continuous forward movement). Pressing W or S
cancels it. Also cancelled on respawn/teleport.
2026-02-07 16:05:13 -08:00