Beispiel #1
0
            public static bool Prefix(PauseMenu __instance, Button ___m_btnSplit, ref bool ___m_suicide, Button ___m_btnDie)
            {
                //var self = __instance;

                //((Button)At.GetField(__instance, "m_btnSplit")).interactable = true;

                At.Invoke(__instance as Panel, "Update");

                if (!___m_btnSplit.interactable)
                {
                    ___m_btnSplit.interactable = true;
                }

                if (__instance.LocalCharacter)
                {
                    //if (__instance.LocalCharacter.Alive && ___m_btnSplit.interactable != PhotonNetwork.offlineMode)
                    //    ___m_btnSplit.interactable = PhotonNetwork.offlineMode;
                    //else if (!__instance.LocalCharacter.Alive && ___m_btnSplit.interactable)
                    //    ___m_btnSplit.interactable = false;

                    if (!___m_suicide &&
                        ((Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.LeftAlt) && Input.GetKeyDown(KeyCode.U)) ||
                         ControlsInput.GamepadUnstuckCheat(__instance.PlayerID)))
                    {
                        ___m_suicide = true;

                        if (___m_btnDie && !___m_btnDie.gameObject.activeSelf)
                        {
                            ___m_btnDie.gameObject.SetActive(true);
                        }
                    }
                }

                return(false);
            }