Add lots of more cotiring
This commit is contained in:
parent
6178d1e906
commit
c1f1c5a4c9
@ -165,11 +165,14 @@ add_subdirectory(modules)
|
||||
if (EnableCotire)
|
||||
set_target_properties(cathook PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${CMAKE_SOURCE_DIR}/include/common.hpp")
|
||||
set_target_properties(cathook PROPERTIES COTIRE_ADD_UNITY_BUILD true)
|
||||
set_target_properties(cathook PROPERTIES COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES 30)
|
||||
set_source_files_properties(${ignore_files} PROPERTIES COTIRE_EXCLUDED true)
|
||||
cotire(cathook)
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET cathook POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:cathook> "${CMAKE_SOURCE_DIR}/bin/$<TARGET_FILE_NAME:cathook>")
|
||||
add_custom_command(TARGET cathook_unity POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:cathook_unity> "${CMAKE_SOURCE_DIR}/bin/$<TARGET_FILE_NAME:cathook_unity>")
|
||||
if (EnableCotire)
|
||||
add_custom_command(TARGET cathook_unity POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:cathook_unity> "${CMAKE_SOURCE_DIR}/bin/$<TARGET_FILE_NAME:cathook_unity>")
|
||||
endif()
|
||||
|
@ -1,5 +1,4 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/angles.cpp"
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/angles.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/chatlog.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/chatstack.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/conditions.cpp"
|
||||
@ -35,6 +34,9 @@ target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/irc.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/PlayerTools.cpp")
|
||||
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(classinfo)
|
||||
add_subdirectory(copypasted)
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include "entitycache.hpp"
|
||||
#include "settings/Bool.hpp"
|
||||
|
||||
namespace player_tools
|
||||
{
|
||||
|
||||
static settings::Int betrayal_limit{ "player-tools.betrayal-limit", "2" };
|
||||
|
||||
static settings::Bool taunting{ "player-tools.ignore.taunting", "true" };
|
||||
@ -26,9 +29,6 @@ static std::unordered_map<unsigned, unsigned> betrayal_list{};
|
||||
|
||||
static CatCommand forgive_all("pt_forgive_all", "Clear betrayal list", []() { betrayal_list.clear(); });
|
||||
|
||||
namespace player_tools
|
||||
{
|
||||
|
||||
bool shouldTargetSteamId(unsigned id)
|
||||
{
|
||||
if (betrayal_limit)
|
||||
|
@ -13,13 +13,12 @@
|
||||
#include <hacks/Spam.hpp>
|
||||
#include <settings/Bool.hpp>
|
||||
|
||||
namespace chatlog
|
||||
{
|
||||
static settings::Bool enable{ "chat-log.enable", "false" };
|
||||
static settings::Bool no_spam{ "chat-log.no-spam", "true" };
|
||||
static settings::Bool no_ipc{ "chat-log.no-ipc", "true" };
|
||||
|
||||
namespace chatlog
|
||||
{
|
||||
|
||||
class csv_stream
|
||||
{
|
||||
public:
|
||||
|
@ -1,4 +1,6 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/classinfo.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/dump.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/dynamic.gen.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/classinfo.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/dump.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/dynamic.gen.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -1,3 +1,5 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CSignature.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Netvar.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/CSignature.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Netvar.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -1,9 +1,11 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/cvwrapper.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/entry.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/init.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/interfaces.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/logging.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/netvars.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/profiler.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/sharedobj.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/cvwrapper.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/entry.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/init.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/interfaces.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/logging.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/netvars.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/profiler.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/sharedobj.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -8,17 +8,17 @@
|
||||
#include <settings/Bool.hpp>
|
||||
#include "common.hpp"
|
||||
|
||||
std::unordered_map<int, int> command_number_mod{};
|
||||
|
||||
namespace criticals
|
||||
{
|
||||
|
||||
static settings::Bool crit_info{ "crit.info", "false" };
|
||||
static settings::Button crit_key{ "crit.key", "<null>" };
|
||||
static settings::Bool crit_melee{ "crit.melee", "false" };
|
||||
static settings::Bool crit_legiter{ "crit.force-gameplay", "false" };
|
||||
static settings::Bool crit_experimental{ "crit.experimental", "false" };
|
||||
|
||||
std::unordered_map<int, int> command_number_mod{};
|
||||
|
||||
namespace criticals
|
||||
{
|
||||
|
||||
int find_next_random_crit_for_weapon(IClientEntity *weapon)
|
||||
{
|
||||
int tries = 0, number = current_user_cmd->command_number, found = 0, seed_backup;
|
||||
@ -224,6 +224,12 @@ void draw()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
static InitRoutine init([]() {
|
||||
EC::Register(EC::CreateMove, criticals::create_move, "cm_crits", EC::very_late);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register(EC::Draw, criticals::draw, "draw_crits");
|
||||
#endif
|
||||
});
|
||||
} // namespace criticals
|
||||
|
||||
void crithack_saved_state::Load(IClientEntity *entity)
|
||||
@ -247,10 +253,3 @@ void crithack_saved_state::Save(IClientEntity *entity)
|
||||
seed2876 = *(int *) (uintptr_t(entity) + 2876);
|
||||
unknown2839 = *(char *) (uintptr_t(entity) + 2839);
|
||||
}
|
||||
|
||||
static InitRoutine init([]() {
|
||||
EC::Register(EC::CreateMove, criticals::create_move, "cm_crits", EC::very_late);
|
||||
#if ENABLE_VISUALS
|
||||
EC::Register(EC::Draw, criticals::draw, "draw_crits");
|
||||
#endif
|
||||
});
|
||||
|
@ -60,9 +60,9 @@ static void CreateMove()
|
||||
continue;
|
||||
if (ent->m_Type() != ENTITY_PROJECTILE)
|
||||
continue;
|
||||
if (ent->m_bCritProjectile() && ent->m_flDistance() <= 1000.0f)
|
||||
if (ent->m_bCritProjectile() && ent->m_flDistance() <= 500.0f)
|
||||
current_user_cmd->buttons |= IN_ATTACK2;
|
||||
else if (ent->m_flDistance() < 300.0f)
|
||||
else if (ent->m_flDistance() < 100.0f)
|
||||
current_user_cmd->buttons |= IN_ATTACK2;
|
||||
}
|
||||
}
|
||||
|
@ -40,8 +40,7 @@ set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
||||
add_subdirectory(ac)
|
||||
if(EnableVisuals)
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/DominateMark.cpp"
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/DominateMark.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ESP.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Tracers.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Radar.cpp"
|
||||
@ -49,4 +48,7 @@ if(EnableVisuals)
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SpyAlert.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Thirdperson.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/MCHealthbar.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
endif()
|
||||
|
@ -1,4 +1,6 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/aimbot.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/antiaim.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/bhop.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/aimbot.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/antiaim.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/bhop.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -10,13 +10,12 @@
|
||||
#include <settings/Float.hpp>
|
||||
#include "common.hpp"
|
||||
|
||||
namespace ac::aimbot
|
||||
{
|
||||
static settings::Bool enable{ "find-cheaters.aimbot.enable", "true" };
|
||||
static settings::Float detect_angle{ "find-cheaters.aimbot.angle", "30" };
|
||||
static settings::Int detections_warning{ "find-cheaters.aimbot.detections", "3" };
|
||||
|
||||
namespace ac::aimbot
|
||||
{
|
||||
|
||||
ac_data data_table[32];
|
||||
int amount[32];
|
||||
std::unordered_map<int, Vector> Player_origs{};
|
||||
|
@ -9,10 +9,9 @@
|
||||
#include <settings/Bool.hpp>
|
||||
#include "common.hpp"
|
||||
|
||||
static settings::Bool enable{ "find-cheaters.antiaim.enable", "true" };
|
||||
|
||||
namespace ac::antiaim
|
||||
{
|
||||
static settings::Bool enable{ "find-cheaters.antiaim.enable", "true" };
|
||||
|
||||
unsigned long last_accusation[32]{ 0 };
|
||||
|
||||
|
@ -9,10 +9,9 @@
|
||||
#include <settings/Int.hpp>
|
||||
#include "common.hpp"
|
||||
|
||||
static settings::Int bhop_detect_count{ "find-cheaters.bunnyhop.detections", "4" };
|
||||
|
||||
namespace ac::bhop
|
||||
{
|
||||
static settings::Int bhop_detect_count{ "find-cheaters.bunnyhop.detections", "4" };
|
||||
|
||||
ac_data data_table[32]{};
|
||||
|
||||
|
@ -20,7 +20,6 @@ static settings::Bool answerIdentify{ "chat.identify.answer", "false" };
|
||||
static settings::Bool anti_votekick{ "cat-bot.anti-autobalance", "false" };
|
||||
|
||||
static bool retrun = false;
|
||||
static Timer sendmsg{};
|
||||
static Timer gitgud{};
|
||||
|
||||
// Using repeated char causes crash on some systems. Suboptimal solution.
|
||||
@ -36,7 +35,7 @@ std::string lastname{};
|
||||
|
||||
namespace hooked_methods
|
||||
{
|
||||
|
||||
static Timer sendmsg{};
|
||||
template <typename T> void SplitName(std::vector<T> &ret, const T &name, int num)
|
||||
{
|
||||
T tmp;
|
||||
|
@ -57,7 +57,7 @@ static CatCommand RemoveNullhook("debug_material_hook_clear", "Debug", []() { Re
|
||||
static settings::Bool debug_framerate("debug.framerate", "false");
|
||||
static float framerate = 0.0f;
|
||||
static Timer send_timer{};
|
||||
static InitRoutine init([]() {
|
||||
static InitRoutine init_nographics([]() {
|
||||
#if !ENABLE_VISUALS
|
||||
NullHook();
|
||||
#endif
|
||||
|
@ -69,4 +69,4 @@ bool IsHoovy(CachedEntity *entity)
|
||||
return hoovy_list[entity->m_IDX - 1];
|
||||
}
|
||||
|
||||
static InitRoutine init([]() { EC::Register(EC::CreateMove, UpdateHoovyList, "cm_hoovylist", EC::average); });
|
||||
static InitRoutine init_heavy([]() { EC::Register(EC::CreateMove, UpdateHoovyList, "cm_hoovylist", EC::average); });
|
||||
|
@ -16,11 +16,12 @@
|
||||
#if ENABLE_IPC
|
||||
|
||||
static settings::Bool ipc_update_list{ "ipc.update-player-list", "true" };
|
||||
static settings::String server_name{ "ipc.server", "cathook_followbot_server" };
|
||||
|
||||
namespace ipc
|
||||
{
|
||||
|
||||
static settings::String server_name{ "ipc.server", "cathook_followbot_server" };
|
||||
|
||||
CatCommand fix_deadlock("ipc_fix_deadlock", "Fix deadlock", []() {
|
||||
if (peer)
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ k_EItemType ItemModelMapper::GetItemType(CachedEntity *entity)
|
||||
}
|
||||
|
||||
ItemManager g_ItemManager;
|
||||
static InitRoutine init([]() {
|
||||
static InitRoutine init_itemtypes([]() {
|
||||
EC::Register(
|
||||
EC::LevelInit, []() { g_ItemManager = ItemManager{}; }, "clear_itemtypes");
|
||||
});
|
||||
|
@ -8,9 +8,10 @@
|
||||
#include "projlogging.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
Vector prevloc[2048]{};
|
||||
namespace projectile_logging
|
||||
{
|
||||
Vector prevloc[2048]{};
|
||||
|
||||
void Update()
|
||||
{
|
||||
for (int i = 1; i < HIGHEST_ENTITY; i++)
|
||||
|
@ -1,8 +1,10 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/C_MannVsMachineStats.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFInventoryManager.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFPartyClient.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFParty.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFGCClientSystem.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/C_TEFireBullets.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ITFGroupMatchCriteria.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/C_MannVsMachineStats.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFInventoryManager.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFPartyClient.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFParty.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/CTFGCClientSystem.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/C_TEFireBullets.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ITFGroupMatchCriteria.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -1,10 +1,12 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/checksum_md5.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/convar.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/HUD.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/KeyValues.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/MaterialSystemUtil.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/tier1.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/utlbuffer.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/UtlString.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/netmessage.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/checksum_md5.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/convar.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/HUD.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/KeyValues.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/MaterialSystemUtil.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/tier1.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/utlbuffer.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/UtlString.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/netmessage.cpp")
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -1,6 +1,9 @@
|
||||
target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Manager.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Registered.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Settings.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SettingCommands.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SettingsIO.cpp")
|
||||
set(files "${CMAKE_CURRENT_LIST_DIR}/Manager.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Registered.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Settings.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SettingCommands.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SettingsIO.cpp")
|
||||
|
||||
target_sources(cathook PRIVATE ${files})
|
||||
list(REMOVE_ITEM ignore_files ${files})
|
||||
set(ignore_files ${ignore_files} CACHE INTERNAL "")
|
||||
|
@ -34,7 +34,7 @@ void EXPOSED_Epic_VACBypass_1337_DoNotSteal_xXx_$1_xXx_MLG()
|
||||
|
||||
CatCommand fixvac("fixvac", "Lemme in to secure servers", []() { EXPOSED_Epic_VACBypass_1337_DoNotSteal_xXx_$1_xXx_MLG(); });
|
||||
|
||||
static InitRoutine init([]() {
|
||||
static InitRoutine init_textmode([]() {
|
||||
#if ENABLE_TEXTMODE_STDIN
|
||||
logging::Info("[TEXTMODE] Setting up input handling");
|
||||
int flags = fcntl(0, F_GETFL, 0);
|
||||
|
@ -194,17 +194,13 @@ public:
|
||||
bool vote_option = event->GetInt("vote_option");
|
||||
if (*party_say_f1_only && vote_option)
|
||||
return;
|
||||
int team = event->GetInt("team");
|
||||
int eid = event->GetInt("entityid");
|
||||
int eid = event->GetInt("entityid");
|
||||
|
||||
player_info_s info{}, info2{};
|
||||
player_info_s info{};
|
||||
if (!g_IEngine->GetPlayerInfo(eid, &info))
|
||||
return;
|
||||
char formated_string[256];
|
||||
if (!g_IEngine->GetPlayerInfo(kicked_player, &info2))
|
||||
std::snprintf(formated_string, sizeof(formated_string), "[CAT] %s [U:1:%u] %s", info.name, info.friendsID, vote_option ? "F2" : "F1");
|
||||
else
|
||||
std::snprintf(formated_string, sizeof(formated_string), "[CAT] %s [U:1:%u] %s => %s [U:1:%u] ", info.name, info.friendsID, vote_option ? "F1" : "F2", info2.name, info2.friendsID);
|
||||
std::snprintf(formated_string, sizeof(formated_string), "[CAT] %s [U:1:%u] %s", info.name, info.friendsID, vote_option ? "F2" : "F1");
|
||||
re::CTFPartyClient::GTFPartyClient()->SendPartyChat(formated_string);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user