process network data first...

...so user actions work on as uptodate data as possible

should fix some rare race conditions (as far as is possible)
This commit is contained in:
Gunter Labes 2009-06-21 01:36:27 +00:00
parent 8b742e5437
commit b825474ddc

View File

@ -68,13 +68,15 @@ static void run_lobby_loop(display& disp, mp::ui& ui)
ui.set_location(lobby_pos);
first = false;
}
// process network data first so user actions can override the result
// or uptodate data can prevent invalid actions
// i.e. press cancel while you receive [start_game] or press start game while someone leaves
ui.process_network();
events::pump();
events::raise_process_event();
events::raise_draw_event();
ui.process_network();
disp.flip();
disp.delay(20);
}