mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 02:45:32 +00:00
Move base_anim settings to settings-default.cfg
This commit is contained in:
parent
b164f1aa17
commit
3194520dcd
8 changed files with 49 additions and 26 deletions
|
@ -418,10 +418,10 @@ namespace MWClass
|
|||
{
|
||||
const MWWorld::LiveCellRef<ESM::NPC> *ref = ptr.get<ESM::NPC>();
|
||||
|
||||
std::string model = "meshes\\base_anim.nif";
|
||||
std::string model = Settings::Manager::getString("xbaseanim", "Models");
|
||||
const ESM::Race* race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(ref->mBase->mRace);
|
||||
if(race->mData.mFlags & ESM::Race::Beast)
|
||||
model = "meshes\\base_animkna.nif";
|
||||
model = Settings::Manager::getString("baseanimkna", "Models");
|
||||
|
||||
return model;
|
||||
}
|
||||
|
@ -431,12 +431,12 @@ namespace MWClass
|
|||
const MWWorld::LiveCellRef<ESM::NPC> *npc = ptr.get<ESM::NPC>();
|
||||
const ESM::Race* race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().search(npc->mBase->mRace);
|
||||
if(race && race->mData.mFlags & ESM::Race::Beast)
|
||||
models.emplace_back("meshes\\base_animkna.nif");
|
||||
models.emplace_back(Settings::Manager::getString("baseanimkna", "Models"));
|
||||
|
||||
// keep these always loaded just in case
|
||||
models.emplace_back("meshes/xargonian_swimkna.nif");
|
||||
models.emplace_back("meshes/xbase_anim_female.nif");
|
||||
models.emplace_back("meshes/xbase_anim.nif");
|
||||
models.emplace_back(Settings::Manager::getString("xargonianswimkna", "Models"));
|
||||
models.emplace_back(Settings::Manager::getString("xbaseanimfemale", "Models"));
|
||||
models.emplace_back(Settings::Manager::getString("xbaseanim", "Models"));
|
||||
|
||||
if (!npc->mBase->mModel.empty())
|
||||
models.push_back("meshes/"+npc->mBase->mModel);
|
||||
|
|
|
@ -1500,7 +1500,7 @@ namespace MWRender
|
|||
MWWorld::LiveCellRef<ESM::Creature> *ref = mPtr.get<ESM::Creature>();
|
||||
if(ref->mBase->mFlags & ESM::Creature::Bipedal)
|
||||
{
|
||||
defaultSkeleton = "meshes\\xbase_anim.nif";
|
||||
defaultSkeleton = Settings::Manager::getString("xbaseanim", "Models");
|
||||
inject = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <components/sceneutil/visitor.hpp>
|
||||
#include <components/sceneutil/positionattitudetransform.hpp>
|
||||
#include <components/sceneutil/skeleton.hpp>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/misc/stringops.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -35,7 +35,7 @@ CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr,
|
|||
setObjectRoot(model, false, false, true);
|
||||
|
||||
if((ref->mBase->mFlags&ESM::Creature::Bipedal))
|
||||
addAnimSource("meshes\\xbase_anim.nif", model);
|
||||
addAnimSource(Settings::Manager::getString("xbaseanim", "Models"), model);
|
||||
addAnimSource(model, model);
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ CreatureWeaponAnimation::CreatureWeaponAnimation(const MWWorld::Ptr &ptr, const
|
|||
|
||||
if((ref->mBase->mFlags&ESM::Creature::Bipedal))
|
||||
{
|
||||
addAnimSource("meshes\\xbase_anim.nif", model);
|
||||
addAnimSource(Settings::Manager::getString("xbaseanim", "Models"), model);
|
||||
}
|
||||
addAnimSource(model, model);
|
||||
|
||||
|
|
|
@ -524,7 +524,7 @@ void NpcAnimation::updateNpcBase()
|
|||
|
||||
if(!is1stPerson)
|
||||
{
|
||||
const std::string base = "meshes\\xbase_anim.nif";
|
||||
const std::string base = Settings::Manager::getString("xbaseanim", "Models");
|
||||
if (smodel != base && !isWerewolf)
|
||||
addAnimSource(base, smodel);
|
||||
|
||||
|
@ -538,7 +538,7 @@ void NpcAnimation::updateNpcBase()
|
|||
}
|
||||
else
|
||||
{
|
||||
const std::string base = "meshes\\xbase_anim.1st.nif";
|
||||
const std::string base = Settings::Manager::getString("xbaseanim1st", "Models");
|
||||
if (smodel != base && !isWerewolf)
|
||||
addAnimSource(base, smodel);
|
||||
|
||||
|
|
|
@ -456,12 +456,15 @@ namespace MWRender
|
|||
mSky->listAssetsToPreload(workItem->mModels, workItem->mTextures);
|
||||
mWater->listAssetsToPreload(workItem->mTextures);
|
||||
|
||||
const char* basemodels[] = {"xbase_anim", "xbase_anim.1st", "xbase_anim_female", "xbase_animkna"};
|
||||
for (size_t i=0; i<sizeof(basemodels)/sizeof(basemodels[0]); ++i)
|
||||
{
|
||||
workItem->mModels.push_back(std::string("meshes/") + basemodels[i] + ".nif");
|
||||
workItem->mKeyframes.push_back(std::string("meshes/") + basemodels[i] + ".kf");
|
||||
}
|
||||
workItem->mModels.push_back(Settings::Manager::getString("xbaseanim", "Models"));
|
||||
workItem->mModels.push_back(Settings::Manager::getString("xbaseanim1st", "Models"));
|
||||
workItem->mModels.push_back(Settings::Manager::getString("xbaseanimfemale", "Models"));
|
||||
workItem->mModels.push_back(Settings::Manager::getString("xargonianswimkna", "Models"));
|
||||
|
||||
workItem->mKeyframes.push_back(Settings::Manager::getString("xbaseanimkf", "Models"));
|
||||
workItem->mKeyframes.push_back(Settings::Manager::getString("xbaseanim1stkf", "Models"));
|
||||
workItem->mKeyframes.push_back(Settings::Manager::getString("xbaseanimfemalekf", "Models"));
|
||||
workItem->mKeyframes.push_back(Settings::Manager::getString("xargonianswimknakf", "Models"));
|
||||
|
||||
workItem->mTextures.emplace_back("textures/_land_default.dds");
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <components/sceneutil/controller.hpp>
|
||||
#include <components/sceneutil/optimizer.hpp>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#include <components/shader/shadervisitor.hpp>
|
||||
#include <components/shader/shadermanager.hpp>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "actorutil.hpp"
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
namespace SceneUtil
|
||||
{
|
||||
std::string getActorSkeleton(bool firstPerson, bool isFemale, bool isBeast, bool isWerewolf)
|
||||
|
@ -7,24 +9,24 @@ namespace SceneUtil
|
|||
if (!firstPerson)
|
||||
{
|
||||
if (isWerewolf)
|
||||
return "meshes\\wolf\\skin.nif";
|
||||
return Settings::Manager::getString("wolfskin", "Models");
|
||||
else if (isBeast)
|
||||
return "meshes\\base_animkna.nif";
|
||||
return Settings::Manager::getString("baseanimkna", "Models");
|
||||
else if (isFemale)
|
||||
return "meshes\\base_anim_female.nif";
|
||||
return Settings::Manager::getString("baseanimfemale", "Models");
|
||||
else
|
||||
return "meshes\\base_anim.nif";
|
||||
return Settings::Manager::getString("baseanim", "Models");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isWerewolf)
|
||||
return "meshes\\wolf\\skin.1st.nif";
|
||||
return Settings::Manager::getString("wolfskin1st", "Models");
|
||||
else if (isBeast)
|
||||
return "meshes\\base_animkna.1st.nif";
|
||||
return Settings::Manager::getString("baseanimkna1st", "Models");
|
||||
else if (isFemale)
|
||||
return "meshes\\base_anim_female.1st.nif";
|
||||
return Settings::Manager::getString("baseanimfemale1st", "Models");
|
||||
else
|
||||
return "meshes\\base_anim.1st.nif";
|
||||
return Settings::Manager::getString("xbaseanim1st", "Models");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -969,3 +969,19 @@ distance = 1
|
|||
|
||||
# A minimum size of groundcover chunk in cells (0.125, 0.25, 0.5, 1.0)
|
||||
min chunk size = 0.5
|
||||
|
||||
xbaseanim = meshes\xbase_anim.nif
|
||||
baseanim = meshes\base_anim.nif
|
||||
xbaseanim1st = meshes\xbase_anim.1st.nif
|
||||
baseanimkna = meshes\base_animkna.nif
|
||||
baseanimkna1st = meshes\base_animkna.1st.nif
|
||||
xbaseanimfemale = meshes/xbase_anim_female.nif
|
||||
baseanimfemale = meshes/base_anim_female.nif
|
||||
baseanimfemale1st = meshes\base_anim_female.1st.nif
|
||||
wolfskin = meshes\wolf\skin.nif
|
||||
wolfskin1st = meshes\wolf\skin.1st.nif
|
||||
xargonianswimkna = meshes/xargonian_swimkna.nif
|
||||
xbaseanimkf = meshes\xbase_anim.kf
|
||||
xbaseanim1stkf = meshes\xbase_anim.1st.kf
|
||||
xbaseanimfemalekf = meshes/xbase_anim_female.kf
|
||||
xargonianswimknakf = meshes/xargonian_swimkna.kf
|
||||
|
|
Loading…
Reference in a new issue