It looks to me that LoadB3D just figures out on its own that a mesh is animated, so why is there a LoadAnimMesh function? Is this just for historical reasons?
I also find kind of weird the extra stuff in LoadMesh, below where it gets the mesh from LoadAnimMesh.
Local mesh:TMesh=TMesh(ent).CollapseAnimMesh()
ent.FreeEntity()
mesh.class:String="Mesh"
mesh.AddParent(parent_ent:TEntity)
mesh.EntityListAdd(entity_list)
' update matrix
If mesh.parent<>Null
mesh.mat.Overwrite(mesh.parent.mat)
mesh.UpdateMat()
Else
mesh.UpdateMat(True)
EndIf
Return mesh Does this have something magical to do with loading a still mesh that cannot happen with an animated mesh? Why does mesh.AddParent(parent_ent:TEntity) happen when that is already dealt with in the mesh loader? (Can we make things easier for the loader and just do it in LoadMesh?)
ent.FreeEntity() Wha?
Just a tad confused :)
|