Example #1
0
        void OnPhotonCustomRoomPropertiesChanged(ExitGames.Client.Photon.Hashtable propertiesThatChanged)
        {
            NetworkPatches.OnRoomPropertyModification(propertiesThatChanged);

            if (!FirstJoin)
            {
                PhotonPlayer sender = null;
                if (propertiesThatChanged.ContainsKey("sender") && propertiesThatChanged["sender"] is PhotonPlayer)
                {
                    sender = (PhotonPlayer)propertiesThatChanged["sender"];
                }

                if (sender == null || sender.isMasterClient)
                {
                    if (propertiesThatChanged.ContainsKey("Map") && propertiesThatChanged["Map"] is string && IsMultiMap)
                    {
                        LevelInfo levelInfo = LevelInfo.GetInfo((string)propertiesThatChanged["Map"]);
                        if (levelInfo != null)
                        {
                            FengGameManagerMKII.Level = levelInfo;
                        }
                    }

                    if (propertiesThatChanged.ContainsKey("Lighting") && propertiesThatChanged["Lighting"] is string)
                    {
                        if (GExtensions.TryParseEnum((string)propertiesThatChanged["Lighting"], out DayLight time))
                        {
                            Camera.main.GetComponent <IN_GAME_MAIN_CAMERA>().setDayLight(time);
                        }
                    }
                }
            }
        }
Example #2
0
        void OnPhotonPlayerPropertiesChanged(object[] playerAndUpdatedProps)
        {
            NetworkPatches.OnPlayerPropertyModification(playerAndUpdatedProps);

            PhotonPlayer player = playerAndUpdatedProps[0] as PhotonPlayer;

            ExitGames.Client.Photon.Hashtable properties = playerAndUpdatedProps[1] as ExitGames.Client.Photon.Hashtable;

            // Neko Mod detection
            if (properties.ContainsValue("N_user") || properties.ContainsValue("N_owner"))
            {
                player.isNeko      = true;
                player.isNekoUser  = properties.ContainsValue("N_user");
                player.isNekoOwner = properties.ContainsValue("N_owner");
            }

            if (properties.ContainsKey("FoxMod"))
            {
                player.isFoxMod = true;
            }
        }