Cooked another cookie

This commit is contained in:
Louis-Antoine 2017-01-01 23:52:27 +01:00
parent 4373afcdb2
commit 478da43660
2 changed files with 13 additions and 2 deletions

View File

@ -1705,7 +1705,9 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room)
*/ */
static boolean CL_ServerConnectionSearchTicker(boolean viams, tic_t *asksent) static boolean CL_ServerConnectionSearchTicker(boolean viams, tic_t *asksent)
{ {
#ifndef NONET
INT32 i; INT32 i;
#endif
#ifndef NONET #ifndef NONET
// serverlist is updated by GetPacket function // serverlist is updated by GetPacket function
@ -1796,6 +1798,7 @@ static boolean CL_ServerConnectionSearchTicker(boolean viams, tic_t *asksent)
} }
#else #else
(void)viams; (void)viams;
(void)asksent;
// No netgames, so we skip this state. // No netgames, so we skip this state.
cl_mode = CL_ASKJOIN; cl_mode = CL_ASKJOIN;
#endif // ifndef NONET/else #endif // ifndef NONET/else
@ -1819,6 +1822,10 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic
boolean waitmore; boolean waitmore;
INT32 i; INT32 i;
#ifdef NONET
(void)tmpsave;
#endif
switch (cl_mode) switch (cl_mode)
{ {
case CL_SEARCHING: case CL_SEARCHING:
@ -2002,7 +2009,11 @@ static void CL_ConnectToServer(boolean viams)
do do
{ {
// If the connection was aborted for some reason, leave // If the connection was aborted for some reason, leave
#ifndef NONET
if (!CL_ServerConnectionTicker(viams, tmpsave, &oldtic, &asksent)) if (!CL_ServerConnectionTicker(viams, tmpsave, &oldtic, &asksent))
#else
if (!CL_ServerConnectionTicker(viams, (char*)NULL, &oldtic, (tic_t *)NULL))
#endif
return; return;
if (server) if (server)

View File

@ -571,6 +571,7 @@ void Net_UnAcknowledgePacket(INT32 node)
#endif #endif
} }
#ifndef NONET
/** Checks if all acks have been received /** Checks if all acks have been received
* *
* \return True 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) static boolean Net_AllAcksReceived(void)
{ {
#ifndef NONET
INT32 i; INT32 i;
for (i = 0; i < MAXACKPACKETS; i++) for (i = 0; i < MAXACKPACKETS; i++)
if (ackpak[i].acknum) if (ackpak[i].acknum)
return false; return false;
#endif
return true; return true;
} }
#endif
/** Waits for all ackreturns /** Waits for all ackreturns
* *