void OnRoundStarted() { // if (m_shouldBeSpawnedInNextRound) { // // PlayingObjectSpawner.MarkPlayerForSpawning (GetComponent<Player> ()); // // m_shouldBeSpawnedInNextRound = false; // } if (!m_player.IsLoggedIn()) { return; } if (m_player.IsSpectator()) { return; } // if (!m_player.ChoosedTeam) // return; PlayingObjectSpawner.MarkPlayerForSpawning(m_player); }
void OnPlayerChoosedTeam(string team) { // check if player can be spawned immediately if (m_player.IsSpectator()) { return; } // m_shouldBeSpawnedInNextRound = true; if (RoundSystem.singleton.IsRoundStartedSinceMapChange) { if (Time.time - RoundSystem.singleton.TimeWhenRoundStarted < this.maxRoundTimeToSpawnImmediately) { // player can be spawned immediately // m_shouldBeSpawnedInNextRound = false ; PlayingObjectSpawner.MarkPlayerForSpawning(m_player); } } }