fix egg-emulate-bface to work properly with animated vertices

This commit is contained in:
David Rose 2007-01-16 17:33:46 +00:00
parent 1d90acbb20
commit 6f319873d3

View File

@ -1556,7 +1556,10 @@ emulate_bface(EggNode *egg_node) {
EggVertex dup_vertex(*vertex); EggVertex dup_vertex(*vertex);
dup_vertex.set_normal(-dup_vertex.get_normal()); dup_vertex.set_normal(-dup_vertex.get_normal());
EggVertex *new_vertex = vertex->get_pool()->create_unique_vertex(dup_vertex); EggVertex *new_vertex = vertex->get_pool()->create_unique_vertex(dup_vertex);
dup_poly->replace(vi, new_vertex); if (new_vertex != vertex) {
new_vertex->copy_grefs_from(*vertex);
dup_poly->replace(vi, new_vertex);
}
} }
} }
dup_prims->add_child(dup_poly); dup_prims->add_child(dup_poly);