Save radar & hud state for freecam, fix overlay pos bug
This commit is contained in:
parent
ea83dc8c09
commit
d75d1aa00e
@ -167,6 +167,8 @@ void Game::FreeCam()
|
||||
{
|
||||
CPlayerPed* player = FindPlayerPed(-1);
|
||||
Command<Commands::SET_EVERYONE_IGNORE_PLAYER>(0, true);
|
||||
m_Freecam::m_bHudState = CHud::m_Wants_To_Draw_Hud;
|
||||
m_Freecam::m_bRadarState = CHud::bScriptDontDisplayRadar;
|
||||
CHud::bScriptDontDisplayRadar = true;
|
||||
CHud::m_Wants_To_Draw_Hud = false;
|
||||
CVector player_pos = player->GetPosition();
|
||||
@ -276,8 +278,8 @@ void Game::ClearFreecamStuff()
|
||||
{
|
||||
m_Freecam::m_bInitDone = false;
|
||||
Command<Commands::SET_EVERYONE_IGNORE_PLAYER>(0, false);
|
||||
CHud::bScriptDontDisplayRadar = false;
|
||||
CHud::m_Wants_To_Draw_Hud = true;
|
||||
CHud::bScriptDontDisplayRadar = m_Freecam::m_bRadarState;
|
||||
CHud::m_Wants_To_Draw_Hud = m_Freecam::m_bHudState;
|
||||
CPad::GetPad(0)->DisablePlayerControls = false;
|
||||
|
||||
Command<Commands::DELETE_CHAR>(m_Freecam::m_nPed);
|
||||
|
@ -25,6 +25,8 @@ public:
|
||||
inline static int m_nPed = -1;
|
||||
inline static CVector m_fMouse;
|
||||
inline static CVector m_fTotalMouse;
|
||||
inline static bool m_bHudState;
|
||||
inline static bool m_bRadarState;
|
||||
};
|
||||
struct m_HardMode
|
||||
{
|
||||
|
@ -84,8 +84,8 @@ void Menu::DrawOverlay()
|
||||
{
|
||||
if (m_Overlay::fPosX != NULL && m_Overlay::fPosY != NULL)
|
||||
{
|
||||
config.SetValue("overlay.fPosX", m_Overlay::fPosX);
|
||||
config.SetValue("overlay.fPosY", m_Overlay::fPosY);
|
||||
config.SetValue("overlay.posx", m_Overlay::fPosX);
|
||||
config.SetValue("overlay.posy", m_Overlay::fPosY);
|
||||
ImGui::SetNextWindowPos(ImVec2(m_Overlay::fPosX, m_Overlay::fPosY), ImGuiCond_Once);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user