Bug fix. Up-Left and Up-Right no longer crash 4 panel games.

This commit is contained in:
Garth Smith
2002-03-02 23:40:35 +00:00
parent a6b3663a3c
commit 42c3642d0b
2 changed files with 9 additions and 2 deletions
+4
View File
@@ -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 );
+5 -2
View File
@@ -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<m_iNumColumns; i++ )
//for (int i=0; i<m_iNumColumns; i++)
for( int i=0; i<MAX_NUM_COLUMNS; i++ )
// Switched to MAX_NUM_COLUMNS so up-left and up-right don't cause ASSERT(false)
// Player.HandelPlayerStep will ignore up-left and up-right if it needs.
{
if( m_ColumnToTapStep[i] == tap_step )
return i;