MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DeleteAllConnectedFaces

Function DeleteAllConnectedFaces

editor/HRoom.cpp:3182–3201  ·  view source on GitHub ↗

Delete all the faces connected to the specified face

Source from the content-addressed store, hash-verified

3180
3181// Delete all the faces connected to the specified face
3182void DeleteAllConnectedFaces(room *rp, int facenum) {
3183 // Make sure no faces using tmap of -1
3184 for (int f = 0; f < rp->num_faces; f++)
3185 ASSERT(rp->faces[f].tmap != -1);
3186
3187 // Do recursive marking
3188 MarkFaceForDeletion(rp, facenum);
3189
3190 // Now delete the faces
3191 for (f = 0; f < rp->num_faces;) {
3192
3193 if (rp->faces[f].tmap == -1)
3194 DeleteRoomFace(rp, f);
3195 else
3196 f++;
3197 }
3198
3199 // Done
3200 World_changed = 1;
3201}
3202
3203// returns the number of faces changed
3204int PropagateToConnectedFacesSub(room *rp, int facenum, bool *face_checked) {

Callers 1

Calls 2

MarkFaceForDeletionFunction · 0.85
DeleteRoomFaceFunction · 0.85

Tested by

no test coverage detected