bool synced_context::can_undo() { //this method should only works in a synced context. assert(get_synced_state() == SYNCED); //if we called the rng or if we sended data of this action over the network already, undoing is impossible. return (!is_simultaneously_) && (random_new::generator->get_random_calls() == 0); }
int synced_context::get_unit_id_diff() { //this method only works in a synced context. assert(get_synced_state() == SYNCED); return n_unit::id_manager::instance().get_save_id() - last_unit_id_; }
bool synced_context::is_synced() { return get_synced_state() == SYNCED; }