// stop sounds (especially looping!)
S_StopAllSounds ();
+ cl.parsingtextexpectingpingforscores = 0; // just in case no reply has come yet
+
// clear contents blends
cl.cshifts[0].percent = 0;
cl.cshifts[1].percent = 0;
{
Con_Printf("ping reply but empty scoreboard?!?\n");
cl.parsingtextmode = CL_PARSETEXTMODE_NONE;
- cl.parsingtextexpectingpingforscores = false;
+ cl.parsingtextexpectingpingforscores = 0;
}
+ cl.parsingtextexpectingpingforscores = cl.parsingtextexpectingpingforscores ? 2 : 0;
return !cl.parsingtextexpectingpingforscores;
}
if (!strncmp(text, "host: ", 9))
{
- cl.parsingtextexpectingpingforscores = false;
+ // cl.parsingtextexpectingpingforscores = false; // really?
cl.parsingtextmode = CL_PARSETEXTMODE_STATUS;
cl.parsingtextplayerindex = 0;
return true;
{
// if anything goes wrong, we'll assume this is not a ping report
qboolean expected = cl.parsingtextexpectingpingforscores;
- cl.parsingtextexpectingpingforscores = false;
+ cl.parsingtextexpectingpingforscores = 0;
cl.parsingtextmode = CL_PARSETEXTMODE_NONE;
t = text;
while (*t == ' ')
// manually, but they would still see a ping report, just a later one
// caused by the scoreboard code rather than the one they intentionally
// issued)
- qboolean parsingtextexpectingpingforscores;
+ int parsingtextexpectingpingforscores;
// entity database stuff
// latest received entity frame numbers
else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6 || cls.protocol == PROTOCOL_DARKPLACES7)
{
// these servers usually lack the pings command and so a less efficient "ping" command must be sent, which on modern DP servers will also reply with a pingplreport command after the ping listing
- cl.parsingtextexpectingpingforscores = true; // hide the output of the next ping report
- MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
- MSG_WriteString(&cls.netcon->message, "ping");
+ static int ping_anyway_counter = 0;
+ if(cl.parsingtextexpectingpingforscores == 1)
+ {
+ Con_DPrintf("want to send ping, but still waiting for other reply\n");
+ if(++ping_anyway_counter >= 5)
+ cl.parsingtextexpectingpingforscores = 0;
+ }
+ if(cl.parsingtextexpectingpingforscores != 1)
+ {
+ ping_anyway_counter = 0;
+ cl.parsingtextexpectingpingforscores = 1; // hide the output of the next ping report
+ MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
+ MSG_WriteString(&cls.netcon->message, "ping");
+ }
}
else
{