From e39fa9bff83d77cf696aa0cb86c77434a5aeccd7 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Mon, 25 Feb 2013 12:03:23 +1030 Subject: [PATCH] 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 --- qbsp/portals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qbsp/portals.c b/qbsp/portals.c index c5fbaa1e..9f9d8087 100644 --- a/qbsp/portals.c +++ b/qbsp/portals.c @@ -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);