From 1b71d0d64832f182e06ac71a2163b7a5dea4bbfd Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 21 Sep 2026 12:41:20 -0400 Subject: Use simpler version of Hide Knife Will no longer work in cutscenes. Toggling the knife from the waist part can be used instead. Signed-off-by: Andrew Opalach --- Player.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Player.cs b/Player.cs index 9abc16f..dea9261 100644 --- a/Player.cs +++ b/Player.cs @@ -35,7 +35,6 @@ namespace NewCamera } private static bool hideWeapon = false; private static bool hideKnife = false; - private static bool checkKnifeHidden = false; private delegate void CollisionCheckDelegate(nint unknownPtr, nint unknownPtr2); private static Hook? collisionCheckHook; @@ -452,6 +451,7 @@ namespace NewCamera if (hideWeapon) { // MonsterHunterWorld.exe+1789ABA - mov rdi,[rcx+000076B0] + //new NativeAction(0x141789AB0).Invoke(player.Instance, 0); nint baseAddr = MemoryUtil.Read(player.Instance + 0x76B0); if (baseAddr != 0x0) { @@ -467,7 +467,6 @@ namespace NewCamera } } } - /* if (hideKnife) { // Emulate what Carving and Flourish emote do at @@ -477,7 +476,6 @@ namespace NewCamera MemoryUtil.GetRef(player.Instance + 0x8938) |= (1 << 6); MemoryUtil.GetRef(player.Instance + 0x8968) |= (1 << 6); } - */ } } @@ -1557,7 +1555,7 @@ namespace NewCamera private static bool usingArmorState() { return (bodyRotations.Count > 0 || bodyOffsets.Count > 0 || faceRotations.Count > 0 || faceOffsets.Count > 0) || - (hideKnife || checkKnifeHidden) || (enableFreeCamera && orbitPlayer && orbitJoint >= 0); + (enableFreeCamera && orbitPlayer && orbitJoint >= 0); } private static void UpdateJointRotationHook(nint model) @@ -1575,11 +1573,13 @@ namespace NewCamera { MemoryUtil.GetRef(addr + 0x70) *= Quaternion.CreateFromYawPitchRoll(rotations[0].X, rotations[0].Y, rotations[0].Z); } + /* if (playerArmor[Armor.Waist] != 0x0) { MemoryUtil.GetRef(playerArmor[Armor.Waist] + 0x2D0) = hideKnife ? (byte)0xFD : (byte)0xFF; checkKnifeHidden = false; } + */ } else if (player != null && model == playerArmor[Armor.Face]) { @@ -1656,10 +1656,7 @@ namespace NewCamera ImGui.Checkbox("Hide Weapon", ref hideWeapon); ImGui.SameLine(); - if (ImGui.Checkbox("Hide Knife", ref hideKnife)) - { - checkKnifeHidden = true; - } + ImGui.Checkbox("Hide Knife", ref hideKnife); ImGui.SetCursorPos(ImGui.GetCursorPos() + new Vector2(0.0f, 6.0f)); ImGui.Text("Head Armor Display"); // MonsterHunterWorld.exe+11A2967 - cmp byte ptr [rax+001403E1],01 -- cgit v1.2.3-101-g0448