Skip to content

Commit d278f2a

Browse files
authored
Added support for UE 5.4 (#96)
1 parent ebed573 commit d278f2a

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/game_engine/unreal/mod.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,20 @@ impl Module {
5656
};
5757

5858
let g_world = {
59-
const GWORLD: &[(Signature<22>, u8)] = &[(
60-
Signature::new("48 8B 05 ?? ?? ?? ?? 48 3B ?? 48 0F 44 ?? 48 89 05 ?? ?? ?? ?? E8"),
61-
3,
62-
)];
59+
const GWORLD: &[(Signature<22>, u8)] = &[
60+
(
61+
Signature::new(
62+
"80 7C 24 ?? 00 ?? ?? 48 8B 3D ?? ?? ?? ?? 48 ?? ?? ?? ?? ?? ?? ??",
63+
),
64+
10,
65+
),
66+
(
67+
Signature::new(
68+
"48 8B 05 ?? ?? ?? ?? 48 3B ?? 48 0F 44 ?? 48 89 05 ?? ?? ?? ?? E8",
69+
),
70+
3,
71+
),
72+
];
6373

6474
let addr = GWORLD.iter().find_map(|(sig, offset)| {
6575
Some(sig.scan_process_range(process, module_range)? + *offset)
@@ -491,7 +501,7 @@ impl Offsets {
491501
uproperty_property_link_next: 0x58,
492502
},
493503
// Tested on Unreal Physics
494-
Version::V5_3 => &Self {
504+
Version::V5_3 | Version::V5_4 => &Self {
495505
uobject_fname: 0x18,
496506
uobject_class: 0x10,
497507
uclass_super_field: 0x40,
@@ -520,4 +530,5 @@ pub enum Version {
520530
V5_1,
521531
V5_2,
522532
V5_3,
533+
V5_4,
523534
}

0 commit comments

Comments
 (0)