private void Update() { if (Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.G)) { AddPainting(); } if (Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.P)) { DebugCamera(); } if (float.IsNaN(originalTimeScale)) { originalTimeScale = Time.timeScale; } if (Config.Misc.NoFallDamage) { NoFallDamage(); } if (Config.Misc.SpeedHack && Input.GetKey(KeyCode.LeftShift)) { Time.timeScale = Config.Misc.SpeedHackValue; } else { Time.timeScale = originalTimeScale; } if (Config.Misc.ClimbHack) { try { if (groundAngle == null) { groundAngle = typeof(PlayerWalkMovement).GetField("groundAngle", BindingFlags.Instance | BindingFlags.NonPublic); } if (groundAngleNew == null) { groundAngleNew = typeof(PlayerWalkMovement).GetField("groundAngleNew", BindingFlags.Instance | BindingFlags.NonPublic); } if (UpdateObjects.playerWalkMovement != null) { groundAngle.SetValue(UpdateObjects.playerWalkMovement, 0f); groundAngleNew.SetValue(UpdateObjects.playerWalkMovement, 0f); } } catch (NullReferenceException) { } } if (Config.Misc.DisableGrass) { GrassSpawn.SetEnabled(false); } }
public static void NoGrass() => GrassSpawn.RemoveAll(false);