From 42c3642d0b0693b934a2cff6c44beed1d8abcaad Mon Sep 17 00:00:00 2001 From: Garth Smith Date: Sat, 2 Mar 2002 23:40:35 +0000 Subject: [PATCH] Bug fix. Up-Left and Up-Right no longer crash 4 panel games. --- stepmania/src/Player.cpp | 4 ++++ stepmania/src/Style.h | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 97aac9ec43..38f634e7c9 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -270,6 +270,10 @@ void Player::HandlePlayerStep( float fSongBeat, TapStep player_step, float fMaxB // update gray arrows int iColumnNum = m_Style.TapStepToColumnNumber( player_step ); + // For single player and two player, iColumnNum will be 4/5 or 8/9/10/11 for + // up-left and up-right hits. Seemed this was the simplest way to ignore them in game. + if (iColumnNum >= m_Style.m_iNumColumns) + return; m_GrayArrows.Step( iColumnNum ); diff --git a/stepmania/src/Style.h b/stepmania/src/Style.h index d401a74e34..b5203dda1d 100644 --- a/stepmania/src/Style.h +++ b/stepmania/src/Style.h @@ -14,7 +14,7 @@ #include "Steps.h" -const int MAX_NUM_COLUMNS = 8; +const int MAX_NUM_COLUMNS = 12; struct Style @@ -26,7 +26,10 @@ struct Style int TapStepToColumnNumber( TapStep tap_step ) { - for( int i=0; i