add was_replaying to track how the game started
This commit is contained in:
@@ -1099,6 +1099,7 @@ void handle_events() {
|
||||
}
|
||||
replay_next_action();
|
||||
}else{
|
||||
replaying = false;
|
||||
#ifdef __APPLE__
|
||||
if (menuChoiceId>=0) {
|
||||
eMenuChoice aMenuChoice=menuChoice;
|
||||
|
@@ -27,6 +27,7 @@ using base64 = cppcodec::base64_rfc4648;
|
||||
|
||||
bool recording = false;
|
||||
bool replaying = false;
|
||||
bool was_replaying = false;
|
||||
|
||||
bool record_verbose = false;
|
||||
bool replay_verbose = false;
|
||||
@@ -107,7 +108,7 @@ bool init_action_log(std::string command, std::string file) {
|
||||
checking_action = checking_action->NextSiblingElement(false);
|
||||
}while(checking_action != nullptr);
|
||||
|
||||
replaying = true;
|
||||
was_replaying = replaying = true;
|
||||
} catch(...) {
|
||||
std::cout << "Failed to load file " << file << std::endl;
|
||||
return false;
|
||||
|
@@ -16,7 +16,12 @@ using ticpp::Element;
|
||||
struct word_rect_t;
|
||||
|
||||
extern bool recording;
|
||||
// True if a replay is currently ongoing.
|
||||
// False after actions run out, Ctrl+C interrupts the replay,
|
||||
// or an error occurs:
|
||||
extern bool replaying;
|
||||
// Always true if this session started as a replay:
|
||||
extern bool was_replaying;
|
||||
|
||||
extern bool replay_strict;
|
||||
|
||||
|
Reference in New Issue
Block a user