mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 21:15:36 +00:00
Forbid to use toNormalized for normalized path
This commit is contained in:
parent
4a911a647d
commit
630e815f66
3 changed files with 7 additions and 5 deletions
|
@ -131,8 +131,7 @@ namespace NavMeshTool
|
||||||
osg::ref_ptr<const Resource::BulletShape> shape = [&] {
|
osg::ref_ptr<const Resource::BulletShape> shape = [&] {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return bulletShapeManager.getShape(
|
return bulletShapeManager.getShape(Misc::ResourceHelpers::correctMeshPath(model));
|
||||||
VFS::Path::toNormalized(Misc::ResourceHelpers::correctMeshPath(model)));
|
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -571,7 +571,7 @@ namespace MWPhysics
|
||||||
{
|
{
|
||||||
if (animationMesh != mesh)
|
if (animationMesh != mesh)
|
||||||
{
|
{
|
||||||
shape = mShapeManager->getShape(VFS::Path::toNormalized(mesh));
|
shape = mShapeManager->getShape(mesh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,8 +591,7 @@ namespace MWPhysics
|
||||||
int PhysicsSystem::addProjectile(
|
int PhysicsSystem::addProjectile(
|
||||||
const MWWorld::Ptr& caster, const osg::Vec3f& position, VFS::Path::NormalizedView mesh, bool computeRadius)
|
const MWWorld::Ptr& caster, const osg::Vec3f& position, VFS::Path::NormalizedView mesh, bool computeRadius)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<Resource::BulletShapeInstance> shapeInstance
|
osg::ref_ptr<Resource::BulletShapeInstance> shapeInstance = mShapeManager->getInstance(mesh);
|
||||||
= mShapeManager->getInstance(VFS::Path::toNormalized(mesh));
|
|
||||||
assert(shapeInstance);
|
assert(shapeInstance);
|
||||||
float radius = computeRadius ? shapeInstance->mCollisionBox.mExtents.length() / 2.f : 1.f;
|
float radius = computeRadius ? shapeInstance->mCollisionBox.mExtents.length() / 2.f : 1.f;
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,10 @@ namespace VFS::Path
|
||||||
{
|
{
|
||||||
return Normalized(std::forward<T>(value));
|
return Normalized(std::forward<T>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Normalized toNormalized(NormalizedView value) = delete;
|
||||||
|
|
||||||
|
Normalized toNormalized(Normalized value) = delete;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue