Skip to content

Commit

Permalink
gtasade: camera tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Nov 21, 2024
1 parent eaf4cce commit 068b0fa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions source/GTA3DE.FusionMod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace UUI_LegalScreen
HWND ghWnd;
void LockCursor()
{
if (ghWnd == GetFocus())
if (ghWnd == GetForegroundWindow())
{
RECT windowRect;
POINT pt = { 0, 0 };
Expand Down Expand Up @@ -426,7 +426,7 @@ void Init()
}
}

if (fHudScale != 1.0f || fRadarScale != 1.0f)
//if (fHudScale != 1.0f || fRadarScale != 1.0f)
{
auto str = utility::scan_string(utility::get_executable(), "%s %f %f %f %f %s %s", true);
if (str)
Expand Down
19 changes: 16 additions & 3 deletions source/GTASADE.FusionMod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace UUI_LegalScreen
HWND ghWnd;
void LockCursor()
{
if (ghWnd == GetFocus())
if (ghWnd == GetForegroundWindow())
{
RECT windowRect;
POINT pt = { 0, 0 };
Expand Down Expand Up @@ -469,7 +469,7 @@ void Init()
}
}

if (fHudScale != 1.0f || fRadarScale != 1.0f)
//if (fHudScale != 1.0f || fRadarScale != 1.0f)
{
auto str = utility::scan_string(utility::get_executable(), "%s %f %f %f %f %s %s", true);
if (str)
Expand Down Expand Up @@ -782,6 +782,20 @@ void Init()
});

// y axis delay
pattern = hook::pattern("F3 0F 10 46 ? 0F 57 C9 F3 41 0F 10 CA");
static auto Alpha = safetyhook::create_mid(pattern.get_first(), [](SafetyHookContext& regs)
{
if (fTimer <= 0.0f || fabs(fAimWeaponUpDown) > fThreshold)
{

}
else
{
*(float*)regs.rsi = regs.xmm1.f32[0];
regs.xmm10.f32[0] = regs.xmm1.f32[0];
}
});

pattern = hook::pattern("F3 0F 11 36 F3 44 0F 58 F0");
injector::MakeNOP(pattern.get_first(), 4, true);
static auto targetAlphaBlendAmount = safetyhook::create_mid(pattern.get_first(), [](SafetyHookContext& regs)
Expand All @@ -791,7 +805,6 @@ void Init()
else
regs.xmm14.f32[0] = *(float*)regs.rsi;
});

}
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/GTAVCDE.FusionMod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace UUI_LegalScreen
HWND ghWnd;
void LockCursor()
{
if (ghWnd == GetFocus())
if (ghWnd == GetForegroundWindow())
{
RECT windowRect;
POINT pt = { 0, 0 };
Expand Down Expand Up @@ -420,7 +420,7 @@ void Init()
}
}

if (fHudScale != 1.0f || fRadarScale != 1.0f)
//if (fHudScale != 1.0f || fRadarScale != 1.0f)
{
auto str = utility::scan_string(utility::get_executable(), "%s %f %f %f %f %s %s", true);
if (str)
Expand Down

0 comments on commit 068b0fa

Please sign in to comment.