]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
only query QuakeWorld servers when in GAME_NORMAL mode
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Feb 2006 08:17:49 +0000 (08:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Feb 2006 08:17:49 +0000 (08:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6046 d7cf8633-e32d-0410-b094-e92efae38249

netconn.c

index 13f2649341dff59e9d94b5acaa80de15ca7d1fb9..6eaff6f9a3401d7c0c6a2ee7c764decbad5e2524 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -2264,17 +2264,25 @@ void NetConn_QueryMasters(void)
                                }
                        }
 
-                       // build the getservers message to send to the qwmaster master servers
-                       // note this has no -1 prefix, and the trailing nul byte is sent
-                       dpsnprintf(request, sizeof(request), "c\n");
-
-                       // search internet
-                       for (masternum = 0;sv_qwmasters[masternum].name;masternum++)
+                       // only query QuakeWorld servers when in GAME_NORMAL mode as that
+                       // is all QuakeWorld is designed for, we don't want QuakeWorld
+                       // servers showing up when running another game (not even the
+                       // mission packs, as if a QuakeWorld server was using their data
+                       // you could still play with -game hipnotic rather than -hipnotic)
+                       if (gamemode == GAME_NORMAL)
                        {
-                               if (sv_qwmasters[masternum].string && LHNETADDRESS_FromString(&masteraddress, sv_qwmasters[masternum].string, QWMASTER_PORT) && LHNETADDRESS_GetAddressType(&masteraddress) == LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])))
+                               // build the getservers message to send to the qwmaster master servers
+                               // note this has no -1 prefix, and the trailing nul byte is sent
+                               dpsnprintf(request, sizeof(request), "c\n");
+
+                               // search internet
+                               for (masternum = 0;sv_qwmasters[masternum].name;masternum++)
                                {
-                                       masterquerycount++;
-                                       NetConn_Write(cl_sockets[i], request, 7, &masteraddress);
+                                       if (sv_qwmasters[masternum].string && LHNETADDRESS_FromString(&masteraddress, sv_qwmasters[masternum].string, QWMASTER_PORT) && LHNETADDRESS_GetAddressType(&masteraddress) == LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])))
+                                       {
+                                               masterquerycount++;
+                                               NetConn_Write(cl_sockets[i], request, 7, &masteraddress);
+                                       }
                                }
                        }
                }