public void OnMasterClientSwitched(AOTEventArgs args)
    {
        print("OnMasterClientSwitched");
        if (gameTimesUp)
        {
            return;
        }

        if (PhotonNetwork.IsMasterClient)
        {
            GameModes.Load();
            GameModes.ForceChange();
            GameModes.oldHash["motd"] = null;
            RCManager.ClearAll();
            RestartGame(true, false);
        }
    }
    public void OnJoinedRoom(AOTEventArgs args)
    {
        Debug.Log("OnJoinedRoom >> " + PhotonNetwork.room.Name);
        var strArray = PhotonNetwork.room.Name.Split('`');

        gameTimesUp = false;
        Level       = LevelInfo.GetInfo(strArray[1]);
        switch (strArray[2].ToLower())
        {
        case "normal":
            difficulty = 0;
            break;

        case "hard":
            difficulty = 1;
            break;

        case "abnormal":
            difficulty = 2;
            break;

        default:
            difficulty = 1;
            break;
        }

        IN_GAME_MAIN_CAMERA.Difficulty = difficulty;
        time = int.Parse(strArray[3]) * 60;
        logic.ServerTimeBase = time;
        logic.ServerTime     = time;
        switch (strArray[4].ToLower())
        {
        case "day":
        case "день":
            IN_GAME_MAIN_CAMERA.DayLight = DayLight.Day;
            break;

        case "dawn":
        case "вечер":
            IN_GAME_MAIN_CAMERA.DayLight = DayLight.Dawn;
            break;

        case "night":
        case "ночь":
            IN_GAME_MAIN_CAMERA.DayLight = DayLight.Night;
            break;

        default:
            IN_GAME_MAIN_CAMERA.DayLight = DayLight.Dawn;
            break;
        }

        IN_GAME_MAIN_CAMERA.GameMode = Level.Mode;
        PhotonNetwork.LoadLevel(Level.MapName);
        if (PhotonNetwork.IsMasterClient)
        {
            GameModes.Load();
            GameModes.ForceChange();
            GameModes.SendRpc();
        }

        var player = PhotonNetwork.player;

        player.RCIgnored  = false;
        player.UIName     = User.Name;
        player.GuildName  = User.AllGuildNames;
        player.Kills      = player.Deaths = player.MaximumDamage = player.TotalDamage = 0;
        player.RCteam     = 0;
        player.Dead       = true;
        player.IsTitan    = false;
        localRacingResult = string.Empty;
        needChooseSide    = true;
        foreach (var info in killInfoList)
        {
            info.destroy();
        }

        killInfoList.Clear();
        RCManager.racingSpawnPointSet = false;
        if (!PhotonNetwork.IsMasterClient)
        {
            BasePV.RPC("RequireStatus", PhotonTargets.MasterClient);
        }

        foreach (var her in heroes)
        {
            if (her.BasePV != null && her.BasePV.owner.GameObject == null)
            {
                her.BasePV.owner.GameObject = her.baseG;
            }
        }

        PhotonNetwork.SetModProperties();
    }