Fixed bug #11359
causing side turn events to be fired even when the turn was not refreshed.
This commit is contained in:
parent
d052181e64
commit
a223a51df3
1 changed files with 1 additions and 1 deletions
|
@ -508,7 +508,6 @@ LEVEL_RESULT play_level(game_data& gameinfo, const config& game_config,
|
|||
std::stringstream player_number_str;
|
||||
player_number_str << player_number;
|
||||
game_events::set_variable("side_number",player_number_str.str());
|
||||
game_events::fire("side turn");
|
||||
|
||||
//we want to work out if units for this player should get healed, and the
|
||||
//player should get income now. healing/income happen if it's not the first
|
||||
|
@ -517,6 +516,7 @@ LEVEL_RESULT play_level(game_data& gameinfo, const config& game_config,
|
|||
const bool turn_refresh = !first_time || loading_game && team_it != teams.begin()+first_player;
|
||||
|
||||
if(turn_refresh) {
|
||||
game_events::fire("side turn");
|
||||
for(unit_map::iterator i = units.begin(); i != units.end(); ++i) {
|
||||
if(i->second.side() == player_number) {
|
||||
i->second.new_turn();
|
||||
|
|
Loading…
Add table
Reference in a new issue