Fixed bug #12654 causing prestart events to be shown to the player

This commit is contained in:
Jon Daniel 2005-04-12 21:40:16 +00:00
parent 291ea50dd4
commit a142fe13fc
2 changed files with 3 additions and 23 deletions

View file

@ -943,12 +943,6 @@ bool event_handler::handle_event_command(const queued_event& event_info,
}
screen->invalidate(loc);
// need to redraw here because unit might be in a prestart event
for(std::vector<team>::iterator t = teams->begin(); t != teams->end(); ++t) {
clear_shroud(*screen, *status_ptr, *game_map, *game_data_ptr, *units, *teams, (t - teams->begin()));
}
screen->draw();
screen->recalculate_minimap();
} else {
player_info* const player = state_of_game->get_player((*teams)[new_unit.side()-1].save_id());

View file

@ -467,16 +467,13 @@ LEVEL_RESULT play_level(const game_data& gameinfo, const config& game_config,
gui.begin_game();
gui.adjust_colours(0,0,0);
LOG_NG << "scrolling... " << (SDL_GetTicks() - ticks) << "\n";
if(first_human_team != -1) {
clear_shroud(gui,status,map,gameinfo,units,teams,first_human_team);
LOG_NG << "b " << (SDL_GetTicks() - ticks) << "\n";
gui.scroll_to_tile(map.starting_position(first_human_team + 1).x,
map.starting_position(first_human_team + 1).y, display::WARP);
LOG_NG << "c " << (SDL_GetTicks() - ticks) << "\n";
}
gui.scroll_to_tile(map.starting_position(1).x,map.starting_position(1).y,display::WARP);
LOG_NG << "done scrolling... " << (SDL_GetTicks() - ticks) << "\n";
@ -487,23 +484,12 @@ LEVEL_RESULT play_level(const game_data& gameinfo, const config& game_config,
first_player = 0;
}
events::raise_draw_event();
if(!loading_game) {
game_events::fire("prestart");
}
for(std::vector<team>::iterator t = teams.begin(); t != teams.end(); ++t) {
clear_shroud(gui,status,map,gameinfo,units,teams,(t-teams.begin()));
}
gui.recalculate_minimap();
gui.draw();
if(!loading_game) {
game_events::fire("prestart");
events::raise_draw_event();
gui.draw();
for(std::vector<team>::iterator t = teams.begin(); t != teams.end(); ++t) {
clear_shroud(gui,status,map,gameinfo,units,teams,(t-teams.begin()));
}
gui.recalculate_minimap();
}
std::deque<config> data_backlog;