diff --git a/.cproject b/.cproject
index 186b5238..1bc6e9f1 100644
--- a/.cproject
+++ b/.cproject
@@ -66,7 +66,7 @@
-
+
diff --git a/src/common.h b/src/common.h
index 2e9de26f..6768eb8f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -9,9 +9,9 @@
#define COMMON_H_
#if defined(LINUX) and not defined(NO_IPC)
-#define IPC_ENABLED 1
+#define ENABLE_IPC 1
#else
-#undef IPC_ENABLED
+#undef ENABLE_IPC
#endif
diff --git a/src/drawmgr.cpp b/src/drawmgr.cpp
index d6af567e..60f52aed 100644
--- a/src/drawmgr.cpp
+++ b/src/drawmgr.cpp
@@ -83,7 +83,7 @@ void DrawCheatVisuals() {
PROF_SECTION(PT_spyalert);
SAFE_CALL(hacks::tf::spyalert::Draw());
}
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
IF_GAME(IsTF()) SAFE_CALL(hacks::shared::followbot::Draw());
#endif
{
diff --git a/src/gui/im/Schema.cpp b/src/gui/im/Schema.cpp
index 05e60afe..af5b7f42 100644
--- a/src/gui/im/Schema.cpp
+++ b/src/gui/im/Schema.cpp
@@ -34,7 +34,7 @@ ListEntry_Dummy* FromJson(nlohmann::json json) {
}
return cv;
} else if (json.is_object()) {
-#ifndef IPC_ENABLED
+#ifndef ENABLE_IPC
if (json.find("data") != json.end()) {
if (json["data"] == "ipc") {
return nullptr;
diff --git a/src/hack.cpp b/src/hack.cpp
index dab4898c..73e7a037 100644
--- a/src/hack.cpp
+++ b/src/hack.cpp
@@ -76,7 +76,7 @@ const std::string& hack::GetType() {
static bool version_set = false;
if (version_set) return version;
version = "";
-#if not defined(IPC_ENABLED)
+#if not defined(ENABLE_IPC)
version += " NOIPC";
#endif
#if not ENABLE_GUI
diff --git a/src/hacks/AutoHeal.cpp b/src/hacks/AutoHeal.cpp
index 6e6a95b6..3b6db455 100644
--- a/src/hacks/AutoHeal.cpp
+++ b/src/hacks/AutoHeal.cpp
@@ -393,7 +393,7 @@ int HealingPriority(int idx) {
priority += 50 * (1 - healthp);
priority += 10 * (1 - overhealp);
}
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
if (ipc::peer) {
if (hacks::shared::followbot::bot && hacks::shared::followbot::following_idx == idx) {
priority *= 3.0f;
diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp
index b0edb5f7..be85365b 100644
--- a/src/hacks/ESP.cpp
+++ b/src/hacks/ESP.cpp
@@ -741,7 +741,7 @@ void _FASTCALL ProcessEntity(CachedEntity* ent) {
AddEntityString(ent, classes[pclass - 1]);
}
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
// ipc bot esp
if (show_bot_id && ipc::peer && ent != LOCAL_E) {
for (unsigned i = 0; i < cat_ipc::max_peers; i++) {
diff --git a/src/hacks/FollowBot.cpp b/src/hacks/FollowBot.cpp
index e5301695..5822ec18 100644
--- a/src/hacks/FollowBot.cpp
+++ b/src/hacks/FollowBot.cpp
@@ -9,7 +9,7 @@
#include "../common.h"
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
namespace hacks { namespace shared { namespace followbot {
diff --git a/src/hacks/FollowBot.h b/src/hacks/FollowBot.h
index 770babcf..9607d1ad 100644
--- a/src/hacks/FollowBot.h
+++ b/src/hacks/FollowBot.h
@@ -5,7 +5,7 @@
* Author: nullifiedcat
*/
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
#ifndef HACKS_FOLLOWBOT_H_
#define HACKS_FOLLOWBOT_H_
@@ -13,6 +13,7 @@
class CatCommand;
class CatVar;
class CachedEntity;
+class Vector;
#include "../ipc.h"
diff --git a/src/hacks/Walkbot.cpp b/src/hacks/Walkbot.cpp
index 927a689b..27a8fea5 100644
--- a/src/hacks/Walkbot.cpp
+++ b/src/hacks/Walkbot.cpp
@@ -935,7 +935,7 @@ void OnLevelInit() {
static CatVar wb_abandon_too_many_bots(CV_INT, "wb_population_control", "0", "Abandon if bots >");
void CheckLivingSpace() {
-#if IPC_ENABLED
+#if ENABLE_IPC
if (ipc::peer && wb_abandon_too_many_bots) {
std::vector players {};
for (int j = 1; j < 32; j++) {
diff --git a/src/hooks/CreateMove.cpp b/src/hooks/CreateMove.cpp
index e77f103b..1d3bacab 100644
--- a/src/hooks/CreateMove.cpp
+++ b/src/hooks/CreateMove.cpp
@@ -148,7 +148,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
hooks::netchannel.HookMethod((void*)SendNetMsg_hook, offsets::SendNetMsg());
hooks::netchannel.HookMethod((void*)Shutdown_hook, offsets::Shutdown());
hooks::netchannel.Apply();
-#if IPC_ENABLED
+#if ENABLE_IPC
ipc::UpdateServerAddress();
#endif
}
@@ -210,7 +210,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
hacks::shared::autojoin::Update();
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
static int team_joining_state = 0;
static float last_jointeam_try = 0;
CachedEntity *found_entity, *ent;
@@ -358,7 +358,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
// TODO Auto Steam Friend
-#if IPC_ENABLED
+#if ENABLE_IPC
{
PROF_SECTION(CM_playerlist);
static Timer ipc_update_timer {};
@@ -412,7 +412,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
ret = false;
}
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
if (CE_GOOD(g_pLocalPlayer->entity) && !g_pLocalPlayer->life_state) {
PROF_SECTION(CM_followbot);
SAFE_CALL(hacks::shared::followbot::AfterCreateMove());
diff --git a/src/hooks/others.cpp b/src/hooks/others.cpp
index 1eb10a68..8bc3a6fd 100644
--- a/src/hooks/others.cpp
+++ b/src/hooks/others.cpp
@@ -100,6 +100,7 @@ void OverrideView_hook(void* _this, CViewSetup* setup) {
setup->fov = override_fov;
}
}
+ setup->origin -= Vector(0, 0, 96);
draw::fov = setup->fov;
SEGV_END;
}
@@ -241,7 +242,7 @@ void Shutdown_hook(void* _this, const char* reason) {
} else if (strstr(reason, "VAC")) {
logging::Info("VAC error?");
}
-#if IPC_ENABLED
+#if ENABLE_IPC
ipc::UpdateServerAddress(true);
#endif
SEGV_BEGIN;
@@ -328,7 +329,7 @@ static CatVar ipc_name(CV_STRING, "name_ipc", "", "IPC Name");
const char* GetFriendPersonaName_hook(ISteamFriends* _this, CSteamID steamID) {
static const GetFriendPersonaName_t original = (GetFriendPersonaName_t)hooks::steamfriends.GetMethod(offsets::GetFriendPersonaName());
-#if IPC_ENABLED
+#if ENABLE_IPC
if (ipc::peer) {
static std::string namestr(ipc_name.GetString());
namestr.assign(ipc_name.GetString());
@@ -417,7 +418,7 @@ void FrameStageNotify_hook(void* _this, int stage) {
}
}
if (stage == FRAME_START) {
-#if IPC_ENABLED
+#if ENABLE_IPC
static Timer nametimer {};
if (nametimer.test_and_set(1000 * 10)) {
if (ipc::peer) {
@@ -540,7 +541,7 @@ void LevelInit_hook(void* _this, const char* newmap) {
hacks::shared::anticheat::ResetEverything();
original(_this, newmap);
hacks::shared::walkbot::OnLevelInit();
-#if IPC_ENABLED
+#if ENABLE_IPC
if (ipc::peer) {
ipc::peer->memory->peer_user_data[ipc::peer->client_id].ts_connected = time(nullptr);
}
@@ -556,7 +557,7 @@ void LevelShutdown_hook(void* _this) {
chat_stack::Reset();
hacks::shared::anticheat::ResetEverything();
original(_this);
-#if IPC_ENABLED
+#if ENABLE_IPC
if (ipc::peer) {
ipc::peer->memory->peer_user_data[ipc::peer->client_id].ts_disconnected = time(nullptr);
}
diff --git a/src/ipc.cpp b/src/ipc.cpp
index eef2fa75..33368586 100644
--- a/src/ipc.cpp
+++ b/src/ipc.cpp
@@ -12,7 +12,7 @@
#include "hack.h"
#include "hitrate.hpp"
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
namespace ipc {
diff --git a/src/ipc.h b/src/ipc.h
index 481d468f..fdf7abbb 100644
--- a/src/ipc.h
+++ b/src/ipc.h
@@ -5,7 +5,7 @@
* Author: nullifiedcat
*/
-#ifdef IPC_ENABLED
+#if ENABLE_IPC == 1
#ifndef IPC_H_
#define IPC_H_