From c0f1124dfe287b71a99cdc39ff4a006fb28d8347 Mon Sep 17 00:00:00 2001 From: Zachary Pavlov Date: Tue, 13 Oct 2009 18:19:18 +0000 Subject: [PATCH] aggresive flattening of certain nodes --- panda/src/pgraph/sceneGraphReducer.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/sceneGraphReducer.cxx b/panda/src/pgraph/sceneGraphReducer.cxx index bfdf007ee0..05588e084a 100644 --- a/panda/src/pgraph/sceneGraphReducer.cxx +++ b/panda/src/pgraph/sceneGraphReducer.cxx @@ -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; }