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

Fixes #1515
This commit is contained in:
rdb 2023-07-19 11:10:49 +02:00
parent 94ebd7c953
commit 787e14fade

View File

@ -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)) {