From 5f02bce89d8adb824ab6f05011d412b3d68a72c4 Mon Sep 17 00:00:00 2001 From: Robotboy655 Date: Tue, 10 Feb 2015 21:18:42 +0200 Subject: [PATCH] Clear gamemode list on refresh --- garrysmod/html/js/menu/control.Servers.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/garrysmod/html/js/menu/control.Servers.js b/garrysmod/html/js/menu/control.Servers.js index 1a7dccb44b..82358aa1bb 100644 --- a/garrysmod/html/js/menu/control.Servers.js +++ b/garrysmod/html/js/menu/control.Servers.js @@ -30,13 +30,8 @@ function ControllerServers( $scope, $element, $rootScope, $location ) // // Clear out all of the servers // - var gm = ServerTypes[Scope.ServerType].gamemodes; - for ( k in gm ) - { - gm[k].servers.length = 0 - gm[k].num_servers = 0 - gm[k].num_players = 0 - } + ServerTypes[Scope.ServerType].gamemodes = {}; + ServerTypes[Scope.ServerType].list.length = 0; if ( !IN_ENGINE ) TestUpdateServers( Scope.ServerType, RequestNum[ Scope.ServerType ] ); @@ -138,7 +133,6 @@ function ControllerServers( $scope, $element, $rootScope, $location ) if ( FirstTime ) { - //lua.Run( "DoStopServers()" ); $scope.Refresh(); } }