From 56a4965ff7e641b4643cceb17ce3199a9a09f686 Mon Sep 17 00:00:00 2001 From: Richard Aasa Date: Thu, 10 Sep 2026 18:31:29 +0300 Subject: [PATCH] Fix bear gate re-opening after Play Again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clearing the arena's last wave set the DP debug flag "gate_unlocked_bear" to true as a side effect. That flag lives on the DP autoload, which survives scene reloads and isn't touched by Run.start_new_run() — so once cleared for real in a play session, it stayed true forever, permanently overriding the per-run Run.cleared-based gate check in lobby_underground.gd. Every later lobby load (including after Play Again reset the real run state) kept re-opening the gate. The DP flag is meant to be a manual designer override for testing the animation (per its own doc comment), not something gameplay code sets persistently — Run.bear_gate_open() is already the real per-run source of truth. Removed the stray set_value() call. Verified in isolation: clearing the arena's last wave no longer touches the DP flag (stays false), so the gate only opens through the run-scoped Run.cleared state, which already resets correctly on Play Again. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MXBNaEBmrYDSMcv4NgUWtV --- levels/matador_spawn.gd | 1 - 1 file changed, 1 deletion(-) diff --git a/levels/matador_spawn.gd b/levels/matador_spawn.gd index 482d7b1..54a3b41 100644 --- a/levels/matador_spawn.gd +++ b/levels/matador_spawn.gd @@ -83,7 +83,6 @@ func _on_matador_killed() -> void: if _alive > 0 or _resolved: return if _wave >= DP.f("mat_wave_size"): - DP.set_value("gate_unlocked_bear", true) _resolved = true all_defeated.emit() else: