diff --git a/panda/src/bullet/bulletHelper.cxx b/panda/src/bullet/bulletHelper.cxx index c5b591bba3..61927dc24b 100644 --- a/panda/src/bullet/bulletHelper.cxx +++ b/panda/src/bullet/bulletHelper.cxx @@ -220,9 +220,11 @@ make_geom(BulletSoftBodyNode *node, const GeomVertexFormat *format, bool two_sid if (two_sided) { for (int j=0; jm_faces); prim = new GeomTriangles(Geom::UH_stream); prim->set_shade_model(Geom::SM_uniform); for (int j=0; jadd_vertices(int(faces[j].m_n[0] - node0), - int(faces[j].m_n[1] - node0), - int(faces[j].m_n[2] - node0)); + i0 = int(faces[j].m_n[0] - node0); + i1 = int(faces[j].m_n[1] - node0); + i2 = int(faces[j].m_n[2] - node0); + + prim->add_vertices(i0, i1, i2); prim->close_primitive(); if (two_sided) { - prim->add_vertices(nodes.size() + int(faces[j].m_n[0] - node0), - nodes.size() + int(faces[j].m_n[2] - node0), - nodes.size() + int(faces[j].m_n[1] - node0)); + i0 = nodes.size() + int(faces[j].m_n[0] - node0); + i1 = nodes.size() + int(faces[j].m_n[2] - node0); + i2 = nodes.size() + int(faces[j].m_n[1] - node0); + + prim->add_vertices(i0, i1, i2); prim->close_primitive(); } } @@ -259,8 +267,10 @@ make_geom(BulletSoftBodyNode *node, const GeomVertexFormat *format, bool two_sid prim->set_shade_model(Geom::SM_uniform); for (int j=0; jadd_vertices(int(links[j].m_n[0] - node0), - int(links[j].m_n[1] - node0)); + i0 = int(links[j].m_n[0] - node0); + i1 = int(links[j].m_n[1] - node0); + + prim->add_vertices(i0, i1); prim->close_primitive(); } } diff --git a/panda/src/bullet/bulletSoftBodyConfig.h b/panda/src/bullet/bulletSoftBodyConfig.h index 8f2d47f052..22505c8358 100644 --- a/panda/src/bullet/bulletSoftBodyConfig.h +++ b/panda/src/bullet/bulletSoftBodyConfig.h @@ -29,7 +29,7 @@ PUBLISHED: INLINE ~BulletSoftBodyConfig(); enum CollisionFlag { - CF_rigid__vs_soft_mask = 0x000f, // RVSmask: Rigid versus soft mask + CF_rigid_vs_soft_mask = 0x000f, // RVSmask: Rigid versus soft mask CF_sdf_rigid_soft = 0x0001, // SDF_RS: SDF based rigid vs soft CF_cluster_rigid_soft = 0x0002, // CL_RS: Cluster vs convex rigid vs soft CF_soft_vs_soft_mask = 0x0030, // SVSmask: Soft versus soft mask