Commit graph

139 commits

Author SHA1 Message Date
Kelsi
9de3f2d327 Fix NPC body parts by applying baked texture to all skin slots
Baked NPC textures must be applied to all skin-related texture slots
(type 1 char skin, type 2 object skin, type 6 hair) since body parts
use different texture slots. Removed separate hair texture lookup as
baked textures already include the complete NPC appearance.
2026-02-05 23:48:06 -08:00
Kelsi
ec937bc6d3 Fix NPC body parts by skipping batches with fallback texture
M2 humanoid models have duplicate body meshes - one set for baked textures
and another for skin compositing. Skip body part batches (group 0) that
resolve to white/fallback texture to avoid rendering the wrong set.
2026-02-05 23:44:45 -08:00
Kelsi
c053631c7a Fix geoset filtering for M2 models
Group 0 (body parts 0-18) always renders all submeshes since they represent
different body parts. Other groups filter by exact submeshId match to show
only one variation per group.
2026-02-05 23:42:05 -08:00
Kelsi
b4ae2c7b67 Disable geoset filtering until submesh ID format is determined
Geoset filtering was causing body parts to disappear. Disabled until we
can properly map submesh IDs to geoset groups.
2026-02-05 23:37:26 -08:00
Kelsi
99fd4ca537 Fix geoset filtering to always show body parts (group 0)
Body parts (submeshId 0-99) now always render regardless of activeGeosets.
Other geoset groups (hair, chest, etc.) still require explicit enabling.
This fixes missing body parts while maintaining equipment filtering.
2026-02-05 23:35:28 -08:00
Kelsi
9c5e2fb93d Fix geoset filtering with expanded body range and debug logging
Expanded body part geoset range from 0-18 to 0-99 to cover all humanoid
submesh IDs. Added per-model debug logging to track submesh IDs and
geoset filtering behavior.
2026-02-05 23:33:28 -08:00
Kelsi
136dd0ac43 Disable NPC geoset filtering to fix missing body parts
Geoset filtering was incorrectly hiding NPC body parts because submesh
IDs don't match the expected geoset ID convention. Disabled until proper
mapping is implemented.
2026-02-05 23:29:10 -08:00
Kelsi
ec6c575894 Revert "Fix geoset filtering using correct geosetId from M2 batch"
This reverts commit 45048757ef.
2026-02-05 23:27:59 -08:00
Kelsi
45048757ef Fix geoset filtering using correct geosetId from M2 batch
M2 batches have a geosetIndex field that determines the geoset group for
filtering (0-18=body, 1xx=hair, etc.). We were incorrectly using submeshId
from the submesh struct instead. Now properly stores and uses geosetId.
2026-02-05 23:26:30 -08:00
Kelsi
3e50b1071d Fix character spawning at saved position instead of default preset
selectSpawnPreset() was always returning a preset (Goldshire by default),
overriding the saved character position. Now returns nullptr when no
WOW_SPAWN env var is set, allowing saved position to be used.
2026-02-05 23:24:52 -08:00
Kelsi
8cb38b91f9 Fix invisible NPC body parts caused by texture alpha
Character fragment shader was using texture alpha, which could be 0 in
baked NPC textures. Force alpha=1 for opaque character rendering.
2026-02-05 23:22:24 -08:00
Kelsi
3347a84656 Fix single-player position not loading on login
loadSinglePlayerCharacterState was updating the character struct but not
movementInfo, which startSinglePlayer uses for spawn position. Now sets
movementInfo.x/y/z/orientation from saved state.
2026-02-05 23:18:22 -08:00
Kelsi
9e3d12c0dc Fix NPC missing body parts by using baked textures as-is
Baked NPC textures already include complete appearance (skin, features,
armor). Equipment component textures are designed for player characters
with different UV layout and were causing body parts to disappear.
2026-02-05 23:15:57 -08:00
Kelsi
10ceb2b3a8 Add helmet model attachment and fix NPC textures
Load and attach helmet M2 models to humanoid NPCs from ItemDisplayInfo.dbc.
Revert equipment texture compositing since baked NPC textures are 256x256
(incompatible with 512x512 region system). Add debug logging for equipment
display IDs.
2026-02-05 23:05:35 -08:00
Kelsi
9083eec974 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
09cec89f6c Add hair textures and geosets for humanoid NPCs
Set correct hair style and facial hair geosets based on CreatureDisplayInfoExtra.
Load hair textures from CharSections.dbc using race, sex, hairStyleId, and
hairColorId for proper hair coloring on humanoid NPCs.
2026-02-05 22:54:47 -08:00
Kelsi
0d11886dee 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
c28376e193 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
a4fcc38c12 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
9c8b202595 Add ZLIB linking and file logging support
- Add ZLIB find_package and linking for addon compression
- Add file logging to logs/wowee.log
2026-02-05 21:03:27 -08:00
Kelsi
82a44659b4 Fix world server authentication for AzerothCore
- Use 6-byte CMSG header (uint16 size + uint32 opcode) for client-to-server
- Enable RC4 encryption immediately after sending AUTH_SESSION
- Encrypt all 6 header bytes to match AzerothCore expectations
- Add 8-byte addon info (addonCount + clientTime) for proper parsing
- Fix CharCreateResult enum to use correct WoW 3.3.5a response codes
- Add CHAR_NAME_* error codes for name validation messages
- Allow character list refresh from CHAR_LIST_RECEIVED state
2026-02-05 21:03:11 -08:00
Kelsi
b2a1fbc42c Clamp facial hair using DBC 2026-02-05 18:38:12 -08:00
Kelsi
85e73a2f24 Reduce wall pushback and WMO camera distance 2026-02-05 18:29:54 -08:00
Kelsi
b2f2ad76af Clear name error and trim input 2026-02-05 18:25:07 -08:00
Kelsi
50b2c43319 Tune wall collision for stairs and reduce camera distance in WMOs
Skip short vertical surfaces (stair risers) to allow climbing stairs.
Reduce WMO interior max camera zoom to 8 units and soften wall pushback.
2026-02-05 18:23:29 -08:00
Kelsi
6f2d9174c9 Clamp character appearance using DBC ranges 2026-02-05 18:22:11 -08:00
Kelsi
0f996a26f5 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
c1b998534f Use auth username for world connection 2026-02-05 18:18:15 -08:00
Kelsi
e8b0a0256d Ignore single-player saves 2026-02-05 18:14:54 -08:00
Kelsi
9511d051e2 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
5401683a8d Add one-time spawn camera pan 2026-02-05 18:06:52 -08:00
Kelsi
8bd60c3320 Increase wall collision sweep steps to prevent clipping 2026-02-05 18:02:41 -08:00
Kelsi
f3f97cf9de 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
f1bdf0bb67 Add missing includes for audio and camera controller 2026-02-05 17:55:30 -08:00
Kelsi
3ef0f8c2f1 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
e700c19394 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
bf6a5ba596 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
e768f5048c 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
d1e9bbeb1f Persist single-player settings and add defaults 2026-02-05 17:40:15 -08:00
Kelsi
76c4268ed8 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
1530900bc7 Add audio volume controls to settings 2026-02-05 17:32:21 -08:00
Kelsi
12a7604450 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
125cf588bb 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
a96ea0758c 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
44b03a06a0 Avoid hardcoded login video path 2026-02-05 16:26:45 -08:00
Kelsi
2613b09d2c Use updated loading screen images 2026-02-05 16:23:38 -08:00
Kelsi
dd28b647c4 Add back to game button on escape menu 2026-02-05 16:21:17 -08:00
Kelsi
ce1db3a331 Stop music on quit 2026-02-05 16:17:04 -08:00
Kelsi
26f91b032f Adjust settings UI and remove F4 shadows toggle 2026-02-05 16:16:03 -08:00
Kelsi
716393c059 Add shadows toggle and F4 hotkey 2026-02-05 16:14:11 -08:00