Skip to content

Commit

Permalink
sync "time over" event
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Apr 7, 2015
1 parent 2a8abdf commit 39775b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/playsingle_controller.cpp
Expand Up @@ -981,7 +981,7 @@ void playsingle_controller::check_time_over(){
bool b = tod_manager_.next_turn();
it_is_a_new_turn_ = true;
if(!b) {

set_scontext_synced_base sync;
LOG_NG << "firing time over event...\n";
game_events::fire("time over");
LOG_NG << "done firing time over event...\n";
Expand Down
4 changes: 3 additions & 1 deletion src/replay_controller.cpp
Expand Up @@ -477,8 +477,10 @@ void replay_controller::play_side(){
player_number_ = teams_.size();
finish_turn();
bool is_time_left = tod_manager_.next_turn();
if(!is_time_left)
if(!is_time_left) {
set_scontext_synced_base sync;
game_events::fire("time over");
}
it_is_a_new_turn_ = true;
player_number_ = 1;
current_turn_++;
Expand Down

0 comments on commit 39775b2

Please sign in to comment.