diff --git a/src/mods/UObjectHook.cpp b/src/mods/UObjectHook.cpp index 63b2c6a7..5ab8ce9f 100644 --- a/src/mods/UObjectHook.cpp +++ b/src/mods/UObjectHook.cpp @@ -1807,8 +1807,7 @@ UObjectHook::ResolvedObject UObjectHook::StatePath::resolve() const { void UObjectHook::on_frame() { if (m_keybind_toggle_uobject_hook->is_key_down_once()) { - m_uobject_hook_disabled = !m_uobject_hook_disabled; - m_fixed_visibilities = false; + set_disabled(!is_disabled()); } } diff --git a/src/mods/UObjectHook.hpp b/src/mods/UObjectHook.hpp index c39fbb1e..a88b0f91 100644 --- a/src/mods/UObjectHook.hpp +++ b/src/mods/UObjectHook.hpp @@ -53,6 +53,7 @@ class UObjectHook : public Mod { void set_disabled(bool disabled) { m_uobject_hook_disabled = disabled; + m_fixed_visibilities = false; } protected: