Skip to content

Commit

Permalink
show remaining connection attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
timbergeron committed Jan 10, 2024
1 parent 8ef7117 commit f0c28de
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Quake/net_dgrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2222,7 +2222,9 @@ static qsocket_t *_Datagram_Connect (struct qsockaddr *serveraddr)
SCR_UpdateScreen ();
start_time = net_time;

for (reps = 0; reps < 3; reps++)
const int totalAttempts = 3; // woods

for (reps = 0; reps < totalAttempts; reps++) // woods
{
SZ_Clear(&net_message);
// save space for the header, filled in later
Expand Down Expand Up @@ -2331,8 +2333,12 @@ static qsocket_t *_Datagram_Connect (struct qsockaddr *serveraddr)
if (ret)
break;

Con_SafePrintf("still trying...\n");
SCR_UpdateScreen ();
int attemptsLeft = totalAttempts - reps - 1;
if (attemptsLeft > 0)
{
Con_SafePrintf("still trying... (%d attempts left)\n", attemptsLeft);
SCR_UpdateScreen ();
}
start_time = SetNetTime();
}

Expand Down

0 comments on commit f0c28de

Please sign in to comment.