qbsp: write a -1 terminator to each clustermap line

Kind of messy but necessary to either write the number of entries at the
start of the line or write a terminator for vis' fscanf style of parsing
to work easily on the .prt file. Writing a terminator is easier for the
way qbsp is currently set up, so do that.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-02-25 12:03:23 +10:30
parent 15ab7386ff
commit e39fa9bff8
1 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ WriteClusters_r(node_t *node, int viscluster)
/* If we're in the next cluster, start a new line */
if (node->viscluster != viscluster) {
fprintf(PortalFile, "\n");
fprintf(PortalFile, "-1\n");
viscluster++;
}
@ -250,7 +250,7 @@ WritePortalfile(node_t *headnode)
check = WriteClusters_r(headnode, 0);
if (check != num_visclusters - 1)
Error(errDetailClusterMismatch);
fprintf(PortalFile, "\n");
fprintf(PortalFile, "-1\n");
}
fclose(PortalFile);