From c69c8540eacdf60f1e48255822d5d06af115275a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 5 Sep 2003 21:05:05 +0000 Subject: [PATCH] Course writing fixes: * fix extra colon being written, causing mods to not read back in * fix showcourse and noshowcourse not being written correctly * don't write out -1 #LIVES and #METER * don't write #REPEAT:NO --- stepmania/src/Course.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index df3f19e3df..3ea496e22f 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -306,9 +306,12 @@ void Course::Save() } fprintf( fp, "#COURSE:%s;\n", m_sName.c_str() ); - fprintf( fp, "#REPEAT:%s;\n", m_bRepeat ? "YES" : "NO" ); - fprintf( fp, "#LIVES:%i;\n", m_iLives ); - fprintf( fp, "#METER:%i;\n", m_iMeter ); + if( m_bRepeat ) + fprintf( fp, "#REPEAT:YES;\n" ); + if( m_iLives != -1 ) + fprintf( fp, "#LIVES:%i;\n", m_iLives ); + if( m_iMeter != -1 ) + fprintf( fp, "#METER:%i;\n", m_iMeter ); for( unsigned i=0; i