summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-09-21 12:41:20 -0400
committerAndrew Opalach <andrew@akon.city> 2026-09-21 12:41:20 -0400
commit1b71d0d64832f182e06ac71a2163b7a5dea4bbfd (patch)
tree4cd49b1cc6fc62a41f50a1ba6ca1b783d8056ea2
parent8f3da9129f666c38e2ea01a3621224911ad8c3d8 (diff)
downloadNewCamera-1b71d0d64832f182e06ac71a2163b7a5dea4bbfd.tar.gz
NewCamera-1b71d0d64832f182e06ac71a2163b7a5dea4bbfd.tar.bz2
NewCamera-1b71d0d64832f182e06ac71a2163b7a5dea4bbfd.zip
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 <andrew@akon.city>
-rw-r--r--Player.cs13
1 files 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<CollisionCheckDelegate>? collisionCheckHook;
@@ -452,6 +451,7 @@ namespace NewCamera
if (hideWeapon)
{
// MonsterHunterWorld.exe+1789ABA - mov rdi,[rcx+000076B0]
+ //new NativeAction<nint, int>(0x141789AB0).Invoke(player.Instance, 0);
nint baseAddr = MemoryUtil.Read<nint>(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<int>(player.Instance + 0x8938) |= (1 << 6);
MemoryUtil.GetRef<int>(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<Quaternion>(addr + 0x70) *= Quaternion.CreateFromYawPitchRoll(rotations[0].X, rotations[0].Y, rotations[0].Z);
}
+ /*
if (playerArmor[Armor.Waist] != 0x0)
{
MemoryUtil.GetRef<byte>(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