mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-04 08:23:50 +00:00
fix(rendering): filter player hair geosets via CharHairGeosets.dbc
buildDefaultPlayerGeosets() was inserting all submeshIds 0-99 into activeGeosets, showing every hair variation simultaneously. Now uses the hairGeosetMap_ (from CharHairGeosets.dbc) to select only the correct hair scalp geoset for the player's race/sex/style, matching the existing NPC geoset filtering logic in EntitySpawner.
This commit is contained in:
parent
5468a93f2e
commit
f79395788a
3 changed files with 62 additions and 11 deletions
|
|
@ -3707,14 +3707,18 @@ void Application::spawnPlayerCharacter() {
|
|||
// Build default geosets for the active character via AppearanceComposer
|
||||
uint8_t hairStyleId = 0;
|
||||
uint8_t facialId = 0;
|
||||
uint8_t raceId = 0;
|
||||
uint8_t sexId = 0;
|
||||
if (gameHandler) {
|
||||
if (const game::Character* ch = gameHandler->getActiveCharacter()) {
|
||||
hairStyleId = static_cast<uint8_t>((ch->appearanceBytes >> 16) & 0xFF);
|
||||
facialId = ch->facialFeatures;
|
||||
raceId = static_cast<uint8_t>(ch->race);
|
||||
sexId = static_cast<uint8_t>(ch->gender);
|
||||
}
|
||||
}
|
||||
auto activeGeosets = appearanceComposer_
|
||||
? appearanceComposer_->buildDefaultPlayerGeosets(hairStyleId, facialId)
|
||||
? appearanceComposer_->buildDefaultPlayerGeosets(raceId, sexId, hairStyleId, facialId)
|
||||
: std::unordered_set<uint16_t>{};
|
||||
charRenderer->setActiveGeosets(instanceId, activeGeosets);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue