]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Allow refreshserverlist() to also clear the list like net_slist command divVerent/refreshserverlist
authorRudolf Polzer <divverent@xonotic.org>
Thu, 29 Aug 2013 16:56:00 +0000 (18:56 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 29 Aug 2013 16:56:00 +0000 (18:56 +0200)
Usage: refreshserverlist(TRUE);

mvm_cmds.c

index 9a23640177f038636f3b38109af6426bd6e656fa..577cd44db87bf70ba629713ea22830657f3a2c53 100644 (file)
@@ -560,8 +560,11 @@ refreshserverlist()
 */
 static void VM_M_refreshserverlist(prvm_prog_t *prog)
 {
-       VM_SAFEPARMCOUNT( 0, VM_M_refreshserverlist );
-       ServerList_QueryList(false, true, false, false);
+       VM_SAFEPARMCOUNTRANGE( 0, 1, VM_M_refreshserverlist );
+       qboolean do_reset = false;
+       if (prog->argc >= 1 && PRVM_G_FLOAT(OFS_PARM0))
+               do_reset = true;
+       ServerList_QueryList(do_reset, true, false, false);
 }
 
 /*