diff --git a/src/Game.cpp b/src/Game.cpp index 0350719..eaa428b 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -202,7 +202,7 @@ void SetPlayerMission(std::string& rootkey, std::string& name, std::string& id) void Game::FreeCam() { - uint delta_speed = freecam::speed * (CTimer::m_snTimeInMillisecondsNonClipped - CTimer::m_snPreviousTimeInMillisecondsNonClipped); + int delta_speed = freecam::speed * (CTimer::m_snTimeInMillisecondsNonClipped - CTimer::m_snPreviousTimeInMillisecondsNonClipped); if (!freecam::init_done) { @@ -262,7 +262,6 @@ void Game::FreeCam() float angle; Command(freecam::hped,&angle); - pos.x += delta_speed * cos(angle * 3.14159f/180.0f); pos.y += delta_speed * sin(angle * 3.14159f/180.0f); pos.z += delta_speed* 2 * sin(freecam::tmouseY/3* 3.14159f/180.0f); @@ -272,11 +271,11 @@ void Game::FreeCam() { if (KeyPressed(VK_KEY_J)) delta_speed *= -1; - + float angle; Command(freecam::hped,&angle); - angle -= 90.0f; - + angle -= 90; + pos.x += delta_speed * cos(angle * 3.14159f/180.0f); pos.y += delta_speed * sin(angle * 3.14159f/180.0f); } diff --git a/src/Visual.cpp b/src/Visual.cpp index 7618a5a..24816ee 100644 --- a/src/Visual.cpp +++ b/src/Visual.cpp @@ -255,7 +255,7 @@ void Visual::Main() patch::SetPointer(0x589331, &health_bar); //patch::SetPointer(0x5890FC,&armour_bar); - init = true; + init_patches = true; } Ui::ColorPickerAddress("Armour bar", *(int*)0x5890FC, ImVec4(180,25,29,255));