Browse Source

egg2pg: Fix infinite recursion when `<Collide>` used with `<Line>`

Fixes #1515
rdb 2 years ago
parent
commit
787e14fade
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/egg2pg/eggLoader.cxx

+ 2 - 1
panda/src/egg2pg/eggLoader.cxx

@@ -2982,7 +2982,8 @@ make_collision_plane(EggGroup *egg_group, CollisionNode *cnode,
           cnode->add_solid(csplane);
           return;
         }
-      } else if ((*ci)->is_of_type(EggCompositePrimitive::get_class_type())) {
+      } else if ((*ci)->is_of_type(EggCompositePrimitive::get_class_type()) &&
+                !(*ci)->is_of_type(EggLine::get_class_type())) {
         EggCompositePrimitive *comp = DCAST(EggCompositePrimitive, *ci);
         PT(EggGroup) temp_group = new EggGroup;
         if (comp->triangulate_into(temp_group)) {