Fix fov issue with freecam

This commit is contained in:
Grinch_ 2021-08-01 17:48:20 +06:00
parent 5e9761df61
commit 3c3dff6716
2 changed files with 2 additions and 7 deletions

View File

@ -30,7 +30,6 @@ Game::Game()
{
m_MissionData.m_Json.LoadData(m_MissionData.m_Categories, m_MissionData.m_Selected);
m_StatData.m_Json.LoadData(m_StatData.m_Categories, m_StatData.m_Selected);
m_Freecam::m_fFOV = TheCamera.FindCamFOV();
// Generate enabled cheats vector
for (auto element : m_RandomCheats::m_Json.m_Data.items())
@ -482,11 +481,7 @@ Lowers armour, health, stamina etc."))
}
ImGui::Spacing();
if (ImGui::SliderFloat("Field of view", &m_Freecam::m_fFOV, 5.0f, 120.0f))
{
TheCamera.LerpFOV(TheCamera.FindCamFOV(), m_Freecam::m_fFOV, 250.0f, true);
Command<Commands::CAMERA_PERSIST_FOV>(true);
}
ImGui::SliderFloat("Field of view", &m_Freecam::m_fFOV, 5.0f, 120.0f);
ImGui::SliderFloat("Movement Speed", &m_Freecam::m_fSpeed, 0.0f, 0.5f);
ImGui::Spacing();
ImGui::TextWrapped("Press Enter to teleport player to camera location");

View File

@ -19,7 +19,7 @@ public:
{
inline static bool m_bEnabled;
inline static float m_fSpeed = 0.08f;
inline static float m_fFOV = -1;
inline static float m_fFOV = 60.0f;
inline static bool m_bInitDone;
inline static CPed* m_pPed;
inline static int m_nPed = -1;