From 97b9061f6f3426dc0963c77d8bc666d3bfc31a6e Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Sun, 31 Aug 2003 02:26:07 +0000 Subject: [PATCH] fix dance magic mode not working in 1P mode added default modifiers when no characters are being used --- stepmania/src/Background.cpp | 5 +++++ stepmania/src/ScoreKeeperRave.cpp | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 3ae21851a8..ac2e5cfd50 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -71,6 +71,11 @@ Background::Background() if( GAMESTATE->IsPlayerEnabled(p) ) { bOneOrMoreChars = true; + + // if playing dance magic mode vs. the CPU, skip next condition + if (GAMESTATE->m_PlayMode == PLAY_MODE_RAVE) + continue; + //Disable dancing characters if BH will be showing. if( (PREFSMAN->m_bShowBeginnerHelper) || (GAMESTATE->m_pCurNotes[p]->GetDifficulty() == DIFFICULTY_BEGINNER ) ) bShowingBeginnerHelper = true; diff --git a/stepmania/src/ScoreKeeperRave.cpp b/stepmania/src/ScoreKeeperRave.cpp index 2704931ea3..a78c38cef5 100644 --- a/stepmania/src/ScoreKeeperRave.cpp +++ b/stepmania/src/ScoreKeeperRave.cpp @@ -80,7 +80,16 @@ void ScoreKeeperRave::Update( float fDelta ) void ScoreKeeperRave::LaunchAttack( AttackLevel al ) { CString* asAttacks = GAMESTATE->m_pCurCharacters[m_PlayerNumber]->m_sAttacks[al]; // [NUM_ATTACKS_PER_LEVEL] - CString sAttackToGive = asAttacks[ rand()%NUM_ATTACKS_PER_LEVEL ]; + CString sAttackToGive; + + if (GAMESTATE->m_pCurCharacters[m_PlayerNumber] != NULL) + sAttackToGive = asAttacks[ rand()%NUM_ATTACKS_PER_LEVEL ]; + else + { + CString DefaultAttacks[8] = { "1.5x", "2.0x", "0.5x", "reverse", "sudden", "boost", "brake", "wave" }; + sAttackToGive = DefaultAttacks[ rand()%8 ]; + } + PlayerNumber pnToAttack = OPPOSITE_PLAYER[m_PlayerNumber]; GameState::Attack a;