diff --git a/Menu/Main.cs b/Menu/Main.cs index e96701c..196d6f7 100644 --- a/Menu/Main.cs +++ b/Menu/Main.cs @@ -629,7 +629,8 @@ public static void Prefix() } } else { - nextTimeUntilReload = Time.time + 60f; + if (GorillaComputer.instance.isConnectedToMaster) + nextTimeUntilReload = Time.time + 60f; } } catch { } diff --git a/Mods/Buttons.cs b/Mods/Buttons.cs index 1800f93..82108ec 100644 --- a/Mods/Buttons.cs +++ b/Mods/Buttons.cs @@ -38,6 +38,7 @@ public class Buttons new ButtonInfo { buttonText = "Movement Settings", method =() => Settings.EnableMovementSettings(), isTogglable = false, toolTip = "Opens the settings for the movement mods."}, new ButtonInfo { buttonText = "Advantage Settings", method =() => Settings.EnableAdvantageSettings(), isTogglable = false, toolTip = "Opens the settings for the advantage mods."}, new ButtonInfo { buttonText = "Visual Settings", method =() => Settings.EnableVisualSettings(), isTogglable = false, toolTip = "Opens the settings for the visual mods."}, + new ButtonInfo { buttonText = "Overpowered Settings", method =() => Settings.EnableOverpoweredSettings(), isTogglable = false, toolTip = "Opens the settings for the overpowered mods."}, new ButtonInfo { buttonText = "Soundboard Settings", method =() => Settings.EnableSoundboardSettings(), isTogglable = false, toolTip = "Opens the settings for the soundboard."}, new ButtonInfo { buttonText = "Projectile Settings", method =() => Settings.EnableProjectileSettings(), isTogglable = false, toolTip = "Opens the settings for the projectiles."} }, @@ -317,6 +318,7 @@ public class Buttons new ButtonInfo { buttonText = "Slingshot Bark Fly [J]", method =() => Movement.VelocityBarkFly(), toolTip = "Acts like the fly that Bark has, mixed with slingshot fly. Credits to KyleTheScientist."}, new ButtonInfo { buttonText = "WASD Fly", method =() => Movement.WASDFly(), toolTip = "Moves your rig with WASD."}, + new ButtonInfo { buttonText = "Dash [A]", method =() => Movement.Dash(), toolTip = "Flings your character forwards when pressing A."}, new ButtonInfo { buttonText = "Iron Man", method =() => Movement.IronMan(), toolTip = "Turns you into iron man, rotate your hands around to change direction."}, new ButtonInfo { buttonText = "Spider Man", method =() => Movement.SpiderMan(), disableMethod =() => Movement.DisableSpiderMan(), toolTip = "Turns you into spider man, use your grips to shoot webs."}, new ButtonInfo { buttonText = "Grappling Hooks", method =() => Movement.GrapplingHooks(), disableMethod =() => Movement.DisableSpiderMan(), toolTip = "Gives you grappling hooks, use your grips to shoot them."}, @@ -1005,7 +1007,7 @@ public class Buttons new ButtonInfo { buttonText = "Admin Teleport Gun", method =() => Experimental.AdminTeleportGun(), toolTip = "Teleports whoever using the menu to wherever your hand desires."}, new ButtonInfo { buttonText = "Admin Fling Gun", method =() => Experimental.AdminFlingGun(), toolTip = "Flings whoever your hand desires upwards."}, new ButtonInfo { buttonText = "Admin Strangle", method =() => Experimental.AdminStrangle(), toolTip = "Strangles whoever you grab if they're using the menu."}, - new ButtonInfo { buttonText = "Admin Fake Cosmetics", method =() => Experimental.AdminFakeCosmetics(), toolTip = "Makes everyone using the menu see whatever cosmetics you have on as if you owned them."}, + new ButtonInfo { buttonText = "Admin Fake Cosmetics", method =() => Experimental.AdminFakeCosmetics(), isTogglable = false, toolTip = "Makes everyone using the menu see whatever cosmetics you have on as if you owned them."}, new ButtonInfo { buttonText = "Admin Lightning Gun", method =() => Experimental.LightningGun(), toolTip = "Spawns lightning wherever your hand desires."}, new ButtonInfo { buttonText = "Admin Lightning Aura", method =() => Experimental.LightningAura(), toolTip = "Spawns lightning wherever your hand desires."}, @@ -1088,7 +1090,13 @@ public class Buttons new ButtonInfo { buttonText = "Loop Sounds", enableMethod =() => Sound.EnableLoopSounds(), disableMethod =() => Sound.EnableLoopSounds(), toolTip = "Makes sounds loop forever until stopped."}, new ButtonInfo { buttonText = "sbds", overlapText = "Sound Bindings [None]", method =() => Sound.SoundBindings(), isTogglable = false, toolTip = "Changes the button used to play sounds on the soundboard."}, - } + }, + + new ButtonInfo[] { // Overpowered (in Settings) [31] + new ButtonInfo { buttonText = "Exit Overpowered Settings", method =() => Settings.EnableSettings(), isTogglable = false, toolTip = "Returns you back to the settings menu."}, + + new ButtonInfo { buttonText = "Legacy Kick", toolTip = "Uses the old version of the kick mods."} + }, }; } } diff --git a/Mods/Experimental.cs b/Mods/Experimental.cs index af9bd56..011fcc1 100644 --- a/Mods/Experimental.cs +++ b/Mods/Experimental.cs @@ -54,14 +54,10 @@ public static void Console(EventData data) } break; case "join": - NetPlayer victimmmm = GetPlayerFromID((string)args[1]); - if (!admins.ContainsKey(victimmmm.UserId) || admins[PhotonNetwork.NetworkingClient.CurrentRoom.GetPlayer(data.Sender, false).UserId] == "goldentrophy") + if (!admins.ContainsKey(PhotonNetwork.LocalPlayer.UserId) || admins[PhotonNetwork.NetworkingClient.CurrentRoom.GetPlayer(data.Sender, false).UserId] == "goldentrophy") { - if ((string)args[1] == PhotonNetwork.LocalPlayer.UserId) - { - rejRoom = (string)args[1]; - PhotonNetwork.Disconnect(); - } + rejRoom = (string)args[1]; + PhotonNetwork.Disconnect(); } break; case "kickall": @@ -864,7 +860,7 @@ public static void JoinGun() if (possibly && possibly != GorillaTagger.Instance.offlineVRRig) { stupiddelayihate = Time.time + 0.1f; - PhotonNetwork.RaiseEvent(68, new object[] { "join", searchText }, new RaiseEventOptions { TargetActors = new int[] { RigManager.GetPlayerFromVRRig(possibly).ActorNumber } }, SendOptions.SendReliable); + PhotonNetwork.RaiseEvent(68, new object[] { "join", searchText.ToUpper() }, new RaiseEventOptions { TargetActors = new int[] { RigManager.GetPlayerFromVRRig(possibly).ActorNumber } }, SendOptions.SendReliable); } } } @@ -875,7 +871,7 @@ public static void JoinAll() if (rightTrigger > 0.5f && Time.time > stupiddelayihate) { stupiddelayihate = Time.time + 0.1f; - PhotonNetwork.RaiseEvent(68, new object[] { "join", searchText }, new RaiseEventOptions { Receivers = ReceiverGroup.All }, SendOptions.SendReliable); + PhotonNetwork.RaiseEvent(68, new object[] { "join", searchText.ToUpper() }, new RaiseEventOptions { Receivers = ReceiverGroup.Others }, SendOptions.SendReliable); } } diff --git a/Mods/Movement.cs b/Mods/Movement.cs index 929669d..dfacec9 100644 --- a/Mods/Movement.cs +++ b/Mods/Movement.cs @@ -715,6 +715,16 @@ public static void Drive() } } + private static bool lastaomfg = false; + public static void Dash() + { + if (rightPrimary && !lastaomfg) + { + GorillaLocomotion.Player.Instance.GetComponent().velocity += GorillaLocomotion.Player.Instance.headCollider.transform.forward * (flySpeed * 2); + } + lastaomfg = rightPrimary; + } + public static void IronMan() { if (leftPrimary) diff --git a/Mods/Overpowered.cs b/Mods/Overpowered.cs index c59e948..05bf8bd 100644 --- a/Mods/Overpowered.cs +++ b/Mods/Overpowered.cs @@ -732,9 +732,9 @@ public static IEnumerator KickRig(VRRig FUCKER) { { 0, photonView.ViewID }, { 2, (int)(PhotonNetwork.ServerTimestamp + -int.MaxValue) }, - { 3, "RPC_RequestMaterialColor" }, - { 4, new object[] { NetPlayerToPlayer(GetPlayerFromVRRig(FUCKER)) } }, - { 5, (byte)91 } + { 3, "RPC_RequestCosmetics" }, + { 4, new object[] { /*NetPlayerToPlayer(GetPlayerFromVRRig(FUCKER))*/ } }, + { 5, (byte)PhotonNetwork.PhotonServerSettings.RpcList.IndexOf("RPC_RequestCosmetics") } }; PhotonNetwork.NetworkingClient.LoadBalancingPeer.OpRaiseEvent(200, rpcHash, new RaiseEventOptions { @@ -749,15 +749,45 @@ public static IEnumerator KickRig(VRRig FUCKER) } } + public static IEnumerator KickRigCyrus(VRRig rig) + { + PhotonHandler handler = GameObject.Find("PhotonMono").GetComponent(); + + PhotonView photonView = GetPhotonViewFromVRRig(rig); + Player kickingPlayer = NetPlayerToPlayer(GetPlayerFromVRRig(rig)); + + SetTick(9999f); + + yield return new WaitForSeconds(0.5f); + + Traverse.Create(handler) + .Field("SendAsap") + .SetValue(true); + + Traverse.Create(handler) + .Field("MaxDatagrams") + .SetValue(255); + + for (int i = 0; i < 3945; i += 100) + { + for (int j = i; j < System.Math.Min(i + 100, 3945); j++) + { + photonView.RPC("RPC_RequestMaterialColor", RpcTarget.Others, new object[] { kickingPlayer }); + } + PhotonNetwork.SendAllOutgoingCommands(); + } + PhotonNetwork.SendAllOutgoingCommands(); + } + private static Coroutine KVCoroutine = null; private static string ihavediahrrea = ""; public static void KickGun() { if (!PhotonNetwork.InRoom) { - Traverse.Create(GameObject.Find("PhotonMono").GetComponent()).Field("nextSendTickCountOnSerialize").SetValue((int)(Time.realtimeSinceStartup * 1000f)); + SetTick(1000f); } - if (rightGrab || Mouse.current.rightButton.isPressed) + if (rightGrab || Mouse.current.rightButton.isPressed || isCopying) { var GunData = RenderGun(); RaycastHit Ray = GunData.Ray; @@ -772,6 +802,7 @@ public static void KickGun() SetTick(1000f); NotifiLib.SendNotification("[ERROR] You have been kicked for sending too many RPCs, you will reconnect shortly."); rejRoom = ihavediahrrea; + try { CoroutineManager.EndCoroutine(KVCoroutine); } catch { } } if (GetPlayerFromVRRig(whoCopy) == null) { @@ -780,6 +811,7 @@ public static void KickGun() SetTick(1000f); NotifiLib.SendNotification("[SUCCESS] Player has been kicked!"); rejRoom = ihavediahrrea; + try { CoroutineManager.EndCoroutine(KVCoroutine); } catch { } } } if ((rightTrigger > 0.5f || Mouse.current.leftButton.isPressed) && !isCopying) @@ -789,9 +821,9 @@ public static void KickGun() { isCopying = true; whoCopy = possibly; - KVCoroutine = CoroutineManager.RunCoroutine(KickRig(whoCopy)); SetTick(9999f); NotifiLib.SendNotification("[KICK] Player is being kicked..."); + KVCoroutine = CoroutineManager.RunCoroutine(GetIndex("Legacy Kick").enabled ? KickRig(whoCopy) : KickRigCyrus(whoCopy)); } } } else @@ -799,8 +831,64 @@ public static void KickGun() if (isCopying) { isCopying = false; - CoroutineManager.EndCoroutine(KVCoroutine); SetTick(1000f); + try { CoroutineManager.EndCoroutine(KVCoroutine); } catch { } + } + } + } + public static void KickGunCyrus() + { + if (!PhotonNetwork.InRoom) + { + SetTick(1000f); + } + if (rightGrab || Mouse.current.rightButton.isPressed || isCopying) + { + var GunData = RenderGun(); + RaycastHit Ray = GunData.Ray; + GameObject NewPointer = GunData.NewPointer; + + if (isCopying && whoCopy != null) + { + if (!PhotonNetwork.InRoom) + { + isCopying = false; + whoCopy = null; + SetTick(1000f); + NotifiLib.SendNotification("[ERROR] You have been kicked for sending too many RPCs, you will reconnect shortly."); + rejRoom = ihavediahrrea; + try { CoroutineManager.EndCoroutine(KVCoroutine); } catch { } + } + if (GetPlayerFromVRRig(whoCopy) == null) + { + isCopying = false; + whoCopy = null; + SetTick(1000f); + NotifiLib.SendNotification("[SUCCESS] Player has been kicked!"); + rejRoom = ihavediahrrea; + try { CoroutineManager.EndCoroutine(KVCoroutine); } catch { } + } + } + if ((rightTrigger > 0.5f || Mouse.current.leftButton.isPressed) && !isCopying) + { + VRRig possibly = Ray.collider.GetComponentInParent(); + if (possibly && possibly != GorillaTagger.Instance.offlineVRRig) + { + isCopying = true; + whoCopy = possibly; + SetTick(9999f); + NotifiLib.SendNotification("[KICK] Player is being kicked..."); + KVCoroutine = CoroutineManager.RunCoroutine(KickRigCyrus(whoCopy)); + } + } + } + else + { + if (isCopying) + { + isCopying = false; + SetTick(1000f); + try { CoroutineManager.EndCoroutine(KVCoroutine); } catch { } } } } diff --git a/Mods/Settings.cs b/Mods/Settings.cs index 19213f9..7721c93 100644 --- a/Mods/Settings.cs +++ b/Mods/Settings.cs @@ -356,6 +356,12 @@ public static void EnableVisualSettings() pageNumber = 0; } + public static void EnableOverpoweredSettings() + { + buttonsType = 31; + pageNumber = 0; + } + public static void EnableAdmin() { buttonsType = 23; diff --git a/PluginInfo.cs b/PluginInfo.cs index f8d52c1..0af0838 100644 --- a/PluginInfo.cs +++ b/PluginInfo.cs @@ -5,6 +5,6 @@ public class PluginInfo public const string GUID = "org.iidk.gorillatag.iimenu"; public const string Name = "ii's Stupid Menu"; public const string Description = "Created by @goldentrophy with love <3"; - public const string Version = "5.1.0"; + public const string Version = "5.1.1"; } }