From: Rudolf Polzer Date: Thu, 29 Aug 2013 16:56:00 +0000 (+0200) Subject: Allow refreshserverlist() to also clear the list like net_slist command X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=05479f056dea3bd6f7f1e39b933c341f2d707267;p=xonotic%2Fdarkplaces.git Allow refreshserverlist() to also clear the list like net_slist command Usage: refreshserverlist(TRUE); --- diff --git a/mvm_cmds.c b/mvm_cmds.c index 9a236401..577cd44d 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -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); } /*