From a8aa38277e4128def2da0d8359ff8b5cc4868a17 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Thu, 29 Sep 2016 14:40:46 -0400 Subject: [PATCH] Revert accidentally-committed code in c5ce248f54695316d4603c18b7e5e485b2564d24. --- host.lua | 7 +------ join.lua | 7 +------ src/events.cpp | 11 ----------- src/playturn.cpp | 3 +-- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/host.lua b/host.lua index 61ba298dff7..9265081f08f 100644 --- a/host.lua +++ b/host.lua @@ -15,15 +15,10 @@ local function plugin() local function idle_text(text) counter = counter + 1 - if counter % 100 == 0 then + if counter >= 100 then counter = 0 log("idling " .. text) end - if counter >= 100000 then - log("timed out " .. text) - context.exit{code = 1} - coroutine.yield() - end end log("hello world") diff --git a/join.lua b/join.lua index 39482358219..7998c4a2e0d 100644 --- a/join.lua +++ b/join.lua @@ -34,15 +34,10 @@ local function plugin() local function idle_text(text) counter = counter + 1 - if counter % 100 == 0 then + if counter >= 100 then counter = 0 log("idling " .. text) end - if counter >= 100000 then - log("timed out " .. text) - context.exit{code = 1} - coroutine.yield() - end end log("hello world") diff --git a/src/events.cpp b/src/events.cpp index 7a9e76d06b7..75f00bbd5e0 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -461,7 +461,6 @@ void pump() ev_end = events.end(); - bool redrew = false; for(ev_it = events.begin(); ev_it != ev_end; ++ev_it){ for (context& c : event_contexts) { @@ -470,12 +469,6 @@ void pump() SDL_Event &event = *ev_it; switch(event.type) { - case DRAW_EVENT: - if(redrew) { - continue; - } - redrew = true; - break; case SDL_WINDOWEVENT: switch(event.window.event) { @@ -587,10 +580,6 @@ void pump() } } - if(event.type != DRAW_EVENT) { - redrew = false; - } - const handler_list& event_handlers = event_contexts.front().handlers; for(auto handler : event_handlers) { handler->handle_event(event); diff --git a/src/playturn.cpp b/src/playturn.cpp index 66eb76ad840..ce95b59406d 100644 --- a/src/playturn.cpp +++ b/src/playturn.cpp @@ -92,8 +92,7 @@ turn_info::PROCESS_DATA_RESULT turn_info::handle_turn(const config& t) { //t can contain a [command] or a [upload_log] assert(t.all_children_count() == 1); - /** @todo FIXME: Check what commands we execute when it's our turn! - */ + /** @todo FIXME: Check what commands we execute when it's our turn! */ //note, that this function might call itself recursively: do_replay -> ... -> get_user_choice -> ... -> playmp_controller::pull_remote_choice -> sync_network -> handle_turn resources::recorder->add_config(t, replay::MARK_AS_SENT);