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

Function ClearCombinePortals

editor/editor_lighting.cpp:301–319  ·  view source on GitHub ↗

Simply clears flags for combine portals

Source from the content-addressed store, hash-verified

299
300// Simply clears flags for combine portals
301void ClearCombinePortals(int terrain) {
302 for (int i = 0; i <= Highest_room_index; i++) {
303 room *rp = &Rooms[i];
304
305 if (!rp->used)
306 continue;
307
308 if (terrain && !(rp->flags & RF_EXTERNAL))
309 continue;
310
311 if (!terrain && (rp->flags & RF_EXTERNAL))
312 continue;
313
314 for (int t = 0; t < rp->num_portals; t++) {
315 portal *portal_a = &rp->portals[t];
316 portal_a->flags &= ~PF_COMBINED;
317 }
318 }
319}
320
321// For rendering...combines all portals if they are on the same plane
322void CheckCombinePortals(int terrain) {

Callers 1

CheckCombinePortalsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected