mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-08-31 13:29:27 +00:00
[ASTExtension] Fixes for 2025r180
This commit is contained in:
parent
7f5ca4b29d
commit
4123a1f25d
5 changed files with 21 additions and 18 deletions
|
@ -9,13 +9,13 @@ public static class PlayerSetupExtensions
|
|||
// immediate measurement of the player's avatar height
|
||||
public static float GetCurrentAvatarHeight(this PlayerSetup playerSetup)
|
||||
{
|
||||
if (playerSetup._avatar == null)
|
||||
if (!playerSetup.IsAvatarLoaded)
|
||||
{
|
||||
ASTExtensionMod.Logger.Error("GetCurrentAvatarHeight: Avatar is null");
|
||||
return 0f;
|
||||
}
|
||||
|
||||
Vector3 localScale = playerSetup._avatar.transform.localScale;
|
||||
Vector3 localScale = playerSetup.AvatarTransform.localScale;
|
||||
Vector3 initialScale = playerSetup.initialScale;
|
||||
float initialHeight = playerSetup._initialAvatarHeight;
|
||||
Vector3 scaleDifference = CVRTools.DivideVectors(localScale - initialScale, initialScale);
|
||||
|
|
|
@ -49,7 +49,7 @@ public static partial class BtkUiAddon
|
|||
if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(_selectedPlayer, out PuppetMaster player))
|
||||
return;
|
||||
|
||||
if (player._avatar == null)
|
||||
if (!player.IsAvatarLoaded)
|
||||
return;
|
||||
|
||||
float height = player.netIkController.GetRemoteHeight();
|
||||
|
@ -64,8 +64,8 @@ public static partial class BtkUiAddon
|
|||
if (!CVRPlayerManager.Instance.GetPlayerPuppetMaster(_selectedPlayer, out PuppetMaster player))
|
||||
return;
|
||||
|
||||
AvatarAnimatorManager localAnimator = PlayerSetup.Instance.animatorManager;
|
||||
AvatarAnimatorManager remoteAnimator = player.animatorManager;
|
||||
AvatarAnimatorManager localAnimator = PlayerSetup.Instance.AnimatorManager;
|
||||
AvatarAnimatorManager remoteAnimator = player.AnimatorManager;
|
||||
if (!localAnimator.IsInitialized
|
||||
|| !remoteAnimator.IsInitialized)
|
||||
return;
|
||||
|
|
|
@ -81,7 +81,7 @@ public class ASTExtensionMod : MelonMod
|
|||
);
|
||||
|
||||
HarmonyInstance.Patch(
|
||||
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.ClearAvatar),
|
||||
typeof(PlayerBase).GetMethod(nameof(PlayerBase.ClearAvatar),
|
||||
BindingFlags.Public | BindingFlags.Instance),
|
||||
prefix: new HarmonyMethod(typeof(ASTExtensionMod).GetMethod(nameof(OnClearAvatar),
|
||||
BindingFlags.NonPublic | BindingFlags.Static))
|
||||
|
@ -112,8 +112,11 @@ public class ASTExtensionMod : MelonMod
|
|||
Instance.OnLocalAvatarLoad();
|
||||
}
|
||||
|
||||
private static void OnClearAvatar(ref CVRAvatar ____avatarDescriptor)
|
||||
=> Instance.OnLocalAvatarClear(____avatarDescriptor);
|
||||
private static void OnClearAvatar(ref PlayerBase __instance)
|
||||
{
|
||||
if (!__instance.IsLocalPlayer) return;
|
||||
Instance.OnLocalAvatarClear(__instance.AvatarDescriptor);
|
||||
}
|
||||
|
||||
#endregion Harmony Patches
|
||||
|
||||
|
@ -227,7 +230,7 @@ public class ASTExtensionMod : MelonMod
|
|||
{
|
||||
parameterName = null;
|
||||
|
||||
AvatarAnimatorManager animatorManager = PlayerSetup.Instance.animatorManager;
|
||||
AvatarAnimatorManager animatorManager = PlayerSetup.Instance.AnimatorManager;
|
||||
if (!animatorManager.IsInitialized)
|
||||
{
|
||||
Logger.Error("AnimatorManager is not initialized!");
|
||||
|
@ -254,7 +257,7 @@ public class ASTExtensionMod : MelonMod
|
|||
maxHeight = 0f;
|
||||
modifier = 1f;
|
||||
|
||||
AvatarAnimatorManager animatorManager = PlayerSetup.Instance.animatorManager;
|
||||
AvatarAnimatorManager animatorManager = PlayerSetup.Instance.AnimatorManager;
|
||||
if (!animatorManager.IsInitialized)
|
||||
{
|
||||
Logger.Error("AnimatorManager is not initialized!");
|
||||
|
@ -319,7 +322,7 @@ public class ASTExtensionMod : MelonMod
|
|||
if (!_currentAvatarSupported)
|
||||
return;
|
||||
|
||||
AvatarAnimatorManager animatorManager = PlayerSetup.Instance.animatorManager;
|
||||
AvatarAnimatorManager animatorManager = PlayerSetup.Instance.AnimatorManager;
|
||||
if (!animatorManager.IsInitialized)
|
||||
{
|
||||
Logger.Error("AnimatorManager is not initialized!");
|
||||
|
|
|
@ -17,7 +17,7 @@ using System.Reflection;
|
|||
downloadLink: "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ASTExtension"
|
||||
)]
|
||||
|
||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||
[assembly: MelonGame("ChilloutVR", "ChilloutVR")]
|
||||
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
[assembly: MelonColor(255, 246, 25, 99)] // red-pink
|
||||
|
@ -27,6 +27,6 @@ using System.Reflection;
|
|||
namespace NAK.ASTExtension.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.3";
|
||||
public const string Version = "1.0.4";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"_id": 223,
|
||||
"name": "ASTExtension",
|
||||
"modversion": "1.0.3",
|
||||
"gameversion": "2025r179",
|
||||
"loaderversion": "0.6.1",
|
||||
"modversion": "1.0.4",
|
||||
"gameversion": "2025r180",
|
||||
"loaderversion": "0.7.2",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Extension mod for [Avatar Scale Tool](https://github.com/NotAKidoS/AvatarScaleTool):\n- VR Gesture to scale\n- Persistent height\n- Copy height from others\n\nBest used with Avatar Scale Tool, but will attempt to work with found scaling setups.\nRequires already having Avatar Scaling on the avatar. This is **not** Universal Scaling.",
|
||||
|
@ -17,8 +17,8 @@
|
|||
"requirements": [
|
||||
"BTKUILib"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/ASTExtension.dll",
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r47/ASTExtension.dll",
|
||||
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/ASTExtension/",
|
||||
"changelog": "- Recompiled for 2025r179",
|
||||
"changelog": "- Fixes for 2025r180",
|
||||
"embedcolor": "#f61963"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue