mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Make use of ends_with for KF
This commit is contained in:
parent
e24db874dc
commit
6ff9b5d326
@ -609,7 +609,7 @@ namespace MWRender
|
|||||||
{
|
{
|
||||||
std::string kfname = Misc::StringUtils::lowerCase(model);
|
std::string kfname = Misc::StringUtils::lowerCase(model);
|
||||||
|
|
||||||
if (kfname.size() > 4 && kfname.compare(kfname.size() - 4, 4, ".nif") == 0)
|
if (kfname.ends_with(".nif"))
|
||||||
kfname.replace(kfname.size() - 4, 4, ".kf");
|
kfname.replace(kfname.size() - 4, 4, ".kf");
|
||||||
|
|
||||||
addSingleAnimSource(kfname, baseModel);
|
addSingleAnimSource(kfname, baseModel);
|
||||||
|
@ -135,7 +135,7 @@ std::string Misc::ResourceHelpers::correctActorModelPath(const std::string& resP
|
|||||||
else
|
else
|
||||||
mdlname.insert(mdlname.begin(), 'x');
|
mdlname.insert(mdlname.begin(), 'x');
|
||||||
std::string kfname = mdlname;
|
std::string kfname = mdlname;
|
||||||
if (kfname.size() > 4 && kfname.compare(kfname.size() - 4, 4, ".nif") == 0)
|
if (kfname.ends_with(".nif"))
|
||||||
kfname.replace(kfname.size() - 4, 4, ".kf");
|
kfname.replace(kfname.size() - 4, 4, ".kf");
|
||||||
|
|
||||||
if (!vfs->exists(kfname))
|
if (!vfs->exists(kfname))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user