public static void UpdatePlayerStateForAimMode(TMRPlayer myplayer) { PlayerAimMode aimMode = myplayer.AimMode; GunHandling gunHandling = myplayer.GunHandling; if (aimMode.IsModeLocked || (aimMode.IsAttemptingModeLock && !gunHandling.IsAnimating)) { var config = TMRConfig.Instance; float aimLockMoveSpeed = config.Get <float>(nameof(config.AimModeLockMoveSpeedScale)); myplayer.player.maxRunSpeed *= aimLockMoveSpeed; myplayer.player.accRunSpeed = myplayer.player.maxRunSpeed; myplayer.player.moveSpeed *= aimLockMoveSpeed; } }
//////////////// public float GetAimStateShakeRadiansOffset(bool isIdling) { if (this.IsModeActive) { return(0f); } float rads = PlayerAimMode.ComputeAimShakeRadiansOffsetWithinCone(); if (isIdling) { rads *= 0.03f; } return(rads); }