mirror of
https://github.com/SunsetMkt/Akebi-GC.git
synced 2025-09-19 03:56:05 +08:00
Added block input mainly for free cam
This commit is contained in:
@ -301,6 +301,7 @@ DO_APP_FUNC(0x0143BF90, void, MoleMole_LCAbilityElement_ReduceModifierDurability
|
|||||||
DO_APP_FUNC(0x0218C660, BaseEntity*, MoleMole_GadgetEntity_GetOwnerEntity, (GadgetEntity* __this, MethodInfo* method));
|
DO_APP_FUNC(0x0218C660, BaseEntity*, MoleMole_GadgetEntity_GetOwnerEntity, (GadgetEntity* __this, MethodInfo* method));
|
||||||
|
|
||||||
DO_APP_FUNC(0x027385E0, bool, MoleMole_UIManager_HasEnableMapCamera, (MoleMole_UIManager* __this, MethodInfo* method));
|
DO_APP_FUNC(0x027385E0, bool, MoleMole_UIManager_HasEnableMapCamera, (MoleMole_UIManager* __this, MethodInfo* method));
|
||||||
|
DO_APP_FUNC(0x0272BF00, void, MoleMole_UIManager_EnableInput, (MoleMole_UIManager* __this, bool playerInput, bool clearCurInputState, bool ignoreTouch, MethodInfo* method));
|
||||||
|
|
||||||
DO_APP_FUNC(0x010ED540, void, MonoMiniMap_Update, (MonoMiniMap* __this, MethodInfo* method));
|
DO_APP_FUNC(0x010ED540, void, MonoMiniMap_Update, (MonoMiniMap* __this, MethodInfo* method));
|
||||||
DO_APP_FUNC(0x02DA4B00, MonoMiniMap*, MonoInLevelMainPage_get_miniMap, (void* __this, MethodInfo* method));
|
DO_APP_FUNC(0x02DA4B00, MonoMiniMap*, MonoInLevelMainPage_get_miniMap, (void* __this, MethodInfo* method));
|
||||||
|
@ -25,6 +25,7 @@ namespace cheat::feature
|
|||||||
FreeCamera::FreeCamera() : Feature(),
|
FreeCamera::FreeCamera() : Feature(),
|
||||||
NF(f_Enabled, "Free Camera", "Visuals::FreeCamera", false),
|
NF(f_Enabled, "Free Camera", "Visuals::FreeCamera", false),
|
||||||
NF(f_FreezeAnimation, "Freeze Character Animation", "Visuals::FreeCamera", false),
|
NF(f_FreezeAnimation, "Freeze Character Animation", "Visuals::FreeCamera", false),
|
||||||
|
NF(f_BlockInput, "Block Input", "Visuals::FreeCamera", false),
|
||||||
NF(f_DamageOverlay, "Damage Overlay", "Visuals::FreeCamera", false),
|
NF(f_DamageOverlay, "Damage Overlay", "Visuals::FreeCamera", false),
|
||||||
NF(f_HpOverlay, "Enemy HP Overlay", "Visuals::FreeCamera", false),
|
NF(f_HpOverlay, "Enemy HP Overlay", "Visuals::FreeCamera", false),
|
||||||
NF(f_Speed, "Speed", "Visuals::FreeCamera", 1.0f),
|
NF(f_Speed, "Speed", "Visuals::FreeCamera", 1.0f),
|
||||||
@ -61,6 +62,7 @@ namespace cheat::feature
|
|||||||
{
|
{
|
||||||
ConfigWidget("Enable", f_Enabled);
|
ConfigWidget("Enable", f_Enabled);
|
||||||
ConfigWidget("Freeze Character Animation", f_FreezeAnimation, "Freezes the active character's animation.");
|
ConfigWidget("Freeze Character Animation", f_FreezeAnimation, "Freezes the active character's animation.");
|
||||||
|
ConfigWidget("Block User Input", f_BlockInput, "If enabled, any input will be blocked.");
|
||||||
if (f_Enabled)
|
if (f_Enabled)
|
||||||
{
|
{
|
||||||
ConfigWidget("Toggle Damage Overlay", f_DamageOverlay, "Remove damage output overlay");
|
ConfigWidget("Toggle Damage Overlay", f_DamageOverlay, "Remove damage output overlay");
|
||||||
@ -242,6 +244,12 @@ namespace cheat::feature
|
|||||||
|
|
||||||
void FreeCamera::OnGameUpdate()
|
void FreeCamera::OnGameUpdate()
|
||||||
{
|
{
|
||||||
|
auto uiManager = GET_SINGLETON(MoleMole_UIManager);
|
||||||
|
if (uiManager == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
static bool isBlock = false;
|
||||||
|
|
||||||
if (f_Enabled)
|
if (f_Enabled)
|
||||||
{
|
{
|
||||||
if (mainCam == nullptr)
|
if (mainCam == nullptr)
|
||||||
@ -284,6 +292,23 @@ namespace cheat::feature
|
|||||||
hpOverlay = nullptr;
|
hpOverlay = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (f_BlockInput)
|
||||||
|
{
|
||||||
|
if (!isBlock)
|
||||||
|
{
|
||||||
|
app::MoleMole_UIManager_EnableInput(uiManager, false, false, false, nullptr);
|
||||||
|
isBlock = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isBlock)
|
||||||
|
{
|
||||||
|
app::MoleMole_UIManager_EnableInput(uiManager, true, false, false, nullptr);
|
||||||
|
isBlock = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Taiga#5555: There's probably be a better way of implementing this. But for now, this is just what I came up with.
|
// Taiga#5555: There's probably be a better way of implementing this. But for now, this is just what I came up with.
|
||||||
auto& manager = game::EntityManager::instance();
|
auto& manager = game::EntityManager::instance();
|
||||||
auto animator = manager.avatar()->animator();
|
auto animator = manager.avatar()->animator();
|
||||||
|
@ -9,6 +9,7 @@ namespace cheat::feature
|
|||||||
public:
|
public:
|
||||||
config::Field<config::Toggle<Hotkey>> f_Enabled;
|
config::Field<config::Toggle<Hotkey>> f_Enabled;
|
||||||
config::Field<config::Toggle<Hotkey>> f_FreezeAnimation;
|
config::Field<config::Toggle<Hotkey>> f_FreezeAnimation;
|
||||||
|
config::Field<bool> f_BlockInput;
|
||||||
config::Field<bool> f_DamageOverlay;
|
config::Field<bool> f_DamageOverlay;
|
||||||
config::Field<bool> f_HpOverlay;
|
config::Field<bool> f_HpOverlay;
|
||||||
config::Field<float> f_Speed;
|
config::Field<float> f_Speed;
|
||||||
|
Reference in New Issue
Block a user