mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-12-03 17:27:27 +00:00
Fix gLevelValues.numCoinsToLife div/0 error (#500)
This commit is contained in:
parent
d10e7c758e
commit
382b03d97f
2 changed files with 2 additions and 2 deletions
|
@ -3269,7 +3269,7 @@ void print_hud_course_complete_coins(s16 x, s16 y) {
|
|||
gMarioStates[0].numLives++;
|
||||
}
|
||||
} else {
|
||||
if (gCourseCompleteCoins % gLevelValues.numCoinsToLife == 0 && gCourseCompleteCoins > 0) {
|
||||
if (gLevelValues.numCoinsToLife != 0 && gCourseCompleteCoins % gLevelValues.numCoinsToLife == 0 && gCourseCompleteCoins > 0) {
|
||||
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
|
||||
gMarioStates[0].numLives++;
|
||||
}
|
||||
|
|
|
@ -1121,7 +1121,7 @@ void update_hud_values(void) {
|
|||
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
|
||||
}
|
||||
} else {
|
||||
if (gHudDisplay.coins % gLevelValues.numCoinsToLife == 0 && gHudDisplay.coins > 0) {
|
||||
if (gLevelValues.numCoinsToLife != 0 && gHudDisplay.coins % gLevelValues.numCoinsToLife == 0 && gHudDisplay.coins > 0) {
|
||||
gMarioState->numLives++;
|
||||
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue