mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-17 16:01:34 +00:00
Check for valid team indexes
► Ensure players use a correct team index pointing to an existing team.
This commit is contained in:
parent
d22ad48b37
commit
01c376d3c2
1 changed files with 1 additions and 6 deletions
|
@ -1012,7 +1012,7 @@ bool CHL2MP_Player::HandleCommand_JoinTeam( int team )
|
|||
{
|
||||
if ( !GetGlobalTeam( team ) || team == 0 )
|
||||
{
|
||||
Warning( "HandleCommand_JoinTeam( %d ) - invalid team index.\n", team );
|
||||
ClientPrint( this, HUD_PRINTCONSOLE, "Please enter a valid team index\n" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1064,11 +1064,6 @@ bool CHL2MP_Player::ClientCommand( const CCommand &args )
|
|||
}
|
||||
else if ( FStrEq( args[0], "jointeam" ) )
|
||||
{
|
||||
if ( args.ArgC() < 2 )
|
||||
{
|
||||
Warning( "Player sent bad jointeam syntax\n" );
|
||||
}
|
||||
|
||||
if ( ShouldRunRateLimitedCommand( args ) )
|
||||
{
|
||||
int iTeam = atoi( args[1] );
|
||||
|
|
Loading…
Reference in a new issue