independent slots for clothes, converted to .mesh workflow

This commit is contained in:
2026-02-16 09:44:00 +03:00
parent 01c1210b1b
commit be10abda16
15 changed files with 362 additions and 98 deletions

View File

@@ -2216,8 +2216,17 @@ bool editNPCs(nlohmann::json &npcs)
("Spawn##" + Ogre::StringConverter::toString(id))
.c_str())) {
int sex = npc["sex"].get<int>();
const char *models[] = { "normal-male.glb",
"normal-female.glb" };
struct desc {
const char *face, *hair, *top, *bottom, *feet;
};
struct desc models[] = {
{ "male_Face.mesh", "male_Hair001.mesh",
"male_BodyTop.mesh", "male_BodyBottom.mesh",
"male_BodyFeet.mesh" },
{ "normal-female.glb", "normal-female.glb",
"normal-female.glb", "normal-female.glb",
"normal-female.glb" }
};
Ogre::Vector3 npcPosition;
Ogre::Quaternion npcOrientation;
from_json(npc["position"], npcPosition);
@@ -2225,8 +2234,11 @@ bool editNPCs(nlohmann::json &npcs)
// FIXME: create TownCharacterManager and register NPCs through there
ECS::get_mut<CharacterManagerModule>()
.createCharacterData(models[sex], npcPosition,
npcOrientation);
.createCharacterData(
models[sex].face, models[sex].hair,
models[sex].top, models[sex].bottom,
models[sex].feet, npcPosition,
npcOrientation);
}
if (ImGui::SmallButton(
("Delete##" + Ogre::StringConverter::toString(id))