From 82632b112c3805c4d66c324e209aa8a94cfe794c Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sun, 6 Jul 2025 12:25:34 -0600 Subject: [PATCH] Add Logging for Skipping Laps in Debug Mode (#428) * Update race_logic.c * Update race_logic.c --- src/racing/race_logic.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/racing/race_logic.c b/src/racing/race_logic.c index 91db35d1f..4957c4ade 100644 --- a/src/racing/race_logic.c +++ b/src/racing/race_logic.c @@ -795,22 +795,20 @@ void func_8028F970(void) { if (gControllerOne->buttonPressed & U_JPAD) { gLapCountByPlayerId[0] = 2; play_sound2(SOUND_MENU_OPTION); + printf("[race_logic.c] [func_8028F970] Skipped laps for player 1\n"); } if (gControllerOne->buttonPressed & R_JPAD) { gLapCountByPlayerId[0] = 2; gLapCountByPlayerId[1] = 2; play_sound2(SOUND_MENU_OPTION); + printf("[race_logic.c] [func_8028F970] Skipped laps for players 1 & 2\n"); } if (gControllerOne->buttonPressed & D_JPAD) { - gLapCountByPlayerId[0] = 2; - gLapCountByPlayerId[1] = 2; - gLapCountByPlayerId[2] = 2; - gLapCountByPlayerId[3] = 2; - gLapCountByPlayerId[4] = 2; - gLapCountByPlayerId[5] = 2; - gLapCountByPlayerId[6] = 2; - gLapCountByPlayerId[7] = 2; + for (size_t i = 0; i < NUM_PLAYERS; i++) { + gLapCountByPlayerId[i] = 2; + } play_sound2(SOUND_MENU_OPTION); + printf("[race_logic.c] [func_8028F970] Skipped laps for all players\n"); } } }