Skip to content

Commit

Permalink
Added warnings for when convars fail to load
Browse files Browse the repository at this point in the history
  • Loading branch information
danielga committed Jun 7, 2021
1 parent ce4b20b commit 39a120a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/netfilter/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,12 @@ namespace netfilter
sv_visiblemaxplayers = icvar->FindVar( "sv_visiblemaxplayers" );
sv_location = icvar->FindVar( "sv_location" );
}

if( sv_visiblemaxplayers == nullptr )
ConColorMsg( Color( 255, 255, 0, 255 ), "[ServerSecure] Failed to get \"sv_visiblemaxplayers\" convar!\n" );

if( sv_location == nullptr )
ConColorMsg( Color( 255, 255, 0, 255 ), "[ServerSecure] Failed to get \"sv_location\" convar!\n" );
}

gamedll = InterfacePointers::ServerGameDLL( );
Expand Down

0 comments on commit 39a120a

Please sign in to comment.