Merge pull request #27430 from LeonardMeagher2/csg_get_mesh_data

Apply proper offset to CSGMesh brush materials and smooth flags
This commit is contained in:
Rémi Verschelde 2019-04-01 17:15:30 +02:00 committed by GitHub
commit 18ee888541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -806,8 +806,8 @@ CSGBrush *CSGMesh::_build_brush() {
uvw[as + j + 1] = uv[1];
uvw[as + j + 2] = uv[2];
sw[j / 3] = !flat;
mw[j / 3] = mat;
sw[(as + j) / 3] = !flat;
mw[(as + j) / 3] = mat;
}
} else {
int as = vertices.size();
@ -849,8 +849,8 @@ CSGBrush *CSGMesh::_build_brush() {
uvw[as + j + 1] = uv[1];
uvw[as + j + 2] = uv[2];
sw[j / 3] = !flat;
mw[j / 3] = mat;
sw[(as + j) / 3] = !flat;
mw[(as + j) / 3] = mat;
}
}
}