GoldenEye: Source Forums

Debriefing => Bug Reports & Fixes => Topic started by: Joe on April 14, 2014, 04:35:27 pm

Title: GetNumActiveTeamPlayers(): Doesn't always count observers
Post by: Joe on April 14, 2014, 04:35:27 pm
Hi,

GetNumActiveTeamPlayers(team) doesn't correctly count the number of team observers in this use case scenario:

1. Player A is killed and can't respawn so they enter observer mode.
2. Player A becomes a spectator.
3. Player A then joins MI6/Janus and enters observer mode because they still can't spawn.

After step 3, Player A isn't counted by GetNumActiveTeamPlayers().
Title: Re: GetNumActiveTeamPlayers(): Doesn't always count observers
Post by: killermonkey on April 14, 2014, 08:55:54 pm
There is a subtly here. An "Active" player is one that has participated in the round (i.e. has spawned into the round and been able to actually play). Someone who goes from spectator to team is not active until they spawn in. This is required because some game modes award points and other things based on the number of participating players and counting non-participating players in the active count could screw that up.