mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-26 05:13:50 +00:00
feat: render equipment on other players (helmets, weapons, belts, wrists)
Other players previously appeared partially naked — only chest, legs, feet, hands, cape, and tabard rendered. Now renders full equipment: - Helmet M2 model: loads from ItemDisplayInfo.dbc with race/gender suffix, attaches at head bone (point 0/11), hides hair geoset under helm - Weapons: mainhand (attachment 1) and offhand (attachment 2) M2 models loaded from ItemDisplayInfo, with Weapon/Shield path fallback - Wrist/bracer geoset (group 8): applies when no chest sleeve overrides - Belt/waist geoset (group 18): reads GeosetGroup1 from ItemDisplayInfo - Shoulder M2 attachments deferred (separate bone attachment system) Also applied same wrist/waist geosets to NPC and character preview paths. Minimap: batch 9 individual vkUpdateDescriptorSets into single call.
This commit is contained in:
parent
50a3eb7f07
commit
0396a42beb
3 changed files with 223 additions and 10 deletions
|
|
@ -623,11 +623,27 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
uint32_t gg = getGeosetGroup(did, 0);
|
||||
if (gg > 0) geosetGloves = static_cast<uint16_t>(401 + gg);
|
||||
}
|
||||
// Wrists/Bracers → group 8 (sleeves, only if chest/shirt didn't set it)
|
||||
{
|
||||
uint32_t did = findDisplayId({9});
|
||||
if (did != 0 && geosetSleeves == 801) {
|
||||
uint32_t gg = getGeosetGroup(did, 0);
|
||||
if (gg > 0) geosetSleeves = static_cast<uint16_t>(801 + gg);
|
||||
}
|
||||
}
|
||||
// Belt → group 18 (buckle)
|
||||
uint16_t geosetBelt = 0;
|
||||
{
|
||||
uint32_t did = findDisplayId({6});
|
||||
uint32_t gg = getGeosetGroup(did, 0);
|
||||
if (gg > 0) geosetBelt = static_cast<uint16_t>(1801 + gg);
|
||||
}
|
||||
|
||||
geosets.insert(geosetGloves);
|
||||
geosets.insert(geosetBoots);
|
||||
geosets.insert(geosetSleeves);
|
||||
geosets.insert(geosetPants);
|
||||
if (geosetBelt != 0) geosets.insert(geosetBelt);
|
||||
geosets.insert(hasInvType({16}) ? 1502 : 1501); // Cloak mesh toggle (visual may still be limited)
|
||||
if (hasInvType({19})) geosets.insert(1201); // Tabard mesh toggle
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "core/coordinates.hpp"
|
||||
#include "core/logger.hpp"
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
#include <cmath>
|
||||
|
||||
|
|
@ -380,7 +381,10 @@ VkTexture* Minimap::getOrLoadTileTexture(int tileX, int tileY) {
|
|||
// --------------------------------------------------------
|
||||
|
||||
void Minimap::updateTileDescriptors(uint32_t frameIdx, int centerTileX, int centerTileY) {
|
||||
constexpr int kTileCount = 9; // 3x3 grid
|
||||
VkDevice device = vkCtx->getDevice();
|
||||
std::array<VkDescriptorImageInfo, kTileCount> imgInfos{};
|
||||
std::array<VkWriteDescriptorSet, kTileCount> writes{};
|
||||
int slot = 0;
|
||||
|
||||
for (int dr = -1; dr <= 1; dr++) {
|
||||
|
|
@ -392,20 +396,20 @@ void Minimap::updateTileDescriptors(uint32_t frameIdx, int centerTileX, int cent
|
|||
if (!tileTex || !tileTex->isValid())
|
||||
tileTex = noDataTexture.get();
|
||||
|
||||
VkDescriptorImageInfo imgInfo = tileTex->descriptorInfo();
|
||||
imgInfos[slot] = tileTex->descriptorInfo();
|
||||
|
||||
VkWriteDescriptorSet write{};
|
||||
write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
|
||||
write.dstSet = tileDescSets[frameIdx][slot];
|
||||
write.dstBinding = 0;
|
||||
write.descriptorCount = 1;
|
||||
write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||
write.pImageInfo = &imgInfo;
|
||||
|
||||
vkUpdateDescriptorSets(device, 1, &write, 0, nullptr);
|
||||
writes[slot] = {};
|
||||
writes[slot].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
|
||||
writes[slot].dstSet = tileDescSets[frameIdx][slot];
|
||||
writes[slot].dstBinding = 0;
|
||||
writes[slot].descriptorCount = 1;
|
||||
writes[slot].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||
writes[slot].pImageInfo = &imgInfos[slot];
|
||||
slot++;
|
||||
}
|
||||
}
|
||||
|
||||
vkUpdateDescriptorSets(device, kTileCount, writes.data(), 0, nullptr);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue