Skip to content

Commit

Permalink
Applied LiveSplit#96
Browse files Browse the repository at this point in the history
  • Loading branch information
Jujstme committed Jun 12, 2024
1 parent 7d0eb75 commit 3a9b6d4
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/game_engine/unreal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,20 @@ impl Module {
};

let g_world = {
const GWORLD: &[(Signature<22>, u8)] = &[(
Signature::new("48 8B 05 ?? ?? ?? ?? 48 3B ?? 48 0F 44 ?? 48 89 05 ?? ?? ?? ?? E8"),
3,
)];
const GWORLD: &[(Signature<22>, u8)] = &[
(
Signature::new(
"80 7C 24 ?? 00 ?? ?? 48 8B 3D ?? ?? ?? ?? 48 ?? ?? ?? ?? ?? ?? ??",
),
10,
),
(
Signature::new(
"48 8B 05 ?? ?? ?? ?? 48 3B ?? 48 0F 44 ?? 48 89 05 ?? ?? ?? ?? E8",
),
3,
),
];

let addr = GWORLD.iter().find_map(|(sig, offset)| {
Some(sig.scan_process_range(process, module_range)? + *offset)
Expand Down Expand Up @@ -491,7 +501,7 @@ impl Offsets {
uproperty_property_link_next: 0x58,
},
// Tested on Unreal Physics
Version::V5_3 => &Self {
Version::V5_3 | Version::V5_4 => &Self {
uobject_fname: 0x18,
uobject_class: 0x10,
uclass_super_field: 0x40,
Expand Down Expand Up @@ -520,4 +530,5 @@ pub enum Version {
V5_1,
V5_2,
V5_3,
V5_4,
}

0 comments on commit 3a9b6d4

Please sign in to comment.