Push current work

This commit is contained in:
SirLynix
2022-05-04 12:50:05 +02:00
committed by Jérôme Leclercq
parent 85cd064171
commit e5e3026005
9 changed files with 653 additions and 580 deletions

View File

@@ -211,7 +211,16 @@ namespace Nz
{
NAZARA_USE_ANONYMOUS_NAMESPACE
Unmount(s_pluginFiles[UnderlyingCast(plugin)]);
std::filesystem::path pluginName = s_pluginFiles[UnderlyingCast(plugin)];
#ifdef NAZARA_DEBUG
std::filesystem::path debugPath = pluginName;
debugPath += "-d";
Unmount(debugPath);
#endif
Unmount(pluginName);
}
/*!
@@ -233,7 +242,14 @@ namespace Nz
return;
}
std::filesystem::path canonicalPath = std::filesystem::canonical(pluginPath);
std::filesystem::path path = pluginPath;
if (path.extension() != NAZARA_DYNLIB_EXTENSION)
path += NAZARA_DYNLIB_EXTENSION;
if (!std::filesystem::exists(path))
return;
std::filesystem::path canonicalPath = std::filesystem::canonical(path);
auto it = s_plugins.find(canonicalPath);
if (it == s_plugins.end())
{

View File

@@ -34,6 +34,12 @@ namespace Nz
return false;
}
if (!skeleton)
{
NazaraError("You must set a valid skeleton to load an animation");
return false;
}
return true;
}

View File

@@ -140,7 +140,8 @@ namespace Nz
UpdateJointMap();
auto it = m_impl->jointMap.find(jointName);
NazaraAssert(it != m_impl->jointMap.end(), "joint not found");
if (it == m_impl->jointMap.end())
return InvalidJointIndex;
return it->second;
}