Fix auto set style in course mode.

This commit is contained in:
Kyzentun Keeslala
2016-07-14 18:12:59 -06:00
parent ccc26c305a
commit d215dd99a0
+16 -4
View File
@@ -1894,11 +1894,23 @@ void ScreenSelectMusic::AfterMusicChange()
{
const Course *lCourse = m_MusicWheel.GetSelectedCourse();
const Style *pStyle = NULL;
if( CommonMetrics::AUTO_SET_STYLE )
pStyle = pCourse->GetCourseStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined() );
if( pStyle == NULL )
if(CommonMetrics::AUTO_SET_STYLE)
{
pStyle = pCourse->GetCourseStyle(GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled());
if(pStyle == NULL)
{
lCourse->GetAllTrails(m_vpTrails);
}
else
{
lCourse->GetTrails(m_vpTrails, pStyle->m_StepsType);
}
}
else
{
pStyle = GAMESTATE->GetCurrentStyle(PLAYER_INVALID);
lCourse->GetTrails( m_vpTrails, pStyle->m_StepsType );
lCourse->GetTrails(m_vpTrails, pStyle->m_StepsType);
}
m_sSampleMusicToPlay = m_sCourseMusicPath;
m_fSampleStartSeconds = 0;