Commit graph

114 commits

Author SHA1 Message Date
Kelsi
8a9a2c6d3d Clamp character appearance using DBC ranges 2026-02-05 18:22:11 -08:00
Kelsi
eb39ac5289 Limit camera zoom in WMO interiors and improve wall collision
Reduce max zoom to 15 units when inside a building. Increase player
collision radius to 0.70, lower step height threshold, and use more
aggressive pushback and finer sweep steps to prevent wall clipping.
2026-02-05 18:19:09 -08:00
Kelsi
d2fcf5e71f Use auth username for world connection 2026-02-05 18:18:15 -08:00
Kelsi
d6d180abf5 Ignore single-player saves 2026-02-05 18:14:54 -08:00
Kelsi
961ddb187e Simplify wall collision and add intro camera pan
- Remove complex ramp/edge filtering that was skipping building walls
- Simpler wall detection: any vertical geometry above step height
- Add intro camera pan on game start
2026-02-05 18:12:27 -08:00
Kelsi
9828eb2880 Add one-time spawn camera pan 2026-02-05 18:06:52 -08:00
Kelsi
74cabd76ce Increase wall collision sweep steps to prevent clipping 2026-02-05 18:02:41 -08:00
Kelsi
f7e2d52faf Fix heightmap loading detection and widen wall collision radius
- Use explicit loaded flag for heightmap instead of checking height values
- Increase player collision radius from 0.50 to 0.55 for better wall collision
2026-02-05 18:01:16 -08:00
Kelsi
8f4935a450 Add missing includes for audio and camera controller 2026-02-05 17:55:30 -08:00
Kelsi
7525230e86 Add mouse sensitivity and invert mouse to settings UI
Larger settings window (440x520) to fit all sections.
2026-02-05 17:51:14 -08:00
Kelsi
d04963b0b0 Fix falling through upper floors in multi-story buildings
Don't snap player down when detected floor is >2 units below current
position. This prevents falling through upper floors when the raycast
accidentally detects the ground floor through geometry gaps.
2026-02-05 17:48:58 -08:00
Kelsi
685da6d260 Improve floor detection for multi-story buildings
- Increase footprint sampling radius from 0.28 to 0.4 units
- Only update floor cache if found floor is close to query height
- Prevents caching wrong floor from different stories
2026-02-05 17:46:30 -08:00
Kelsi
07100a46f6 Fix floor cache for multi-story buildings
Skip cached floor height if it's too far below query point (>4 units),
forcing a full raycast. This handles cases where the cache has a
different floor's height (e.g., ground floor cached while on upper floor).
2026-02-05 17:41:46 -08:00
Kelsi
697c4b8218 Persist single-player settings and add defaults 2026-02-05 17:40:15 -08:00
Kelsi
46939808ad Use zone-specific floor cache files
Save/load floor cache per map (e.g., cache/wmo_floor_Azeroth.bin) instead
of a single global file. Saves current zone's cache before teleporting,
loads target zone's cache after terrain streaming completes.
2026-02-05 17:35:17 -08:00
Kelsi
7060c80b81 Add audio volume controls to settings 2026-02-05 17:32:21 -08:00
Kelsi
f5185c08cf Automate WMO floor cache pre-computation
Add precomputeFloorCache() method that samples all WMO bounds at load time
and populates the persistent floor height grid. Called after terrain
streaming completes (initial spawn and teleport) when cache is empty.
2026-02-05 17:30:08 -08:00
Kelsi
8768e0310c Add pre-computed WMO floor cache and improve save logging
- Add initial floor cache for faster collision on first run
- Log absolute path when saving cache for debugging
2026-02-05 17:26:18 -08:00
Kelsi
01de332d4c Optimize WMO rendering and collision performance
- Add texture-sorted batch merging with glMultiDrawElements to reduce draw calls
- Pre-compute merged batches at load time instead of per-frame
- Add persistent floor height cache with disk save/load (cache/wmo_floor_cache.bin)
- Reduce collision focus radius and sweep steps for faster collision checks
- Add floor cache size to performance HUD
- Reduce WMO group distance culling to 80 units
2026-02-05 17:20:30 -08:00
Kelsi
f69556b83e Avoid hardcoded login video path 2026-02-05 16:26:45 -08:00
Kelsi
92a38f3b0e Use updated loading screen images 2026-02-05 16:23:38 -08:00
Kelsi
f2eafefd3f Add back to game button on escape menu 2026-02-05 16:21:17 -08:00
Kelsi
2ca1e5a87a Stop music on quit 2026-02-05 16:17:04 -08:00
Kelsi
0d95f80654 Adjust settings UI and remove F4 shadows toggle 2026-02-05 16:16:03 -08:00
Kelsi
79e4bfd6c3 Add shadows toggle and F4 hotkey 2026-02-05 16:14:11 -08:00
Kelsi
528f645350 Add shadow toggle (F4) and distance-based WMO group culling
Shadow toggle allows disabling shadow pass for performance testing.
Distance culling skips WMO groups beyond 200 units. Occlusion queries
disabled by default as overhead outweighs benefits in dense scenes.
2026-02-05 16:11:24 -08:00
Kelsi
6a49a7e01f Add video settings UI and refresh loading assets 2026-02-05 16:11:00 -08:00
Kelsi
77070468b5 Add escape menu with logout/quit/settings 2026-02-05 16:01:38 -08:00
Kelsi
0ef0a9e028 Add /logout chat command 2026-02-05 15:59:06 -08:00
Kelsi
b758f45a9f Add GPU occlusion query culling for WMO groups
Renders bounding boxes in depth-only pre-pass and queries GPU for
visibility. Groups fully occluded in previous frame are skipped.
Significantly improves performance in dense areas like Stormwind.
2026-02-05 15:51:08 -08:00
Kelsi
33f4072846 Use absolute tavern music path fallback 2026-02-05 15:49:53 -08:00
Kelsi
a0d2461a6e Retry login music playback when not playing 2026-02-05 15:47:21 -08:00
Kelsi
b05089aa3f Play tavern music file on login screen 2026-02-05 15:44:42 -08:00
Kelsi
02f8328747 Play looping MP4 behind auth screen 2026-02-05 15:34:29 -08:00
Kelsi
41ac8f646e Add WMO portal culling infrastructure and fix single-player character flow
Portal-based visibility culling for WMO rendering (disabled by default,
needs debugging for complex WMOs like Stormwind). Skip character creation
screen when characters already exist in single-player mode.
2026-02-05 15:31:00 -08:00
Kelsi
ca84384402 Store password hash instead of plaintext for login persistence
Save SHA1(UPPER(user):UPPER(pass)) hash to login.cfg instead of the
plaintext password. On subsequent logins, use the stored hash directly
with a new authenticateWithHash() method that bypasses password hashing.
The password field shows a placeholder when using a stored hash.
2026-02-05 15:09:16 -08:00
Kelsi
45466f3d11 Fix CharSections.dbc lookup for skin color variations
For Section 0 (body skin) and Section 4 (underwear), the skin color is
stored in colorIndex with variation=0, not the other way around. This
fixes the preview showing no texture for skin colors other than 0.
2026-02-05 15:07:31 -08:00
Kelsi
5ece5b1ce6 Fix single-player spawn coords and show action bar spell names 2026-02-05 15:07:13 -08:00
Kelsi
060f2bbb9f Add 3D character model preview to character creation screen
Render an animated M2 character model in the creation screen using a
dedicated CharacterRenderer with an offscreen FBO. Preview updates on
race/gender/appearance changes, supports mouse-drag rotation, and
composites skin, face, hair scalp, and underwear textures from
CharSections.dbc. Extracts getPlayerModelPath() to a shared free
function in game/character.
2026-02-05 14:58:45 -08:00
Kelsi
48d2808872 Add sqlite single-player persistence with autosave 2026-02-05 14:55:42 -08:00
Kelsi
940669740d Apply start actions and remove-items rules 2026-02-05 14:38:58 -08:00
Kelsi
33226fa953 Use created character data and DB start items/spells 2026-02-05 14:35:12 -08:00
Kelsi
776a617f61 Fix crash in character creation by deferring callback to next update
The charCreateCallback was firing synchronously during ImGui render,
causing a state transition before the create screen's ImGui::End() was
called. Defer the callback to GameHandler::update() and ensure update()
runs during CHARACTER_CREATION and CHARACTER_SELECTION states.
2026-02-05 14:18:41 -08:00
Kelsi
0451c82661 Remove hardcoded NPC spawns CSV and fallback, require DB for spawns 2026-02-05 14:14:13 -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
f19c060078 Add single-player MOTD default 2026-02-05 14:09:03 -08:00
Kelsi
3ca8944ced Emulate server loot/xp and combat feedback in single-player 2026-02-05 14:01:26 -08:00
Kelsi
1383e6c159 Fix realm list by updating auth handler during REALM_SELECTION state 2026-02-05 13:59:33 -08:00
Kelsi
eda70e9c6f Fix FourCC encoding and protocol version in LOGON_CHALLENGE
Game name uses big-endian (not reversed), platform/os/locale use
little-endian with chars reversed and null at end (not beginning).
Protocol version is 8 for WoW 3.3.5a, not 3.
2026-02-05 13:47:54 -08:00
Kelsi
61147a08af Fix LOGON_CHALLENGE security flags buffer corruption and improve auth diagnostics
Account for PIN/matrix/authenticator extra data in packet size
calculation to prevent receive buffer corruption. Add hex dump
of raw auth packets and show actual server error codes.
2026-02-05 13:26:24 -08:00