Ejemplo n.º 1
0
        public void SetSpectate(int userId)
        {
            if (!GameBase.Tournament || GameBase.FadeState != FadeStates.Idle)
            {
                return;
            }

            GameBase.Scheduler.Add(delegate
            {
                User found = BanchoClient.GetUserById(userId);
                if (found != null && found == StreamingManager.CurrentlySpectating)
                {
                    if (GameBase.TourneySpectatorName != null)
                    {
                        GameBase.TourneySpectatorName.Text = found.Name;
                    }
                    return;
                }

                StreamingManager.StopSpectating();
                if (found != null)
                {
                    found.BeatmapId              = 0;
                    found.BeatmapName            = string.Empty;
                    found.CurrentBeatmapChecksum = string.Empty;
                    StreamingManager.StartSpectating(found);
                }
            });
        }
Ejemplo n.º 2
0
        public void ReloadDatabase()
        {
            GameBase.Scheduler.Add(delegate
            {
                if (!GameBase.Tournament)
                {
                    return;
                }
                if (GameBase.FadeState != FadeStates.Idle)
                {
                    return;
                }

                BeatmapManager.Initialize(true);

                if (GameBase.Mode != OsuModes.Play)
                {
                    StreamingManager.StopSpectating();
                    StreamingManager.StartSpectating(StreamingManager.CurrentlySpectating);
                }
            });
        }