From f34e0e9dc03866fe76b8f395b9003be60fde4cea Mon Sep 17 00:00:00 2001 From: Benau Date: Mon, 6 May 2019 12:26:11 +0800 Subject: [PATCH] Hide rewind queue warnings if not connection debug --- src/network/rewind_queue.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/network/rewind_queue.cpp b/src/network/rewind_queue.cpp index 50f5d876f..d8eeb3f99 100644 --- a/src/network/rewind_queue.cpp +++ b/src/network/rewind_queue.cpp @@ -21,6 +21,7 @@ #include "config/stk_config.hpp" #include "modes/world.hpp" #include "network/dummy_rewinder.hpp" +#include "network/network.hpp" #include "network/network_config.hpp" #include "network/rewinder.hpp" #include "network/rewind_info.hpp" @@ -246,8 +247,12 @@ void RewindQueue::mergeNetworkData(int world_ticks, bool *needs_rewind, // player might have a network hickup). if (NetworkConfig::get()->isServer() && (*i)->getTicks() < world_ticks) { - Log::warn("RewindQueue", "Server received at %d message from %d", - world_ticks, (*i)->getTicks()); + if (Network::m_connection_debug) + { + Log::warn("RewindQueue", + "Server received at %d message from %d", + world_ticks, (*i)->getTicks()); + } // Server received an event in the past. Adjust this event // to be executed 'now' - at least we get a bit closer to the // client state.