garrynewman/garrysmod — pull request #683 by Bo98 (2014-04-28 17:39:40+00:00)
Title: TTT: Moved syncing of detective and traitor lists from PlayerInitialSpawn to the client's InitPostEntity

When a player joins mid-round, they will not know who are detectives and who are confirmed traitors. This was sent in PlayerInitialSpawn but did not work as since entities had not yet initialised clientside, player.GetByID(idx) always returned NULL.

The fix for this was to make the client request for this role list once they've hit InitPostEntity.

This also covers a similar situation where player's who joined just before the round started will potentially also not know the detectives or, if they are traitor, their fellow traitor buddies.