aggresive flattening of certain nodes

This commit is contained in:
Zachary Pavlov 2009-10-13 18:19:18 +00:00
parent ae0ced7c2c
commit c0f1124dfe

View File

@ -773,7 +773,11 @@ do_flatten_siblings(PandaNode *parent_node, PandaNode *child1,
////////////////////////////////////////////////////////////////////
PT(PandaNode) SceneGraphReducer::
collapse_nodes(PandaNode *node1, PandaNode *node2, bool siblings) {
return node2->combine_with(node1);
PT(PandaNode) result = node2->combine_with(node1);
if (result == NULL) {
result = node1->combine_with(node2);
}
return result;
}