mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: enable NPC helmet attachments with fallback logic for missing attachment points
Add fallback logic to use bone 0 for head attachment point (ID 11) when models don't have it explicitly defined. This improves helmet rendering compatibility on humanoid NPC models that lack explicit attachment 11 definitions. Re-enable helmet attachments now that the fallback logic is in place.
This commit is contained in:
parent
176b8bdc3d
commit
0d002c9070
2 changed files with 13 additions and 4 deletions
|
|
@ -6142,9 +6142,10 @@ void Application::spawnOnlineCreature(uint64_t guid, uint32_t displayId, float x
|
|||
" sleeves=", geosetSleeves, " pants=", geosetPants,
|
||||
" boots=", geosetBoots, " gloves=", geosetGloves);
|
||||
|
||||
// TODO(#helmet-attach): NPC helmet attachment anchors are currently unreliable
|
||||
// on some humanoid models (floating/incorrect bone bind). Keep hidden for now.
|
||||
static constexpr bool kEnableNpcHelmetAttachmentsMainPath = false;
|
||||
// NOTE: NPC helmet attachment with fallback logic to use bone 0 if attachment
|
||||
// point 11 is missing. This improves compatibility with models that don't have
|
||||
// attachment 11 explicitly defined.
|
||||
static constexpr bool kEnableNpcHelmetAttachmentsMainPath = true;
|
||||
// Load and attach helmet model if equipped
|
||||
if (kEnableNpcHelmetAttachmentsMainPath && extra.equipDisplayId[0] != 0 && itemDisplayDbc) {
|
||||
int32_t helmIdx = itemDisplayDbc->findRecordById(extra.equipDisplayId[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue