mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-15 01:21:45 +00:00
Merged pull request #1796
This commit is contained in:
commit
5080a65910
2 changed files with 9 additions and 9 deletions
|
@ -64,6 +64,7 @@
|
||||||
Bug #4491: Training cap based off Base Skill instead of Modified Skill
|
Bug #4491: Training cap based off Base Skill instead of Modified Skill
|
||||||
Bug #4495: Crossbow animations blending is buggy
|
Bug #4495: Crossbow animations blending is buggy
|
||||||
Bug #4496: SpellTurnLeft and SpellTurnRight animation groups are unused
|
Bug #4496: SpellTurnLeft and SpellTurnRight animation groups are unused
|
||||||
|
Bug #4497: File names starting with x or X are not classified as animation
|
||||||
Bug #3249: Fixed revert function not updating views properly
|
Bug #3249: Fixed revert function not updating views properly
|
||||||
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
||||||
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
|
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
|
||||||
|
|
|
@ -34,6 +34,13 @@ btVector3 getbtVector(const osg::Vec3f &v)
|
||||||
return btVector3(v.x(), v.y(), v.z());
|
return btVector3(v.x(), v.y(), v.z());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool pathFileNameStartsWithX(const std::string& path)
|
||||||
|
{
|
||||||
|
const std::size_t slashpos = path.find_last_of("/\\");
|
||||||
|
const std::size_t letterPos = slashpos == std::string::npos ? 0 : slashpos + 1;
|
||||||
|
return letterPos < path.size() && (path[letterPos] == 'x' || path[letterPos] == 'X');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace NifBullet
|
namespace NifBullet
|
||||||
|
@ -88,18 +95,10 @@ osg::ref_ptr<Resource::BulletShape> BulletNifLoader::load(const Nif::NIFFilePtr&
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool autogenerated = hasAutoGeneratedCollision(node);
|
bool autogenerated = hasAutoGeneratedCollision(node);
|
||||||
bool isAnimated = false;
|
|
||||||
|
|
||||||
// files with the name convention xmodel.nif usually have keyframes stored in a separate file xmodel.kf (see Animation::addAnimSource).
|
// files with the name convention xmodel.nif usually have keyframes stored in a separate file xmodel.kf (see Animation::addAnimSource).
|
||||||
// assume all nodes in the file will be animated
|
// assume all nodes in the file will be animated
|
||||||
std::string filename = nif->getFilename();
|
const bool isAnimated = pathFileNameStartsWithX(nif->getFilename());
|
||||||
size_t slashpos = filename.find_last_of("/\\");
|
|
||||||
if (slashpos == std::string::npos)
|
|
||||||
slashpos = 0;
|
|
||||||
if (slashpos+1 < filename.size() && (filename[slashpos+1] == 'x' || filename[slashpos+1] == 'X'))
|
|
||||||
{
|
|
||||||
isAnimated = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
handleNode(node, 0, autogenerated, isAnimated, autogenerated);
|
handleNode(node, 0, autogenerated, isAnimated, autogenerated);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue