From 9800f39550cea5fee62d2520fbf305d861c30a56 Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Sat, 6 Apr 2024 19:10:26 +0200 Subject: [PATCH] fix: race generation in explosion mode (#59) * fix: race generation in explosion mode * chore: add a changelog entry --- CHANGELOG.md | 1 + scripts/main.gd | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3be205d..a2f84b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Deprecated ### Removed ### Fixed +- Fix race generation in explosion mode ([#59](https://github.com/MechanicalFlower/Marble/pull/59)) ### Security ### Dependencies - Bump `extractions/setup-just` from 1 to 2 ([#56](https://github.com/MechanicalFlower/Marble/pull/56)) diff --git a/scripts/main.gd b/scripts/main.gd index 4704796..0beec08 100644 --- a/scripts/main.gd +++ b/scripts/main.gd @@ -247,6 +247,10 @@ func set_mode(mode): _race.generate_race(!_explosion_enabled) _lower_boundary = get_lowest_piece(_race, true).global_transform.origin.y + # Reset values at each new race + _max_checkpoint_count = -1 + _old_lap_count = 0 + _overlay.reset() reset_position()