Skip to content

Commit

Permalink
MATCHLESS: use find_plr instead of find_client
Browse files Browse the repository at this point in the history
Avoids looking up spectators for no reason
  • Loading branch information
ciscon authored May 24, 2020
1 parent d6d0651 commit 7550252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ void TimerThink ()
int idle_time;

//if in matchless mode, check that the user hasn't exceeded k_matchless_max_idle_time
if ( k_matchLess && CountPlayers() && match_in_progress && k_matchLess_idle_time){
for( p = world; (p = find_client( p )); )
if ( k_matchLess && CountPlayers() && match_in_progress && k_matchLess_idle_time ){
for( p = world; (p = find_plr( p )); )
{
idle_time=(int)(g_globalvars.time-p->attack_finished);
if( idle_time > k_matchLess_idle_time ){
Expand Down

0 comments on commit 7550252

Please sign in to comment.