mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-28 23:03:01 +05:00
parent
bee5b44af1
commit
9de11adc48
2 changed files with 22 additions and 13 deletions
|
@ -22,8 +22,8 @@ SunSizeHack=1
|
||||||
; This matches the behaviour present in GTA III or VC, but may not look perfect in all cases - so consider it
|
; This matches the behaviour present in GTA III or VC, but may not look perfect in all cases - so consider it
|
||||||
; a matter of personal preference
|
; a matter of personal preference
|
||||||
DirectionalFromSun=0
|
DirectionalFromSun=0
|
||||||
; When this setting is enabled, police helicopter will not be able to hurt CJ when Invicibility Cheat is active
|
; When this setting is enabled, police helicopter will not be able to hurt CJ when Invincibility Cheat is active
|
||||||
TrueInvicibility=0
|
TrueInvincibility=0
|
||||||
; Allows to override units used by the game - 0 forces metric units, 1 forces imperial units,
|
; Allows to override units used by the game - 0 forces metric units, 1 forces imperial units,
|
||||||
; -1 makes the game use units based on system locale
|
; -1 makes the game use units based on system locale
|
||||||
Units=-1
|
Units=-1
|
||||||
|
|
|
@ -1840,7 +1840,7 @@ namespace LightbeamFix
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace TrueInvicibility
|
namespace TrueInvincibility
|
||||||
{
|
{
|
||||||
static bool isEnabled = false;
|
static bool isEnabled = false;
|
||||||
static uintptr_t WillKillJumpBack;
|
static uintptr_t WillKillJumpBack;
|
||||||
|
@ -4145,18 +4145,27 @@ BOOL InjectDelayedPatches_10()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// True invicibility - not being hurt by Police Maverick bullets anymore
|
// True invincibility - not being hurt by Police Maverick bullets anymore
|
||||||
if ( const int INIoption = GetPrivateProfileIntW(L"SilentPatch", L"TrueInvicibility", -1, wcModulePath); INIoption != -1 && !bSAMP )
|
if ( !bSAMP )
|
||||||
{
|
{
|
||||||
using namespace TrueInvicibility;
|
int INIoption = GetPrivateProfileIntW(L"SilentPatch", L"TrueInvincibility", -1, wcModulePath);
|
||||||
|
if (INIoption == -1)
|
||||||
isEnabled = INIoption != 0;
|
|
||||||
WillKillJumpBack = 0x4B3238;
|
|
||||||
InjectHook( 0x4B322E, ComputeWillKillPedHook, HookType::Jump );
|
|
||||||
|
|
||||||
if ( bHasDebugMenu )
|
|
||||||
{
|
{
|
||||||
DebugMenuAddVar( "SilentPatch", "True invicibility", &isEnabled, nullptr );
|
// Minor spelling mistake, keep it for backwards compatibility with old INI files
|
||||||
|
INIoption = GetPrivateProfileIntW(L"SilentPatch", L"TrueInvicibility", -1, wcModulePath);
|
||||||
|
}
|
||||||
|
if (INIoption != -1)
|
||||||
|
{
|
||||||
|
using namespace TrueInvincibility;
|
||||||
|
|
||||||
|
isEnabled = INIoption != 0;
|
||||||
|
WillKillJumpBack = 0x4B3238;
|
||||||
|
InjectHook( 0x4B322E, ComputeWillKillPedHook, HookType::Jump );
|
||||||
|
|
||||||
|
if ( bHasDebugMenu )
|
||||||
|
{
|
||||||
|
DebugMenuAddVar( "SilentPatch", "True invincibility", &isEnabled, nullptr );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue