From 478da436606c0cd467db9cc8f89c02cb490ce29f Mon Sep 17 00:00:00 2001 From: Louis-Antoine Date: Sun, 1 Jan 2017 23:52:27 +0100 Subject: [PATCH] Cooked another cookie --- src/d_clisrv.c | 11 +++++++++++ src/d_net.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7035a90a..81162708 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1705,7 +1705,9 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room) */ static boolean CL_ServerConnectionSearchTicker(boolean viams, tic_t *asksent) { +#ifndef NONET INT32 i; +#endif #ifndef NONET // serverlist is updated by GetPacket function @@ -1796,6 +1798,7 @@ static boolean CL_ServerConnectionSearchTicker(boolean viams, tic_t *asksent) } #else (void)viams; + (void)asksent; // No netgames, so we skip this state. cl_mode = CL_ASKJOIN; #endif // ifndef NONET/else @@ -1819,6 +1822,10 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic boolean waitmore; INT32 i; +#ifdef NONET + (void)tmpsave; +#endif + switch (cl_mode) { case CL_SEARCHING: @@ -2002,7 +2009,11 @@ static void CL_ConnectToServer(boolean viams) do { // If the connection was aborted for some reason, leave +#ifndef NONET if (!CL_ServerConnectionTicker(viams, tmpsave, &oldtic, &asksent)) +#else + if (!CL_ServerConnectionTicker(viams, (char*)NULL, &oldtic, (tic_t *)NULL)) +#endif return; if (server) diff --git a/src/d_net.c b/src/d_net.c index 097efc88..741fd56f 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -571,6 +571,7 @@ void Net_UnAcknowledgePacket(INT32 node) #endif } +#ifndef NONET /** Checks if all acks have been received * * \return True if all acks have been received @@ -578,16 +579,15 @@ void Net_UnAcknowledgePacket(INT32 node) */ static boolean Net_AllAcksReceived(void) { -#ifndef NONET INT32 i; for (i = 0; i < MAXACKPACKETS; i++) if (ackpak[i].acknum) return false; -#endif return true; } +#endif /** Waits for all ackreturns *