Cleanup, fixes

This commit is contained in:
Grinch_ 2021-07-15 17:08:21 +06:00
parent a4c28025bc
commit 4d7065e803
4 changed files with 13 additions and 7 deletions

View File

@ -180,7 +180,7 @@ void MenuThread(void* param)
Hook::ApplyMouseFix();
// Wait till the game is initialized
Events::initGameEvent += []
Events::initRwEvent += []
{
bGameInit = true;
};

View File

@ -51,14 +51,18 @@ void Util::LoadTexturesInDirRecursive(const char* path, const char* file_ext, st
HRESULT hr = -1;
if (Globals::renderer == Render_DirectX9)
{
hr = D3DXCreateTextureFromFileA(GetD3DDevice(), p.path().string().c_str(),
reinterpret_cast<PDIRECT3DTEXTURE9*>(&store_vec.back().get()->m_pTexture));
reinterpret_cast<PDIRECT3DTEXTURE9*>(&store_vec.back().get()->m_pTexture));
}
else
{
if (LoadTextureFromFileDx11(p.path().string().c_str(),
reinterpret_cast<ID3D11ShaderResourceView**>(&store_vec.back().get()->
m_pTexture)))
reinterpret_cast<ID3D11ShaderResourceView**>(&store_vec.back().get()->
m_pTexture)))
{
hr = S_OK;
}
}
if (hr == S_OK)

View File

@ -8,6 +8,8 @@ Vehicle::Vehicle()
{
ParseVehiclesIDE();
ParseCarcolsDAT();
Events::processScriptsEvent += [this]
{

View File

@ -146,9 +146,9 @@ void Weapon::Draw()
ImGui::BeginChild("CheckboxesChild");
ImGui::Columns(2, 0, false);
Ui::CheckboxWithHint("Auto aim", &m_bAutoAim, "Enables aim assist on keyboard\n\nQ = left E = right");
if (Ui::CheckboxWithHint("Dual weild", &m_bDualWeild,
"Dual weild pistol, shawoff, uzi, tec9\n(Other weapons don't work)"))
Ui::CheckboxWithHint("Fast aim", &m_bAutoAim, "Enables aim assist on keyboard\n\nQ = left E = right\n\nPress Q and E to switch targets.\nMoving mouse removes the target!");
if (Ui::CheckboxWithHint("Dual wield", &m_bDualWeild,
"Dual wield pistol, shawoff, uzi, tec9\n(Other weapons don't work)"))
{
if (!m_bDualWeild)
CWeaponInfo::LoadWeaponData();