mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[DesktopVRIK] Cleanup
This commit is contained in:
parent
497b0b0e7a
commit
32456e0055
5 changed files with 17 additions and 17 deletions
|
@ -107,13 +107,14 @@ internal class PlayerSetupPatches
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
__runOriginal = true;
|
__runOriginal = true;
|
||||||
if (IKManager.Instance == null)
|
if (IKManager.Instance == null || !IKManager.Instance.IsAvatarInitialized())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CVRMovementParent currentParent = __instance._movementSystem._currentParent;
|
CVRMovementParent currentParent = __instance._movementSystem._currentParent;
|
||||||
__runOriginal = (currentParent != null && currentParent._referencePoint != null)
|
if (currentParent != null && currentParent._referencePoint != null)
|
||||||
? IKManager.Instance.OnPlayerHandleMovementParent(currentParent)
|
IKManager.Instance.OnPlayerHandleMovementParent(currentParent);
|
||||||
: IKManager.Instance.OnPlayerTeleported();
|
else
|
||||||
|
IKManager.Instance.OnPlayerTeleported();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,6 +142,7 @@ internal abstract class IKHandler
|
||||||
public virtual void Reset()
|
public virtual void Reset()
|
||||||
{
|
{
|
||||||
_ikSimulatedRootAngle = _vrik.transform.eulerAngles.y;
|
_ikSimulatedRootAngle = _vrik.transform.eulerAngles.y;
|
||||||
|
|
||||||
if(ModSettings.EntryResetFootstepsOnIdle.Value)
|
if(ModSettings.EntryResetFootstepsOnIdle.Value)
|
||||||
VRIKUtils.ResetToInitialFootsteps(_vrik, _locomotionData, _scaleDifference);
|
VRIKUtils.ResetToInitialFootsteps(_vrik, _locomotionData, _scaleDifference);
|
||||||
|
|
||||||
|
|
|
@ -115,14 +115,10 @@ internal class IKHandlerDesktop : IKHandler
|
||||||
|
|
||||||
private void ResetSolverIfNeeded()
|
private void ResetSolverIfNeeded()
|
||||||
{
|
{
|
||||||
if (_wasTrackingLocomotion == BodySystem.TrackingLocomotionEnabled)
|
if (_wasTrackingLocomotion == BodySystem.TrackingLocomotionEnabled) return;
|
||||||
return;
|
|
||||||
|
|
||||||
_wasTrackingLocomotion = BodySystem.TrackingLocomotionEnabled;
|
_wasTrackingLocomotion = BodySystem.TrackingLocomotionEnabled;
|
||||||
if (ModSettings.EntryResetFootstepsOnIdle.Value)
|
|
||||||
VRIKUtils.ResetToInitialFootsteps(_vrik, _locomotionData, _scaleDifference);
|
|
||||||
|
|
||||||
_solver.Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -61,10 +61,7 @@ public class IKManager : MonoBehaviour
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (_ikHandler == null)
|
_ikHandler?.UpdateWeights();
|
||||||
return;
|
|
||||||
|
|
||||||
_ikHandler.UpdateWeights();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -214,6 +211,11 @@ public class IKManager : MonoBehaviour
|
||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
|
public bool IsAvatarInitialized()
|
||||||
|
{
|
||||||
|
return _isAvatarInitialized;
|
||||||
|
}
|
||||||
|
|
||||||
public Vector3 GetPlayerPosition()
|
public Vector3 GetPlayerPosition()
|
||||||
{
|
{
|
||||||
if (!MetaPort.Instance.isUsingVr)
|
if (!MetaPort.Instance.isUsingVr)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_id": 117,
|
"_id": 117,
|
||||||
"name": "DesktopVRIK",
|
"name": "DesktopVRIK",
|
||||||
"modversion": "4.2.6",
|
"modversion": "4.2.7",
|
||||||
"gameversion": "2023r172",
|
"gameversion": "2023r172",
|
||||||
"loaderversion": "0.6.1",
|
"loaderversion": "0.6.1",
|
||||||
"modtype": "Mod",
|
"modtype": "Mod",
|
||||||
|
@ -17,8 +17,8 @@
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"BTKUILib"
|
"BTKUILib"
|
||||||
],
|
],
|
||||||
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r21/DesktopVRIK.dll",
|
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r22/DesktopVRIK.dll",
|
||||||
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRIK/",
|
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopVRIK/",
|
||||||
"changelog": "- Movement Parent IK handling now respects new orientation mode.\n- Changed avatar initialization patch location to resolve a potential mod conflict.",
|
"changelog": "- Fixed Prone Thrusting option ignoring set Body Leaning weight.\n- Potential fix for avatars feet randomly targeting far away while stutter-stepping.",
|
||||||
"embedcolor": "#9b59b6"
|
"embedcolor": "#9b59b6"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue