Skip to content

Commit

Permalink
Only force camera yaw in first person
Browse files Browse the repository at this point in the history
There was a reason I originally put this null check outside of the check for first person mode, but I can't remember what it was. Presumably I mistakenly thought that was the solution to some problem that no longer exists. Let's hope so, because doing so broke going through doors in third person.
  • Loading branch information
ItEndsWithTens committed Mar 14, 2024
1 parent dbb1696 commit 27bdf1f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/SHME.ExternalTool/UI/CustomMainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,6 @@ public override void UpdateValues(ToolFormUpdateType type)
_harryModel = new Ilm(header, remaining);
}

if (_forcedCameraYaw != null)
{
_holdCameraPitch = 0;
_holdCameraYaw = Core.DegreesToGameUnits((float)_forcedCameraYaw);
_holdCameraRoll = 0;
HoldCamera();

_forcedCameraYaw = null;
}

switch (type)
{
case ToolFormUpdateType.PreFrame:
Expand Down Expand Up @@ -332,6 +322,15 @@ public override void UpdateValues(ToolFormUpdateType type)
SetButtonNames();
_lastControllerLayoutHash = hash;
}
if (_forcedCameraYaw != null)
{
_holdCameraPitch = 0;
_holdCameraYaw = Core.DegreesToGameUnits((float)_forcedCameraYaw);
_holdCameraRoll = 0;
HoldCamera();

_forcedCameraYaw = null;
}
MoveCameraFirstPerson();
AimCamera(BtnCameraFps);
Mem.WriteU16(Rom.Addresses.MainRam.HarryYaw, _holdCameraYaw);
Expand Down

0 comments on commit 27bdf1f

Please sign in to comment.