From: <rj...@ma...> - 2008-10-13 06:07:34
|
Author: rjy Date: Mon Oct 13 08:07:26 2008 New Revision: 2890 Modified: trunk/prboom2/src/gl_main.c Log: gld_CarveFlats: Special case for trivial maps Modified: trunk/prboom2/src/gl_main.c ============================================================================== --- trunk/prboom2/src/gl_main.c (original) +++ trunk/prboom2/src/gl_main.c Mon Oct 13 08:07:26 2008 @@ -1127,7 +1127,9 @@ { // We have arrived at a subsector. The divline list contains all // the partition lines that carve out the subsector. - int ssidx = bspnode & (~NF_SUBSECTOR); + // special case for trivial maps (no nodes, single subsector) + int ssidx = (numnodes != 0) ? bspnode & (~NF_SUBSECTOR) : 0; + if (!sectorclosed[subsectors[ssidx].sector->iSectorID]) gld_FlatConvexCarver(ssidx, numdivlines, divlines); return; |