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

Function CheckForBadFaces

editor/editor_lighting.cpp:829–847  ·  view source on GitHub ↗

Returns 0 if there are bad faces in this level

Source from the content-addressed store, hash-verified

827
828// Returns 0 if there are bad faces in this level
829int CheckForBadFaces(int roomnum) {
830 int i, t;
831
832 for (i = 0; i <= Highest_room_index; i++) {
833 if (roomnum != -1 && i != roomnum)
834 continue;
835
836 room *rp = &Rooms[i];
837 if (!rp->used)
838 continue;
839
840 for (t = 0; t < rp->num_faces; t++) {
841 if (rp->faces[t].num_verts < 3)
842 return 0; // Bad face detected!
843 }
844 }
845
846 return 1;
847}
848
849// Calculates radiosity and sets lightmaps for indoor faces only
850void DoRadiosityForRooms() {

Callers 2

DoRadiosityForRoomsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected