Fix character geoset mapping and texture corruption on equipment change

Corrected CharGeosets group assignments verified via vertex bounding boxes:
- Group 4 (401+) = gloves/forearms, Group 5 (501+) = boots/shins,
  Group 8 (801+) = sleeves (chest-controlled), Group 9 = kneepads,
  Group 13 (1301+) = pants/trousers, Group 20 (2002) = bare feet
- Changed bare shin default from 501 to 502 for better width match
  with thigh mesh (0.39 vs 0.32, thighs are 0.42)
- Added clearCompositeCache() to prevent stale composite textures
  from being reused across equipment changes
- Fixed character preview geoset defaults to match corrected mapping
This commit is contained in:
Kelsi 2026-02-15 20:53:01 -08:00
parent 8a468e9533
commit ed6b305158
10 changed files with 424 additions and 169 deletions

View file

@ -183,6 +183,9 @@ struct M2Model {
std::vector<M2Sequence> sequences;
std::vector<uint32_t> globalSequenceDurations; // Per-global-sequence loop durations (ms)
// Bone lookup table (vertex bone indices reference this to get global bone index)
std::vector<uint16_t> boneLookupTable;
// Rendering
std::vector<M2Batch> batches;
std::vector<M2Texture> textures;