diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 3343ee67..c341fbc0 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -1937,6 +1937,20 @@ void debug_fly() { put_pc_screen(); } +void debug_ghost_mode() { + if(recording){ + record_action("debug_ghost_mode", ""); + } + if(univ.ghost_mode){ + univ.ghost_mode = false; + ASB("Debug: Ghost mode OFF."); + }else{ + univ.ghost_mode = true; + ASB("Debug:Ghost mode ON."); + } + print_buf(); +} + bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ bool are_done = false; location pass_point; // TODO: This isn't needed @@ -2152,14 +2166,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){ case 'G': if(!univ.debug_mode) break; - if(univ.ghost_mode){ - univ.ghost_mode = false; - ASB("Debug: Ghost mode OFF."); - }else{ - univ.ghost_mode = true; - ASB("Debug:Ghost mode ON."); - } - print_buf(); + debug_ghost_mode(); break; case 'H': diff --git a/src/game/boe.actions.hpp b/src/game/boe.actions.hpp index a3484b20..33b034a3 100644 --- a/src/game/boe.actions.hpp +++ b/src/game/boe.actions.hpp @@ -82,5 +82,6 @@ void debug_refresh_stores(); void debug_clean_up(); void debug_stealth_detect_life_firewalk(); void debug_fly(); +void debug_ghost_mode(); #endif diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index 21f87309..c380f4ec 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -503,6 +503,8 @@ static void replay_next_action() { debug_stealth_detect_life_firewalk(); }else if(t == "debug_fly"){ debug_fly(); + }else if(t == "debug_ghost_mode"){ + debug_ghost_mode(); } // TODO some of these actions shouldn't call advance_time(). They should return