Commit d65af1e5 authored by hybrid's avatar hybrid

Also try to load a skeleton if no skeleton link was given.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2831 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 98ef47c1
......@@ -203,6 +203,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent
os::Printer::log("Read Object Chunk");
#endif
readBool(file, parent, mesh.SkeletalAnimation);
bool skeleton_loaded=false;
while ((parent.read < parent.header.length)&&(file->getPos() < file->getSize()))
{
ChunkData data;
......@@ -237,6 +238,7 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent
core::stringc name;
readString(file, data, name);
loadSkeleton(file, name);
skeleton_loaded=true;
}
break;
case COGRE_BONE_ASSIGNMENT:
......@@ -258,6 +260,8 @@ bool COgreMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData& parent
}
parent.read += data.read;
}
if (!skeleton_loaded)
loadSkeleton(file, FileSystem->getFileBasename(file->getFileName(), false));
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment