Skip to content

Commit

Permalink
hp: fix enemy hp in 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
roccodev committed Apr 17, 2023
1 parent 46134b5 commit 9d226a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xc3-difficulty-unlocker"
version = "1.1.0"
version = "1.1.1"
authors = ["RoccoDev <[email protected]>"]
edition = "2021"
license = "gpl-3.0"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() =
Expand Down

0 comments on commit 9d226a8

Please sign in to comment.