From 5ee8f91f5d7aa39270817bbeb066f74f060b815c Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sat, 22 Feb 2025 10:20:30 -0600 Subject: [PATCH] fix replay show_debug_help --- src/game/boe.actions.cpp | 4 +++- src/game/boe.main.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 6ed969e0..43e74605 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -2364,7 +2364,9 @@ void show_debug_help() { if(action.action != &show_debug_help){ button.attachClickHandler([action](cDialog& me, std::string, eKeyMod) -> bool { me.toast(false); - action.action(); + // In a replay, the action will have been recorded next anyway, so the dialog doesn't need to trigger it. + if(!replaying) + action.action(); return true; }); } diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 66b68528..f397ad9a 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -910,8 +910,9 @@ static void replay_action(Element& action) { cancel_item_target(did_something, need_redraw, need_reprint); }else if(t == "easter_egg"){ easter_egg(boost::lexical_cast(action.GetText())); - }else if(t == "show_debug_panel"){ + }else if(t == "show_debug_help"){ show_debug_help(); + return; }else if(t == "debug_fight_encounter"){ debug_fight_encounter(str_to_bool(action.GetText())); }else if(t == "preview_every_dialog_xml"){