mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 08:41:35 +00:00
Don't add custom anim source if it's a default animation but keep the skeleton
This commit is contained in:
parent
03c791e61a
commit
ef4e5b45e3
1 changed files with 9 additions and 11 deletions
|
@ -492,15 +492,11 @@ namespace MWRender
|
||||||
getActorSkeleton(is1stPerson, isFemale, isBeast, isWerewolf), mResourceSystem->getVFS());
|
getActorSkeleton(is1stPerson, isFemale, isBeast, isWerewolf), mResourceSystem->getVFS());
|
||||||
|
|
||||||
std::string smodel = defaultSkeleton;
|
std::string smodel = defaultSkeleton;
|
||||||
|
bool isBase = !isWerewolf;
|
||||||
if (!is1stPerson && !isWerewolf && !mNpc->mModel.empty())
|
if (!is1stPerson && !isWerewolf && !mNpc->mModel.empty())
|
||||||
{
|
{
|
||||||
// TESCS sometimes writes the default animation nif to the animation subrecord. This harmless (as it
|
|
||||||
// will match the NPC's race) until the NPC's race is changed. If the player record contains a default
|
|
||||||
// non-beast race animation and the player selects a beast race in chargen, animations aren't applied
|
|
||||||
// properly. Morrowind.exe appears to handle an NPC using any of the base animations as not having custom
|
|
||||||
// animations.
|
|
||||||
std::string model = Misc::ResourceHelpers::correctMeshPath(mNpc->mModel);
|
std::string model = Misc::ResourceHelpers::correctMeshPath(mNpc->mModel);
|
||||||
if (!isDefaultActorSkeleton(model))
|
isBase = isDefaultActorSkeleton(model);
|
||||||
smodel = Misc::ResourceHelpers::correctActorModelPath(model, mResourceSystem->getVFS());
|
smodel = Misc::ResourceHelpers::correctActorModelPath(model, mResourceSystem->getVFS());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,12 +507,13 @@ namespace MWRender
|
||||||
if (!is1stPerson)
|
if (!is1stPerson)
|
||||||
{
|
{
|
||||||
const std::string& base = Settings::models().mXbaseanim;
|
const std::string& base = Settings::models().mXbaseanim;
|
||||||
if (smodel != base && !isWerewolf)
|
if (!isWerewolf)
|
||||||
addAnimSource(base, smodel);
|
addAnimSource(base, smodel);
|
||||||
|
|
||||||
if (smodel != defaultSkeleton && base != defaultSkeleton)
|
if (smodel != defaultSkeleton && base != defaultSkeleton)
|
||||||
addAnimSource(defaultSkeleton, smodel);
|
addAnimSource(defaultSkeleton, smodel);
|
||||||
|
|
||||||
|
if (!isBase)
|
||||||
addAnimSource(smodel, smodel);
|
addAnimSource(smodel, smodel);
|
||||||
|
|
||||||
if (!isWerewolf && isBeast && mNpc->mRace.contains("argonian"))
|
if (!isWerewolf && isBeast && mNpc->mRace.contains("argonian"))
|
||||||
|
@ -525,9 +522,10 @@ namespace MWRender
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const std::string& base = Settings::models().mXbaseanim1st;
|
const std::string& base = Settings::models().mXbaseanim1st;
|
||||||
if (smodel != base && !isWerewolf)
|
if (!isWerewolf)
|
||||||
addAnimSource(base, smodel);
|
addAnimSource(base, smodel);
|
||||||
|
|
||||||
|
if (!isBase)
|
||||||
addAnimSource(smodel, smodel);
|
addAnimSource(smodel, smodel);
|
||||||
|
|
||||||
mObjectRoot->setNodeMask(Mask_FirstPerson);
|
mObjectRoot->setNodeMask(Mask_FirstPerson);
|
||||||
|
|
Loading…
Reference in a new issue