Skip to content

Commit 9095d2f

Browse files
committed
Support for latest Epic Store version (22.04)
1 parent c96fff7 commit 9095d2f

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

src/addresses.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ static uintptr_t g_Address[Address::COUNT] = {};
66

77
void InitAddresses(bool is_steam)
88
{
9-
g_Address[SANITY_CHECK] = is_steam ? 0x141e7ee40 : 0x141e84948;
9+
g_Address[SANITY_CHECK] = is_steam ? 0x141e7ee40 : 0x141e84958;
1010
g_Address[INST_CLOCK] = is_steam ? 0x142c846b0 : 0x142c8aaa8;
1111
g_Address[INST_CHARACTER_MANAGER] = is_steam ? 0x142cb1d40 : 0x142cb8110;
1212
g_Address[INST_GAME_WORLD] = is_steam ? 0x142cb0a48 : 0x142cb6e08;
@@ -22,7 +22,7 @@ void InitAddresses(bool is_steam)
2222
g_Address[IS_INTRO_MOVIE_COMPLETE] = is_steam ? 0x140e93530 : 0x140e9a8d0;
2323
g_Address[WND_PROC] = is_steam ? 0x140c7fb50 : 0x140c86830;
2424
g_Address[GRAPHICS_FLIP] = is_steam ? 0x140fa2c70 : 0x140fa9fd0;
25-
g_Address[PLAYER_MANAGER_UPDATE] = is_steam ? 0x1498aa770 : 0x150a80780;
25+
g_Address[PLAYER_MANAGER_UPDATE] = is_steam ? 0x1498aa770 : 0x14eb62e10;
2626
g_Address[FIRING_MODULE_CONSUME_AMMO] = is_steam ? 0x140728840 : 0x14072c510;
2727
g_Address[VAR_GAME_STATE] = is_steam ? 0x142cb8f24 : 0x142cbf2d4;
2828
g_Address[VAR_SUSPEND_GAME] = is_steam ? 0x142cbdaf0 : 0x142cc3f90;
@@ -36,7 +36,7 @@ void InitAddresses(bool is_steam)
3636
g_Address[CHARACTER_GET_VEHICLE_PTR] = is_steam ? 0x14054fd50 : 0x140551a10;
3737
g_Address[SEND_EVENT] = is_steam ? 0x140286930 : 0x140287680;
3838
g_Address[SPAWN_SYSTEM_SPAWN] = is_steam ? 0x140badc60 : 0x140bb4290;
39-
g_Address[SPAWN_SYSTEM_PARSE_TAGS] = is_steam ? 0x1499d0740 : 0x150c10491;
39+
g_Address[SPAWN_SYSTEM_PARSE_TAGS] = is_steam ? 0x1499d0740 : 0x14ec92981;
4040
g_Address[SPAWN_SYSTEM_GET_MATCHING_RESOURCES] = is_steam ? 0x140b88770 : 0x140b8e7a0;
4141
g_Address[WORLDTIME_SET_TIME] = is_steam ? 0x140322720 : 0x140324070;
4242
g_Address[INPUT_LOST_FOCUS] = is_steam ? 0x140fc8560 : 0x140fcde60;
@@ -45,11 +45,10 @@ void InitAddresses(bool is_steam)
4545
g_Address[ENTITY_PROVIDER_LOAD_RESOURCES] = is_steam ? 0x140284870 : 0x140285590;
4646
g_Address[ENTITY_PROVIDER_UPDATE_INTERNAL] = is_steam ? 0x140294f20 : 0x140295cd0;
4747
g_Address[DRAW_SKIN_BATCHES] = is_steam ? 0x140d1a150 : 0x140d21090;
48-
g_Address[DAMAGEABLE_SET_INVULNERABLE] = is_steam ? 0x1485ce1e0 : 0x14f12fe50;
4948
g_Address[RUNTIME_CONTAINER_GET_HASH] = is_steam ? 0x140091360 : 0x140090f60;
50-
g_Address[VTABLE_RENDERBLOCKCHARACTER] = is_steam ? 0x141eac3a0 : 0x141eb1eb0;
51-
g_Address[VTABLE_RENDERBLOCKCHARACTERSKIN] = is_steam ? 0x141eac550 : 0x141eb2060;
52-
g_Address[VTABLE_RENDERBLOCKGENERAL] = is_steam ? 0x141ebdf50 : 0x141ec3a70;
49+
g_Address[VTABLE_RENDERBLOCKCHARACTER] = is_steam ? 0x141eac3a0 : 0x141eb1ec0;
50+
g_Address[VTABLE_RENDERBLOCKCHARACTERSKIN] = is_steam ? 0x141eac550 : 0x141eb2070;
51+
g_Address[VTABLE_RENDERBLOCKGENERAL] = is_steam ? 0x141ebdf50 : 0x141ec3a80;
5352
}
5453

5554
uintptr_t GetAddress(Address address)

src/addresses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ enum Address {
4444
ENTITY_PROVIDER_LOAD_RESOURCES,
4545
ENTITY_PROVIDER_UPDATE_INTERNAL,
4646
DRAW_SKIN_BATCHES,
47-
DAMAGEABLE_SET_INVULNERABLE,
4847
RUNTIME_CONTAINER_GET_HASH,
4948
VTABLE_RENDERBLOCKCHARACTER,
5049
VTABLE_RENDERBLOCKCHARACTERSKIN,

src/generator/main.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,6 @@ FindPatternResult Generate(const char* name, const char* exepath)
284284
return disp_rebase(game_file, match).as<uintptr_t>();
285285
});
286286

287-
FindPattern("DAMAGEABLE_SET_INVULNERABLE", result, [&] {
288-
auto match = pattern("80 A1 ? ? ? ? ? 00 D2", game_file).count(1).get(0).as<uintptr_t>();
289-
return rebase(game_file, match);
290-
});
291-
292287
FindPattern("RUNTIME_CONTAINER_GET_HASH", result, [&] {
293288
auto match = pattern("48 8B CD E8 ? ? ? ? 33 FF 48 89 7C 24 ?", game_file).count(1).get(0).adjust(3).extract_call();
294289
return rebase(game_file, match);

src/patches.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ static void PlayerManagerUpdate(CPlayerManager *_this, float dt)
8484
{
8585
static CGameObject *invul_vehicle = nullptr;
8686
static auto SetInvulnerable = [](CGameObject *game_object, bool invulnerable) {
87-
meow_hook::func_call<void>(GetAddress(DAMAGEABLE_SET_INVULNERABLE), game_object, invulnerable);
87+
// see: 0x1485ce1e0
88+
*(uint8_t *)((char *)game_object + 0x418) &= 0xFDu;
89+
*(uint8_t *)((char *)game_object + 0x418) |= 2 * invulnerable;
8890
};
8991

9092
const auto character = jc::CPlayerManager::GetLocalPlayerCharacter();

0 commit comments

Comments
 (0)