diff --git a/nif_attrs.h b/nif_attrs.h index 5323f010bbe87f0431e7e7adff4349e33fc3ab89..e12e44ac1774a90b7f4aa8b393e2e20bdc6150d0 100644 --- a/nif_attrs.h +++ b/nif_attrs.h @@ -1233,7 +1233,15 @@ public: flags = par->GetAttr("Flags")->asInt(); if ( (flags & 8) != 0 ) { - return par; + // extra check: skeleton root cannot be a bone (this fixes the BabelFish.nif problem) + int par_is_bone = false; + for ( vector<blk_ref>::const_iterator it = bones.begin(); it != bones.end(); ++it) { + if ( *it == par ) { + par_is_bone = true; + break; + }; + } + if ( ! par_is_bone ) return par; } }