From 7794e6271fea1e0c0af9eacc99603f15a2f8ef79 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Sep 2014 01:40:45 +0300 Subject: add ability to delay network messages dispatch. --- src/net/tmwa/network.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 5338a6f5b..fa7565e46 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -93,6 +93,7 @@ void Network::clearHandlers() void Network::dispatchMessages() { BLOCK_START("Network::dispatchMessages 1") + mPauseDispatch = false; while (messageReady()) { SDL_mutexP(mMutexIn); @@ -133,6 +134,11 @@ void Network::dispatchMessages() } skip(len); + if (mPauseDispatch) + { + BLOCK_END("Network::dispatchMessages 3") + break; + } BLOCK_END("Network::dispatchMessages 3") } BLOCK_END("Network::dispatchMessages 1") -- cgit v1.2.3-70-g09d2