remove unnecessary argument to play_controller::fire_prestart
The argument "execute" was always true.
This commit is contained in:
parent
18dabe47c4
commit
f814a35c5f
4 changed files with 11 additions and 13 deletions
|
@ -561,19 +561,17 @@ void play_controller::fire_preload()
|
|||
gamedata_.get_variable("turn_number") = int(turn());
|
||||
game_events::fire("preload");
|
||||
}
|
||||
void play_controller::fire_prestart(bool execute)
|
||||
void play_controller::fire_prestart()
|
||||
{
|
||||
// pre-start events must be executed before any GUI operation,
|
||||
// as those may cause the display to be refreshed.
|
||||
if (execute){
|
||||
update_locker lock_display(gui_->video());
|
||||
gamedata_.set_phase(game_data::PRESTART);
|
||||
game_events::fire("prestart");
|
||||
check_end_level();
|
||||
// prestart event may modify start turn with WML, reflect any changes.
|
||||
start_turn_ = turn();
|
||||
gamedata_.get_variable("turn_number") = int(start_turn_);
|
||||
}
|
||||
update_locker lock_display(gui_->video());
|
||||
gamedata_.set_phase(game_data::PRESTART);
|
||||
game_events::fire("prestart");
|
||||
check_end_level();
|
||||
// prestart event may modify start turn with WML, reflect any changes.
|
||||
start_turn_ = turn();
|
||||
gamedata_.get_variable("turn_number") = int(start_turn_);
|
||||
}
|
||||
|
||||
void play_controller::fire_start(bool execute){
|
||||
|
|
|
@ -196,7 +196,7 @@ protected:
|
|||
void init_managers();
|
||||
///preload events cannot be synced
|
||||
void fire_preload();
|
||||
void fire_prestart(bool execute);
|
||||
void fire_prestart();
|
||||
void fire_start(bool execute);
|
||||
virtual void init_gui();
|
||||
possible_end_play_signal init_side(bool is_replay = false);
|
||||
|
|
|
@ -368,7 +368,7 @@ possible_end_play_signal playsingle_controller::play_scenario_init(end_level_dat
|
|||
//we can only use a set_scontext_synced with a non empty recorder.
|
||||
set_scontext_synced sync;
|
||||
|
||||
HANDLE_END_PLAY_SIGNAL( fire_prestart(true) );
|
||||
HANDLE_END_PLAY_SIGNAL( fire_prestart() );
|
||||
init_gui();
|
||||
past_prestart = true;
|
||||
LOG_NG << "first_time..." << (recorder.is_skipping() ? "skipping" : "no skip") << "\n";
|
||||
|
|
|
@ -350,7 +350,7 @@ void replay_controller::reset_replay()
|
|||
*/
|
||||
set_scontext_synced sync;
|
||||
|
||||
fire_prestart(true);
|
||||
fire_prestart();
|
||||
init_gui();
|
||||
fire_start(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue