GetCreditsRequiredToPlayStyle didn't check the coin mode.
This commit is contained in:
@@ -442,6 +442,15 @@ int GetNumCreditsPaid()
|
|||||||
|
|
||||||
int GetCreditsRequiredToPlayStyle( const Style *style )
|
int GetCreditsRequiredToPlayStyle( const Style *style )
|
||||||
{
|
{
|
||||||
|
// GameState::GetCoinsNeededToJoin returns 0 if the coin mode isn't
|
||||||
|
// CoinMode_Pay, which means the theme can't make sure that there are
|
||||||
|
// enough credits available. GameCommand::IsPlayable will cause a crash
|
||||||
|
// if there aren't enough credits. So we have to check the coin mode here
|
||||||
|
// and return 0 if the player doesn't have to pay.
|
||||||
|
if( GAMESTATE->GetCoinMode() != CoinMode_Pay )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if( GAMESTATE->GetPremium() == Premium_2PlayersFor1Credit )
|
if( GAMESTATE->GetPremium() == Premium_2PlayersFor1Credit )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user