diff --git a/Cargo.lock b/Cargo.lock index 0567bd0..31bb417 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,7 +108,7 @@ checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" [[package]] name = "xc3-difficulty-unlocker" -version = "1.1.0" +version = "1.1.1" dependencies = [ "serde", "skyline", diff --git a/Cargo.toml b/Cargo.toml index 74d7392..b17c864 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xc3-difficulty-unlocker" -version = "1.1.0" +version = "1.1.1" authors = ["RoccoDev "] edition = "2021" license = "gpl-3.0" diff --git a/src/lib.rs b/src/lib.rs index 5e46cf7..e3daa5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -85,7 +85,7 @@ unsafe fn hp_replace_hook(ctx: &mut InlineCtx) { let config = get_config(); let custom = &config.custom; if custom.enabled && REAL_DIFFICULTY.load(Ordering::Acquire) == config.overrides.custom as u8 { - let original_health = *((ctx.registers[8].x.as_ref() + 0x28) as *const u32); + let original_health = *((ctx.registers[8].x.as_ref() + 0x20) as *const u32); // Game performs the same lossy cast *ctx.registers[9].w.as_mut() =