This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/util/explosion_anti_cheat_bypass.hpp
Quentin 7ad35bb3d7
Fix lua explosion bypass (#2255)
* move explosion_anti_cheat_bypass to its own file

* fix(lua): make sure lua user don't get tapped by game ac when using ADD_OWNED_EXPLOSION
2023-10-12 23:34:46 +02:00

23 lines
575 B
C++

#pragma once
#include "memory/byte_patch.hpp"
namespace big
{
struct explosion_anti_cheat_bypass
{
inline static memory::byte_patch* m_can_blame_others;
inline static memory::byte_patch* m_can_use_blocked_explosions;
inline static void apply()
{
explosion_anti_cheat_bypass::m_can_blame_others->apply();
explosion_anti_cheat_bypass::m_can_use_blocked_explosions->apply();
}
inline static void restore()
{
explosion_anti_cheat_bypass::m_can_use_blocked_explosions->restore();
explosion_anti_cheat_bypass::m_can_blame_others->restore();
}
};
}