Skip to content

Commit

Permalink
Fix double locking in 1.16.1 focusing hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
neivv committed Apr 21, 2022
1 parent a050254 commit 6a95f3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aise"
version = "2.36.3"
version = "2.36.4"
authors = ["Markus Heikkinen <ittevien@gmail.com>"]
edition = "2018"

Expand Down Expand Up @@ -62,11 +62,11 @@ rev = "e8e847864c2938735040ca3c68ef1cf9e03b692f"

[target.'cfg(target_arch = "x86")'.dependencies.samase_shim]
git = "https://github.com/neivv/samase_plugin"
rev = "1660aa7eb13daf1b903911ecf571c2b4a4c33fc8"
rev = "4286c88cef7079aebb4046cf7194e1afe1ff22bd"

[dependencies.samase_plugin]
git = "https://github.com/neivv/samase_plugin"
rev = "1660aa7eb13daf1b903911ecf571c2b4a4c33fc8"
rev = "4286c88cef7079aebb4046cf7194e1afe1ff22bd"

[features]
opengl = ["cgmath", "euclid", "font-kit", "glium", "gl"]
7 changes: 5 additions & 2 deletions src/ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1345,8 +1345,11 @@ pub unsafe extern fn step_region_hook(
}

pub unsafe extern fn focus_disabled_hook(u: *mut c_void, orig: unsafe extern fn(*mut c_void)) {
let globals = Globals::get("focus_air");
if !globals.global_ai_mode.disable_spell_focus {
let skip = {
let globals = Globals::get("focus_air");
globals.global_ai_mode.disable_spell_focus
};
if !skip {
orig(u);
}
}
Expand Down

0 comments on commit 6a95f3e

Please sign in to comment.