Give 1 up when you collect 50 coins and don't have "Leave level" on (#215)

If either Non-Stop or Stay in Level is on for On Star Collect, collecting a multiple of 50 coins should give everyone in the level a life.
    This would act as a solution for the lifes you would normally get after getting a star.

In SM64 when exiting a level, every 50 coins up until 150 you get a 1 up, except you can't exit the level in stay in level or non stop so there's the main problem which this PR addresses
This commit is contained in:
Agent X 2022-10-30 20:31:08 -04:00 committed by GitHub
parent a8e397047a
commit 1e2a230d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1047,6 +1047,11 @@ void update_hud_values(void) {
gHudDisplay.coins += 1;
play_sound(coinSound, gMarioState->marioObj->header.gfx.cameraToObject);
if (gServerSettings.stayInLevelAfterStar > 0 && (gHudDisplay.coins == 50 || gHudDisplay.coins == 100 || gHudDisplay.coins == 150)) {
gMarioState->numLives++;
play_sound(SOUND_GENERAL_COLLECT_1UP, gGlobalSoundSource);
}
}
}