From 5d1fb732db6ffdc8a8b3a7dd1a7665faffb42595 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 6 Apr 2005 08:37:50 +0000 Subject: [PATCH] fix Steps row in SPlayerOptions has no effect --- stepmania/src/GameCommand.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 80413d73db..1f4a1ea58f 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -610,12 +610,22 @@ static HighScore MakeRandomHighScore( float fPercentDP ) void GameCommand::Apply( const vector &vpns ) const { - FOREACH_CONST( Command, m_Commands.v, cmd ) + if( m_Commands.v.size() ) { - GameCommand gc; - gc.m_bInvalid = false; - gc.LoadOne( *cmd ); - gc.ApplySelf( vpns ); + // We were filled using a GameCommand from metrics. Apply the options in order. + FOREACH_CONST( Command, m_Commands.v, cmd ) + { + GameCommand gc; + gc.m_bInvalid = false; + gc.LoadOne( *cmd ); + gc.ApplySelf( vpns ); + } + } + else + { + // We were filled by an OptionRowHandler in code. GameCommand isn't filled, + // so just apply the values that are already set in this. + this->ApplySelf( vpns ); } }