Skip to content

Commit

Permalink
Changed all sv_maxvisibleplayers refs to sv_visiblemaxplayers.
Browse files Browse the repository at this point in the history
Bumped revision number.
  • Loading branch information
danielga committed Jul 7, 2017
1 parent d5bc71d commit 859bf8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ static void PreInitialize( GarrysMod::Lua::ILuaBase *LUA )

LUA->CreateTable( );

LUA->PushString( "serversecure 1.5.9" );
LUA->PushString( "serversecure 1.5.10" );
LUA->SetField( -2, "Version" );

// version num follows LuaJIT style, xxyyzz
LUA->PushNumber( 10509 );
LUA->PushNumber( 10510 );
LUA->SetField( -2, "VersionNum" );

LUA->PushCFunction( PostInitialize );
Expand Down
8 changes: 4 additions & 4 deletions source/netfilter/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static std::string server_binary = Helpers::GetBinaryFileName( "server", false,
static CSteamGameServerAPIContext *gameserver_context = nullptr;

static SourceSDK::FactoryLoader icvar_loader( "vstdlib", true, IS_SERVERSIDE, "bin/" );
static ConVar *sv_maxvisibleplayers = nullptr;
static ConVar *sv_visiblemaxplayers = nullptr;

static std::string dedicated_binary = Helpers::GetBinaryFileName( "dedicated", false, true, "bin/" );
static SourceSDK::FactoryLoader server_loader( "server", false, true, "garrysmod/bin/" );
Expand Down Expand Up @@ -299,8 +299,8 @@ static void BuildReplyInfo( )
info_cache_packet.WriteShort( appid );

info_cache_packet.WriteByte( server->GetNumClients( ) );
info_cache_packet.WriteByte( sv_maxvisibleplayers != nullptr ?
sv_maxvisibleplayers->GetInt( ) :
info_cache_packet.WriteByte( sv_visiblemaxplayers != nullptr ?
sv_visiblemaxplayers->GetInt( ) :
reply_info.max_clients );
info_cache_packet.WriteByte( server->GetNumFakeClients( ) );
info_cache_packet.WriteByte( 'd' ); // dedicated server identifier
Expand Down Expand Up @@ -777,7 +777,7 @@ void Initialize( GarrysMod::Lua::ILuaBase *LUA )

ICvar *icvar = icvar_loader.GetInterface<ICvar>( CVAR_INTERFACE_VERSION );
if( icvar != nullptr )
sv_maxvisibleplayers = icvar->FindVar( "sv_visiblemaxplayers" );
sv_visiblemaxplayers = icvar->FindVar( "sv_visiblemaxplayers" );

gamedll = server_loader.GetInterface<IServerGameDLL>( INTERFACEVERSION_SERVERGAMEDLL );
if( gamedll == nullptr )
Expand Down

0 comments on commit 859bf8d

Please sign in to comment.