SetCompatibleStylesForPlayers and ForceSharedSidesMatch added to GameState for SSM to use to fix style mismatch problems.
StyleInputToGameInput changed to take a vector to return values in to handle multiple inputs mapped to a single column. Associated adjustments to everything that uses it. Player no longer drops holds in columns that have multiple inputs mapped to them if the wrong one is held. Running out of stage tokens changed from assert to error.
This commit is contained in:
@@ -232,10 +232,7 @@ void ScreenSelectMusic::BeginScreen()
|
||||
|
||||
if( CommonMetrics::AUTO_SET_STYLE )
|
||||
{
|
||||
vector<StepsType> vst;
|
||||
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, vst );
|
||||
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), vst[0] );
|
||||
GAMESTATE->SetCurrentStyle( pStyle, PLAYER_INVALID );
|
||||
GAMESTATE->SetCompatibleStylesForPlayers();
|
||||
}
|
||||
|
||||
if( GAMESTATE->GetCurrentStyle(PLAYER_INVALID) == NULL )
|
||||
@@ -1434,31 +1431,9 @@ bool ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
||||
}
|
||||
}
|
||||
|
||||
if( CommonMetrics::AUTO_SET_STYLE )
|
||||
{
|
||||
// Now that Steps have been chosen, set a Style that can play them.
|
||||
const Style *pStyle = NULL;
|
||||
if( GAMESTATE->IsCourseMode() )
|
||||
pStyle = GAMESTATE->m_pCurCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() );
|
||||
if( pStyle == NULL )
|
||||
{
|
||||
StepsType stCurrent;
|
||||
PlayerNumber pn = GAMESTATE->GetMasterPlayerNumber();
|
||||
if( GAMESTATE->IsCourseMode() )
|
||||
{
|
||||
ASSERT( GAMESTATE->m_pCurTrail[pn] != NULL );
|
||||
stCurrent = GAMESTATE->m_pCurTrail[pn]->m_StepsType;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT( GAMESTATE->m_pCurSteps[pn] != NULL );
|
||||
stCurrent = GAMESTATE->m_pCurSteps[pn]->m_StepsType;
|
||||
}
|
||||
vector<StepsType> vst;
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), stCurrent );
|
||||
}
|
||||
GAMESTATE->SetCurrentStyle( pStyle, PLAYER_INVALID );
|
||||
}
|
||||
// Now that Steps have been chosen, set a Style that can play them.
|
||||
GAMESTATE->SetCompatibleStylesForPlayers();
|
||||
GAMESTATE->ForceSharedSidesMatch();
|
||||
|
||||
/* If we're currently waiting on song assets, abort all except the music
|
||||
* and start the music, so if we make a choice quickly before background
|
||||
@@ -1829,6 +1804,10 @@ void ScreenSelectMusic::AfterMusicChange()
|
||||
}
|
||||
|
||||
SongUtil::GetPlayableSteps( pSong, m_vpSteps );
|
||||
if(m_vpSteps.empty())
|
||||
{
|
||||
//LuaHelpers::ReportScriptError("GetPlayableSteps returned nothing.");
|
||||
}
|
||||
|
||||
if ( PREFSMAN->m_bShowBanners )
|
||||
g_sBannerPath = pSong->GetBannerPath();
|
||||
|
||||
Reference in New Issue
Block a user