Skip to content

Commit

Permalink
exclude player as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Sep 2, 2024
1 parent a5027bc commit f0baaa2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/consoleshadows.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,17 @@ public:
void operator()(injector::reg_pack& regs)
{
auto FindPlayerCar = (int (*)())0x93F1C0;
auto getLocalPlayerPed = (int (*)())0x93F050;

if (bHeadlightShadows && regs.esi == FindPlayerCar())
if (bHeadlightShadows)
{
*(uintptr_t*)(regs.esp - 4) = 0xAE3867;
return;
auto car = FindPlayerCar();

if (regs.esi && (regs.esi == car || (regs.esi == getLocalPlayerPed() && car && *(BYTE*)(car + 0xFA0))))
{
*(uintptr_t*)(regs.esp - 4) = 0xAE3867;
return;
}
}

if ((bVehicleNightShadows && !bHeadlightShadows) && (regs.eax == 3 || regs.eax == 4))
Expand Down

0 comments on commit f0baaa2

Please sign in to comment.