Skip to content

Commit 4f19d7c

Browse files
committed
Changes
1 parent dc280a2 commit 4f19d7c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

modularDollyCam/MainForm.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,12 +1027,18 @@ private void replaceCurrent_Button_Click(object sender, EventArgs e)
10271027
{
10281028
int selectedIndex = keyframeDataGridView.SelectedRows[0].Index;
10291029

1030-
float x = memory.ReadFloat(xPos);
1031-
float y = memory.ReadFloat(yPos);
1032-
float z = memory.ReadFloat(zPos);
1033-
float yaw = memory.ReadFloat(yawAng);
1034-
float pitch = memory.ReadFloat(pitchAng);
1035-
float roll = memory.ReadFloat(rollAng);
1030+
byte[] CameraXBytes = memory.ReadBytes(xPos, 4);
1031+
float x = (float)Math.Round(BitConverter.ToSingle(CameraXBytes, 0), 7);
1032+
byte[] CameraYBytes = memory.ReadBytes(yPos, 4);
1033+
float y = (float)Math.Round(BitConverter.ToSingle(CameraYBytes, 0), 7);
1034+
byte[] CameraZBytes = memory.ReadBytes(zPos, 4);
1035+
float z = (float)Math.Round(BitConverter.ToSingle(CameraZBytes, 0), 7);
1036+
byte[] CameraYawBytes = memory.ReadBytes(yawAng, 4);
1037+
float yaw = (float)Math.Round(BitConverter.ToSingle(CameraYawBytes, 0), 7);
1038+
byte[] CameraPitchBytes = memory.ReadBytes(pitchAng, 4);
1039+
float pitch = (float)Math.Round(BitConverter.ToSingle(CameraPitchBytes, 0), 7);
1040+
byte[] CameraRollBytes = memory.ReadBytes(rollAng, 4);
1041+
float roll = (float)Math.Round(BitConverter.ToSingle(CameraRollBytes, 0), 7);
10361042
float fov = memory.ReadFloat(playerFov);
10371043
float transitionTime = Convert.ToSingle(keyframeDataGridView.Rows[selectedIndex].Cells["Transition Time"].Value);
10381044

0 commit comments

Comments
 (0)