mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[NAK_CVR_Mods] Change every instance of "NotAKidOnSteam" to "NotAKidoS"
This commit is contained in:
parent
a6c030955e
commit
7f02d6811f
159 changed files with 711 additions and 294 deletions
|
@ -1,5 +1,6 @@
|
|||
using System.Diagnostics;
|
||||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.Util.AnimatorManager;
|
||||
using NAK.AvatarScaleMod.AvatarScaling;
|
||||
using NAK.AvatarScaleMod.ScaledComponents;
|
||||
using UnityEngine;
|
||||
|
@ -178,9 +179,13 @@ public class BaseScaler : MonoBehaviour
|
|||
if (_avatarTransform == null)
|
||||
return false;
|
||||
|
||||
_targetHeightChanged = false;
|
||||
|
||||
ScaleAvatarRoot();
|
||||
UpdateAnimatorParameter();
|
||||
ApplyComponentScaling();
|
||||
|
||||
InvokeTargetHeightChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -195,11 +200,13 @@ public class BaseScaler : MonoBehaviour
|
|||
_targetHeight = _initialHeight;
|
||||
_targetScale = _initialScale;
|
||||
_scaleFactor = 1f;
|
||||
_targetHeightChanged = true;
|
||||
_targetHeightChanged = false;
|
||||
|
||||
ScaleAvatarRoot();
|
||||
UpdateAnimatorParameter();
|
||||
ApplyComponentScaling();
|
||||
|
||||
InvokeTargetHeightReset();
|
||||
}
|
||||
|
||||
private void ScaleAvatarRoot()
|
||||
|
@ -222,17 +229,23 @@ public class BaseScaler : MonoBehaviour
|
|||
if (!_isAvatarInstantiated)
|
||||
return; // no avatar
|
||||
|
||||
if (!_targetHeightChanged
|
||||
&& _useTargetHeight)
|
||||
ScaleAvatarRoot();
|
||||
if (!_shouldForceHeight)
|
||||
return; // using built-in scaling
|
||||
|
||||
if (!_targetHeightChanged)
|
||||
return;
|
||||
// called on state change
|
||||
if (_targetHeightChanged)
|
||||
{
|
||||
if (_useTargetHeight)
|
||||
ApplyTargetHeight();
|
||||
else
|
||||
ResetTargetHeight();
|
||||
_targetHeightChanged = false;
|
||||
InvokeTargetHeightChanged();
|
||||
}
|
||||
|
||||
if (_useTargetHeight)
|
||||
ApplyTargetHeight();
|
||||
else
|
||||
ResetTargetHeight();
|
||||
// called constantly when forcing change
|
||||
if (_shouldForceHeight)
|
||||
ScaleAvatarRoot();
|
||||
}
|
||||
|
||||
internal virtual void OnDestroy()
|
||||
|
@ -241,7 +254,7 @@ public class BaseScaler : MonoBehaviour
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Component Scaling
|
||||
|
||||
internal static readonly Type[] scalableComponentTypes =
|
||||
|
|
|
@ -35,8 +35,8 @@ public class LocalScaler : BaseScaler
|
|||
if (_animatorManager == null)
|
||||
return;
|
||||
|
||||
_animatorManager.SetAnimatorParameter(ScaleFactorParameterName, _scaleFactor);
|
||||
_animatorManager.SetAnimatorParameter(ScaleFactorParameterNameLocal, _scaleFactor);
|
||||
_animatorManager.SetParameter(ScaleFactorParameterName, _scaleFactor);
|
||||
_animatorManager.SetParameter(ScaleFactorParameterNameLocal, _scaleFactor);
|
||||
}
|
||||
|
||||
public override void LateUpdate()
|
||||
|
@ -84,7 +84,6 @@ public class LocalScaler : BaseScaler
|
|||
// animation scale changed and now will override universal scaling
|
||||
ResetTargetHeight();
|
||||
InvokeAnimatedHeightOverride();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class NetworkScaler : BaseScaler
|
|||
|
||||
protected override void UpdateAnimatorParameter()
|
||||
{
|
||||
_animatorManager?.SetAnimatorParameter(ScaleFactorParameterNameLocal, _scaleFactor);
|
||||
_animatorManager?.SetParameter(ScaleFactorParameterNameLocal, _scaleFactor);
|
||||
}
|
||||
|
||||
internal override void OnDestroy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue