From c18f1141618c7b75cd9e17aed5f38c6585a0a156 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 21 Mar 2004 18:24:52 +0000 Subject: [PATCH] don't add an empty attack --- stepmania/src/Course.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 3e2fc9bde1..7e1874431c 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -1041,13 +1041,16 @@ void Course::UpdateCourseStats() void Course::Info::GetAttackArray( AttackArray &out ) const { - Attack a; - a.fStartSecond = 0; - a.fSecsRemaining = 10000; /* whole song */ - a.level = ATTACK_LEVEL_1; - a.sModifier = Modifiers; + if( !Modifiers.empty() ) + { + Attack a; + a.fStartSecond = 0; + a.fSecsRemaining = 10000; /* whole song */ + a.level = ATTACK_LEVEL_1; + a.sModifier = Modifiers; - out.push_back( a ); + out.push_back( a ); + } out.insert( out.end(), Attacks.begin(), Attacks.end() ); }