|
|
|
@ -39,6 +39,7 @@
|
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
#include "../mwbase/mechanicsmanager.hpp"
|
|
|
|
|
#include "../mwbase/soundmanager.hpp"
|
|
|
|
|
#include "../mwbase/windowmanager.hpp"
|
|
|
|
|
|
|
|
|
|
#include "camera.hpp"
|
|
|
|
|
#include "rotatecontroller.hpp"
|
|
|
|
@ -80,7 +81,7 @@ std::string getVampireHead(const std::string& race, bool female)
|
|
|
|
|
const ESM::BodyPart* bodyPart = sVampireMapping[thisCombination];
|
|
|
|
|
if (!bodyPart)
|
|
|
|
|
return std::string();
|
|
|
|
|
return "meshes\\" + bodyPart->mModel;
|
|
|
|
|
return MWBase::Environment::get().getWindowManager()->correctMeshPath(bodyPart->mModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -467,7 +468,7 @@ void NpcAnimation::updateNpcBase()
|
|
|
|
|
{
|
|
|
|
|
const ESM::BodyPart* bp = store.get<ESM::BodyPart>().search(headName);
|
|
|
|
|
if (bp)
|
|
|
|
|
mHeadModel = "meshes\\" + bp->mModel;
|
|
|
|
|
mHeadModel = MWBase::Environment::get().getWindowManager()->correctMeshPath(bp->mModel);
|
|
|
|
|
else
|
|
|
|
|
Log(Debug::Warning) << "Warning: Failed to load body part '" << headName << "'";
|
|
|
|
|
}
|
|
|
|
@ -476,7 +477,7 @@ void NpcAnimation::updateNpcBase()
|
|
|
|
|
{
|
|
|
|
|
const ESM::BodyPart* bp = store.get<ESM::BodyPart>().search(hairName);
|
|
|
|
|
if (bp)
|
|
|
|
|
mHairModel = "meshes\\" + bp->mModel;
|
|
|
|
|
mHairModel = MWBase::Environment::get().getWindowManager()->correctMeshPath(bp->mModel);
|
|
|
|
|
else
|
|
|
|
|
Log(Debug::Warning) << "Warning: Failed to load body part '" << hairName << "'";
|
|
|
|
|
}
|
|
|
|
@ -493,7 +494,8 @@ void NpcAnimation::updateNpcBase()
|
|
|
|
|
|
|
|
|
|
std::string smodel = defaultSkeleton;
|
|
|
|
|
if (!is1stPerson && !isWerewolf && !mNpc->mModel.empty())
|
|
|
|
|
smodel = Misc::ResourceHelpers::correctActorModelPath("meshes\\" + mNpc->mModel, mResourceSystem->getVFS());
|
|
|
|
|
smodel = Misc::ResourceHelpers::correctActorModelPath(
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->correctMeshPath(mNpc->mModel), mResourceSystem->getVFS());
|
|
|
|
|
|
|
|
|
|
setObjectRoot(smodel, true, true, false);
|
|
|
|
|
|
|
|
|
@ -653,8 +655,8 @@ void NpcAnimation::updateParts()
|
|
|
|
|
if(store != inv.end() && (part=*store).getType() == ESM::Light::sRecordId)
|
|
|
|
|
{
|
|
|
|
|
const ESM::Light *light = part.get<ESM::Light>()->mBase;
|
|
|
|
|
addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft,
|
|
|
|
|
1, "meshes\\"+light->mModel, false, nullptr, true);
|
|
|
|
|
addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->correctMeshPath(light->mModel), false, nullptr, true);
|
|
|
|
|
if (mObjectParts[ESM::PRT_Shield])
|
|
|
|
|
addExtraLight(mObjectParts[ESM::PRT_Shield]->getNode()->asGroup(), light);
|
|
|
|
|
}
|
|
|
|
@ -674,7 +676,7 @@ void NpcAnimation::updateParts()
|
|
|
|
|
const ESM::BodyPart* bodypart = parts[part];
|
|
|
|
|
if(bodypart)
|
|
|
|
|
addOrReplaceIndividualPart((ESM::PartReferenceType)part, -1, 1,
|
|
|
|
|
"meshes\\"+bodypart->mModel);
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->correctMeshPath(bodypart->mModel));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -904,7 +906,8 @@ void NpcAnimation::addPartGroup(int group, int priority, const std::vector<ESM::
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(bodypart)
|
|
|
|
|
addOrReplaceIndividualPart((ESM::PartReferenceType)part.mPart, group, priority, "meshes\\"+bodypart->mModel, enchantedGlow, glowColor);
|
|
|
|
|
addOrReplaceIndividualPart((ESM::PartReferenceType)part.mPart, group, priority,
|
|
|
|
|
MWBase::Environment::get().getWindowManager()->correctMeshPath(bodypart->mModel), enchantedGlow, glowColor);
|
|
|
|
|
else
|
|
|
|
|
reserveIndividualPart((ESM::PartReferenceType)part.mPart, group, priority);
|
|
|
|
|
}
|
|
|
|
|