]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mvm_cmds.c
don't store pointers for serverlist_viewlist, because they become
[xonotic/darkplaces.git] / mvm_cmds.c
index 208ac895bc68d0f1b4e61b49fde10a953203382a..07424f80e26d24f6b72cb2c7da119d48c8c5bc92 100644 (file)
@@ -436,7 +436,7 @@ void VM_M_getserverliststring(void)
                Con_Print("VM_M_getserverliststring: bad hostnr passed!\n");
                return;
        }
-       cache = serverlist_viewlist[hostnr];
+       cache = ServerList_GetViewEntry(hostnr);
        switch( (int) PRVM_G_FLOAT(OFS_PARM0) ) {
                case SLIF_CNAME:
                        PRVM_G_INT( OFS_RETURN ) = PRVM_SetTempString( cache->info.cname );
@@ -494,7 +494,7 @@ void VM_M_getserverlistnumber(void)
                Con_Print("VM_M_getserverliststring: bad hostnr passed!\n");
                return;
        }
-       cache = serverlist_viewlist[hostnr];
+       cache = ServerList_GetViewEntry(hostnr);
        switch( (int) PRVM_G_FLOAT(OFS_PARM0) ) {
                case SLIF_MAXPLAYERS:
                        PRVM_G_FLOAT( OFS_RETURN ) = cache->info.maxplayers;