@ -203,7 +203,7 @@ void NiSkinInstance::post(NIFFile *nif)
root->makeRootBone(data->trafo);
for(int i=0; i<bnum; i++)
for(size_t i=0; i<bnum; i++)
{
if(!bones.has(i))
nif->fail("Oops: Missing bone! Don't know how to handle this.");
@ -149,7 +149,11 @@ struct NiNode : Node
effects.post(nif);
for(size_t i = 0;i < children.length();i++)
children[i].parent = this;
// Why would a unique list of children contain empty refs?
if(children.has(i))
}
};
@ -53,6 +53,7 @@ public:
// Store the index for later
index = nif->getInt();
assert(index >= -1);
/// Resolve index to pointer
@ -117,11 +118,10 @@ public:
bool has(size_t index)
assert(index >= 0 && index < static_cast<int> (list.size()));
return !list.at(index).empty();
int length()
size_t length()
{ return list.size(); }