43 Commits

Author SHA1 Message Date
Kelsi
98ed8411e6 Fix movement desync: strafe animation and missing SET_FACING
Two bugs caused the client to look like a bot to server GMs:

1. Strafe animation played during forward+strafe (W+A) instead of the
   walk/run animation. Added pureStrafe guard so strafe animations only
   play when exclusively strafing (no forward key or auto-run active).

2. CMSG_MOVE_SET_FACING was never sent on mouse-look turns. The server
   predicts movement from the last known facing; without SET_FACING the
   heartbeat position appeared to teleport each time the player changed
   direction. Now sent at up to 10 Hz whenever facing changes >3°,
   skipped while keyboard-turning (handled server-side by TURN flags).
2026-02-19 16:40:17 -08:00
Kelsi
be79fca2cc Fix combat facing updates and dead-on-spawn creature pose 2026-02-19 01:19:29 -08:00
Kelsi
1562a80175 Fix taxi flight: camera panning, world reload, gryphon display, and animations
- Clear introActive/idleOrbit in externalFollow block so mouse panning works during taxi
- Skip full world reload on same-map teleports (taxi landing) by tracking loadedMapId
- Collect all model IDs for a path when resolving gryphon display ID (fixes displayId=0)
- Remove incorrect MountDisplayId fields from Vanilla/Turtle TaxiNodes DBC layouts
- Add Vanilla fly animation IDs (234/229/233) to taxi mount animation candidates
2026-02-17 02:23:41 -08:00
Kelsi
e04f824d74 Throttle player equipment compositing and spawning to fix walking stutter
Defer equipment texture compositing to a queue processed max 1 per frame
instead of compositing immediately on callback (each compositeWithRegions
call does file I/O + CPU blit + GPU upload on the main thread). Reduce
MAX_SPAWNS_PER_FRAME from 96 to 8 and increase inspect rate limit from
0.75s to 2s. Demote noisy per-frame logs to DEBUG level.
2026-02-16 00:51:59 -08:00
Kelsi
2f49b9337c Unify asset system: one asset set, always high-res
Remove HDPackManager, expansion overlay manifests, and BLP size-comparison
logic. Assets now resolve through a single manifest with a simple override
directory (Data/override/) for future HD upgrades.
2026-02-15 04:18:34 -08:00
Kelsi
7d115aaa70 Add per-expansion asset overlay system and fix CharSections DBC layout
Expansion overlays allow each expansion to supplement the base asset data
via an assetManifest field in expansion.json, loaded at priority 50 (below
HD packs). The asset extractor gains --reference-manifest for delta-only
extraction. Also fixes CharSections field indices (VariationIndex=4,
ColorIndex=5, Texture1=6) across all DBC layout references.
2026-02-14 00:00:26 -08:00
Kelsi
506f64ad07 Show online player equipment 2026-02-13 20:10:19 -08:00
Kelsi
bcfc075e1e Fix Turtle/Classic parsing and online player textures 2026-02-13 19:40:54 -08:00
Kelsi
f136de101e Vanilla/Turtle WoW support: M2 loading, bone parsing, textures, auth
- Vanilla M2 bone struct (108 bytes) with 28-byte animation tracks
- Version-aware bone parsing (vanilla vs WotLK format detection)
- Fix CharSections.dbc field layout for vanilla (variation/color at 4-5)
- Remove broken CharSections.csv files (all fields marked as strings)
- Expansion data reload on profile switch (DBC cache clear, layout reload)
- Vanilla packet encryption (VanillaCrypt XOR-based header crypt)
- Extended character preview geoset range (0-99) for vanilla models
- DBC cache clear support in AssetManager
2026-02-13 16:53:28 -08:00
Kelsi
90a1aa8a92 Add multi-expansion support with data-driven protocol layer
Replace hardcoded WotLK protocol constants with a data-driven architecture
supporting Classic 1.12.1, TBC 2.4.3, and WotLK 3.3.5a. Each expansion
has JSON profiles for opcodes, update fields, and DBC layouts, plus C++
polymorphic packet parsers for binary format differences (movement flags,
speed fields, transport data, spline format, char enum layout).

Key components:
- ExpansionRegistry: scans Data/expansions/*/expansion.json at startup
- OpcodeTable: logical enum <-> wire values loaded from JSON
- UpdateFieldTable: field indices loaded from JSON per expansion
- DBCLayout: schema-driven DBC field lookups replacing magic numbers
- PacketParsers: WotLK/TBC/Classic parsers with correct flag positions
- Multi-manifest AssetManager: layered manifests with priority ordering
- HDPackManager: overlay texture packs with expansion compatibility
- Auth screen expansion picker replacing hardcoded version dropdown
2026-02-12 22:56:36 -08:00
Kelsi
0ff0f2f995 Fix character appearance, previews, mount seat, and online unequip 2026-02-12 14:55:27 -08:00
Kelsi
d8f04b27d1 Auto-unsheath weapons on combat engage 2026-02-12 00:15:51 -08:00
Kelsi
dd5511eb00 Queue transport pre-spawn moves and add Z weapon sheath toggle 2026-02-12 00:14:39 -08:00
Kelsi
8bf63b1f06 Fix taxi state sync and transport authority; reduce runtime log overhead; restore first-person self-hide 2026-02-11 22:27:02 -08:00
Kelsi
74062aa25f Stabilize taxi/state sync and creature spawn handling 2026-02-11 21:14:35 -08:00
Kelsi
b0af2c928d Fix NPC visibility and stabilize world transport/taxi updates 2026-02-11 18:25:04 -08:00
Kelsi
30c1f3709c Transport hell 2026-02-11 00:54:38 -08:00
Kelsi
6bca624e98 Add transport system, fix NPC spawning, and improve water rendering
Transport System (Phases 1-7):
- Implement TransportManager with Catmull-Rom spline path interpolation
- Add WMO dynamic transforms for moving transport instances
- Implement player attachment via world position composition
- Add test transport with circular path around Stormwind harbor
- Add /transport board and /transport leave console commands
- Reuse taxi flight spline system and external follow camera mode

NPC Spawn Fixes:
- Add smart ocean spawn filter: blocks land creatures at high altitude over water (Z>50)
- Allow legitimate water creatures at sea level (Z≤50) to spawn correctly
- Fixes Elder Grey Bears, Highland Striders, and Plainscreepers spawning over ocean
- Snap online creatures to terrain height when valid ground exists

NpcManager Removal:
- Remove deprecated NpcManager (offline mode no longer supported)
- Delete npc_manager.hpp and npc_manager.cpp
- Simplify NPC animation callbacks to use only creatureInstances_ map
- Move NPC callbacks to game initialization in application.cpp

Water Rendering:
- Fix tile seam gaps caused by per-vertex wave randomization
- Add distance-based blending: seamless waves up close (<150u), grid effect far away (>400u)
- Smooth transition between seamless and grid modes (150-400 unit range)
- Preserves aesthetic grid pattern at horizon while eliminating gaps when swimming
2026-02-10 21:29:10 -08:00
Kelsi
4bef9602bc Implement WoW-style 3D billboard quest markers
Replace 2D ImGui text markers with proper 3D billboard sprites using BLP textures.

Features:
- Billboard rendering using Interface\GossipFrame\ BLP textures (yellow !, yellow ?, grey ?)
- WoW-style visual effects: bob animation, distance-based scaling, glow pass, distance fade
- Proper NPC height positioning with bounding box detection
- Camera-facing quads with depth testing but no depth write
- Shader-based alpha modulation for glow and fade effects

Technical changes:
- Created QuestMarkerRenderer class with billboard sprite system
- Integrated into Renderer initialization for both online and offline terrain loading
- Rewrote updateQuestMarkers() to use billboard system instead of M2 models
- Disabled old 2D ImGui renderQuestMarkers() in game_screen.cpp
- Added debug logging for initialization and marker tracking

Quest markers now render with proper WoW visual fidelity.
2026-02-09 23:41:38 -08:00
Kelsi
3e4181f4d2 Implement 3D quest markers using M2 models
Loads and renders actual quest marker M2 models from
World\Generic\PassiveDoodads\Quest\ as floating 3D objects above NPCs
based on quest status, replacing 2D ImGui text markers.

Features:
- Loads QuestExclamation.m2 (yellow !) for available quests
- Loads QuestQuestionMark.m2 (silver ?) for completable quests
- Updates marker positions dynamically as NPCs move
- Automatically spawns/despawns markers based on quest status changes
- Positions markers above NPC heads using render bounds

Quest markers are now proper 3D assets consistent with WoW 3.3.5a client.
2026-02-09 23:05:23 -08:00
Kelsi
e8c930f0bb Auto-select newly created character in selection screen
After creating a character, automatically select it in the character
list instead of defaulting to the previously selected character.

Changes:
- Added selectCharacterByName() method to CharacterScreen
- Store created character name in Application
- On creation success, auto-select the new character by name
- Falls back to saved selection if new character name doesn't match
2026-02-09 22:51:13 -08:00
Kelsi
045a8c7c89 Fix NPC voices to use correct WAV format and gender detection
WotLK 3.3.5a uses .wav files for NPC voices, not .ogg as shown in retail Wowhead. Fixed audio engine to preserve original sample rate from WAV files (preventing chipmunk playback). Implemented race/gender detection using CreatureDisplayInfo.dbc and CreatureDisplayInfoExtra.dbc to play correct voice types for each NPC.
2026-02-09 02:22:20 -08:00
Kelsi
475537f09a Add idle yawn emote and hearth home tooltip 2026-02-08 03:39:02 -08:00
Kelsi
22967debdb Fix taxi flights, mounts, and movement recovery 2026-02-08 03:05:38 -08:00
Kelsi
2cc2eb7f60 Add gameobject interaction and taxi activation 2026-02-07 19:44:03 -08:00
Kelsi
a123d2a49a 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
6ba143ddc0 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 davis
8cf72c79ff Fix compilation errors from single-player removal
- Rename spRace_, spGender_, spClass_ to playerRace_, playerGender_, playerClass_
- Remove swingTimer_ reference (server-side combat only)
- Remove teleporter panel UI and all references
- Remove T key binding for teleporter

Build now completes successfully with zero errors.
2026-02-07 11:26:49 -08:00
kelsi davis
fb2e9bfb3d Remove single-player mode to focus on multiplayer
Removed all single-player/offline mode functionality:
- Removed ~2,200 lines of SQLite database code
- Removed 11 public SP methods from GameHandler
- Removed SP member variables and state flags
- Removed SP UI elements (auth screen button, game settings)
- Removed SQLite3 build dependency
- Deleted docs/single-player.md
- Updated documentation (README, FEATURES, CHANGELOG)

Files modified:
- src/game/game_handler.cpp: 2,852 lines (down from 4,921)
- include/game/game_handler.hpp: Removed SP API
- src/core/application.cpp/hpp: Removed startSinglePlayer()
- src/ui/*: Removed SP UI logic
- CMakeLists.txt: Removed SQLite3

All online multiplayer features preserved and tested.
2026-02-06 23:52:16 -08:00
Kelsi
700349e2e7 Fix online interactions, UI, and inventory sync 2026-02-06 18:34:45 -08:00
Kelsi
f20ef1f20d Add player death handling, race-aware faction hostility, and all-race texture support
- Death screen with "Release Spirit" button sends CMSG_REPOP_REQUEST
- Detect player death/resurrection via health updates (VALUES and CREATE)
- Faction hostility map now built per-character race instead of hardcoded Human
- CharSections.dbc texture lookup enabled for all races (was Human-only)
- Fallback texture paths use race folder names instead of hardcoded Human
- Player name in unit frame is clickable for self-targeting
2026-02-06 17:27:20 -08:00
Kelsi
71c3d2ea77 Restructure inventory UI, add vendor selling, camera intro on all spawns, and quest log
Split inventory into bags-only (B key) and character screen (C key). Vendor window
auto-opens bags with sell prices on hover and right-click to sell. Add camera intro
pan on all login/spawn/teleport/hearthstone events and idle orbit after 2 minutes.
Add quest log UI, SMSG_MONSTER_MOVE handling, deferred creature spawn queue, and
creature fade-in/movement interpolation for online mode.
2026-02-06 13:47:03 -08:00
Kelsi
c48af4926a Fix NPC hair/geoset rendering using DBC lookups
Use CharHairGeosets.dbc to map (race, sex, hairStyleId) to the correct
group 0 scalp mesh instead of the broken 101+hairStyleId formula. Filter
group 0 submeshes so only the body base and correct hair mesh render
(prevents overlapping scalp variants). Fix ItemDisplayInfo.dbc column
indices (5→7) and geoset formulas for equipment. Add CharSections.dbc
hair texture lookup and CharacterFacialHairStyles.dbc support.
2026-02-06 01:02:35 -08:00
Kelsi
20eef54ccf Add equipment geosets for humanoid NPCs
Load equipment display IDs from CreatureDisplayInfoExtra.dbc and look up
geoset groups from ItemDisplayInfo.dbc. Apply appropriate geosets for
chest, pants, boots, gloves, tabard, and cape. Hide hair when NPC wears
a helmet.
2026-02-05 22:57:32 -08:00
Kelsi
7fd5708f1f Fix humanoid NPC textures using baked NPC textures from DBC
Load CreatureDisplayInfoExtra.dbc to get baked texture names for humanoid
NPCs. Apply textures from Textures\BakedNpcTextures\ to type-1 texture
slots. Also spawn player model in online mode and set active character
GUID for both single-player and online modes.
2026-02-05 22:47:21 -08:00
Kelsi
9b62acd72d Fix online mode creature spawning and packet parsing
- Fix encryption desync by tracking decrypted header bytes in world socket
- Fix UPDATE_OBJECT movement block parsing to handle 3.3.5a update flags
- Fix UNIT_FIELD_DISPLAYID index (67, not 71)
- Add creature spawn/despawn callbacks with DBC-based model loading
- Add SMSG_COMPRESSED_UPDATE_OBJECT opcode support
2026-02-05 21:55:52 -08:00
Kelsi
300edd2c7c Load terrain when entering world in online mode
Add world entry callback that triggers terrain loading when receiving
SMSG_LOGIN_VERIFY_WORLD. Fix coordinate conversion by applying
serverToCanonical() to properly swap X/Y axes from server format.
2026-02-05 21:28:21 -08:00
Kelsi
0ef0a9e028 Add /logout chat command 2026-02-05 15:59:06 -08:00
Kelsi
33226fa953 Use created character data and DB start items/spells 2026-02-05 14:35:12 -08:00
Kelsi
cf54db4554 Add character creation screen with race/class/appearance customization
Implements a full character creation UI integrated into the existing flow.
In single-player mode, auth screen now goes to character creation before
entering the world. In online mode, a "Create Character" button on the
character selection screen sends CMSG_CHAR_CREATE to the server. Includes
WoW 3.3.5a race/class combo validation and appearance range limits.
2026-02-05 14:13:48 -08:00
Kelsi
28a8e806e1 Fix WMO spawn presets to avoid terrain snapping 2026-02-04 23:30:03 -08:00
Kelsi
d8e2becbaa Add teleporter panel and server-compatible coordinate conversions
Teleporter panel (T key) lets the player teleport between Goldshire,
Stormwind Gate, Ironforge, and Westfall in single-player mode. Adds
serverToCanonical/canonicalToServer conversion at the network packet
boundary so positions are compatible with TrinityCore/MaNGOS/AzerothCore
emulator servers.
2026-02-04 18:27:52 -08:00
Kelsi
ce6cb8f38e Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00