update 2.7 (#46): fix God mode
This commit is contained in:
parent
18de673f0a
commit
daa62a8cfa
@ -6,7 +6,7 @@
|
||||
|
||||
namespace cheat::feature
|
||||
{
|
||||
static bool Miscs_CheckTargetAttackable_Hook(void* __this, app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method);
|
||||
static bool Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method);
|
||||
static void VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method);
|
||||
|
||||
GodMode::GodMode() : Feature(),
|
||||
@ -47,7 +47,7 @@ namespace cheat::feature
|
||||
}
|
||||
|
||||
// Attack immunity (return false when target is avatar, that mean avatar entity isn't attackable)
|
||||
static bool Miscs_CheckTargetAttackable_Hook(void* __this, app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method)
|
||||
static bool Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method)
|
||||
{
|
||||
auto& gm = GodMode::GetInstance();
|
||||
auto& manager = game::EntityManager::instance();
|
||||
@ -55,7 +55,7 @@ namespace cheat::feature
|
||||
if (gm.f_Enabled && entity->isAvatar())
|
||||
return false;
|
||||
|
||||
return CALL_ORIGIN(Miscs_CheckTargetAttackable_Hook, __this, attacker, target, method);
|
||||
return CALL_ORIGIN(Miscs_CheckTargetAttackable_Hook, attacker, target, method);
|
||||
}
|
||||
|
||||
// Raised when avatar fall on ground.
|
||||
|
Loading…
Reference in New Issue
Block a user