BGE: Fix physics meshes conversion with modifiers.

Previously meshes with modifiers were considerate as empty (no polys).
This commit is contained in:
Porteries Tristan 2015-10-21 12:15:35 +02:00
parent 6bc0076102
commit 729e9651ac

@ -1870,9 +1870,11 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject *meshobj, DerivedMesh *dm,
if (!dm) {
free_dm = true;
dm = CDDM_from_mesh(meshobj->GetMesh());
DM_ensure_tessface(dm);
}
// Some meshes with modifiers returns 0 polys, call DM_ensure_tessface avoid this.
DM_ensure_tessface(dm);
MVert *mvert = dm->getVertArray(dm);
MFace *mface = dm->getTessFaceArray(dm);
numpolys = dm->getNumTessFaces(dm);