update sources to reflect changes in makefile

This commit is contained in:
nullifiedcat 2017-08-18 12:43:38 +03:00
parent 56e96af7ad
commit ae9a1df287
14 changed files with 24 additions and 22 deletions

View File

@ -66,7 +66,7 @@
<listOptionValue builtIn="false" value="POSIX=1"/> <listOptionValue builtIn="false" value="POSIX=1"/>
<listOptionValue builtIn="false" value="GNUC=1"/> <listOptionValue builtIn="false" value="GNUC=1"/>
<listOptionValue builtIn="false" value="NO_MALLOC_OVERRIDE"/> <listOptionValue builtIn="false" value="NO_MALLOC_OVERRIDE"/>
<listOptionValue builtIn="false" value="TEXTMODE=1"/> <listOptionValue builtIn="false" value="ENABLE_VISUALS=1"/>
</option> </option>
<option id="gnu.cpp.compiler.option.debugging.other.1695695237" name="Other debugging flags" superClass="gnu.cpp.compiler.option.debugging.other" useByScannerDiscovery="false" value="-ggdb" valueType="string"/> <option id="gnu.cpp.compiler.option.debugging.other.1695695237" name="Other debugging flags" superClass="gnu.cpp.compiler.option.debugging.other" useByScannerDiscovery="false" value="-ggdb" valueType="string"/>
<option id="gnu.cpp.compiler.option.dialect.flags.1534861554" name="Other dialect flags" superClass="gnu.cpp.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu++11" valueType="string"/> <option id="gnu.cpp.compiler.option.dialect.flags.1534861554" name="Other dialect flags" superClass="gnu.cpp.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu++11" valueType="string"/>

View File

@ -9,9 +9,9 @@
#define COMMON_H_ #define COMMON_H_
#if defined(LINUX) and not defined(NO_IPC) #if defined(LINUX) and not defined(NO_IPC)
#define IPC_ENABLED 1 #define ENABLE_IPC 1
#else #else
#undef IPC_ENABLED #undef ENABLE_IPC
#endif #endif

View File

@ -83,7 +83,7 @@ void DrawCheatVisuals() {
PROF_SECTION(PT_spyalert); PROF_SECTION(PT_spyalert);
SAFE_CALL(hacks::tf::spyalert::Draw()); SAFE_CALL(hacks::tf::spyalert::Draw());
} }
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
IF_GAME(IsTF()) SAFE_CALL(hacks::shared::followbot::Draw()); IF_GAME(IsTF()) SAFE_CALL(hacks::shared::followbot::Draw());
#endif #endif
{ {

View File

@ -34,7 +34,7 @@ ListEntry_Dummy* FromJson(nlohmann::json json) {
} }
return cv; return cv;
} else if (json.is_object()) { } else if (json.is_object()) {
#ifndef IPC_ENABLED #ifndef ENABLE_IPC
if (json.find("data") != json.end()) { if (json.find("data") != json.end()) {
if (json["data"] == "ipc") { if (json["data"] == "ipc") {
return nullptr; return nullptr;

View File

@ -76,7 +76,7 @@ const std::string& hack::GetType() {
static bool version_set = false; static bool version_set = false;
if (version_set) return version; if (version_set) return version;
version = ""; version = "";
#if not defined(IPC_ENABLED) #if not defined(ENABLE_IPC)
version += " NOIPC"; version += " NOIPC";
#endif #endif
#if not ENABLE_GUI #if not ENABLE_GUI

View File

@ -393,7 +393,7 @@ int HealingPriority(int idx) {
priority += 50 * (1 - healthp); priority += 50 * (1 - healthp);
priority += 10 * (1 - overhealp); priority += 10 * (1 - overhealp);
} }
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
if (ipc::peer) { if (ipc::peer) {
if (hacks::shared::followbot::bot && hacks::shared::followbot::following_idx == idx) { if (hacks::shared::followbot::bot && hacks::shared::followbot::following_idx == idx) {
priority *= 3.0f; priority *= 3.0f;

View File

@ -741,7 +741,7 @@ void _FASTCALL ProcessEntity(CachedEntity* ent) {
AddEntityString(ent, classes[pclass - 1]); AddEntityString(ent, classes[pclass - 1]);
} }
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
// ipc bot esp // ipc bot esp
if (show_bot_id && ipc::peer && ent != LOCAL_E) { if (show_bot_id && ipc::peer && ent != LOCAL_E) {
for (unsigned i = 0; i < cat_ipc::max_peers; i++) { for (unsigned i = 0; i < cat_ipc::max_peers; i++) {

View File

@ -9,7 +9,7 @@
#include "../common.h" #include "../common.h"
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
namespace hacks { namespace shared { namespace followbot { namespace hacks { namespace shared { namespace followbot {

View File

@ -5,7 +5,7 @@
* Author: nullifiedcat * Author: nullifiedcat
*/ */
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
#ifndef HACKS_FOLLOWBOT_H_ #ifndef HACKS_FOLLOWBOT_H_
#define HACKS_FOLLOWBOT_H_ #define HACKS_FOLLOWBOT_H_
@ -13,6 +13,7 @@
class CatCommand; class CatCommand;
class CatVar; class CatVar;
class CachedEntity; class CachedEntity;
class Vector;
#include "../ipc.h" #include "../ipc.h"

View File

@ -935,7 +935,7 @@ void OnLevelInit() {
static CatVar wb_abandon_too_many_bots(CV_INT, "wb_population_control", "0", "Abandon if bots >"); static CatVar wb_abandon_too_many_bots(CV_INT, "wb_population_control", "0", "Abandon if bots >");
void CheckLivingSpace() { void CheckLivingSpace() {
#if IPC_ENABLED #if ENABLE_IPC
if (ipc::peer && wb_abandon_too_many_bots) { if (ipc::peer && wb_abandon_too_many_bots) {
std::vector<unsigned> players {}; std::vector<unsigned> players {};
for (int j = 1; j < 32; j++) { for (int j = 1; j < 32; j++) {

View File

@ -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*)SendNetMsg_hook, offsets::SendNetMsg());
hooks::netchannel.HookMethod((void*)Shutdown_hook, offsets::Shutdown()); hooks::netchannel.HookMethod((void*)Shutdown_hook, offsets::Shutdown());
hooks::netchannel.Apply(); hooks::netchannel.Apply();
#if IPC_ENABLED #if ENABLE_IPC
ipc::UpdateServerAddress(); ipc::UpdateServerAddress();
#endif #endif
} }
@ -210,7 +210,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
hacks::shared::autojoin::Update(); hacks::shared::autojoin::Update();
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
static int team_joining_state = 0; static int team_joining_state = 0;
static float last_jointeam_try = 0; static float last_jointeam_try = 0;
CachedEntity *found_entity, *ent; CachedEntity *found_entity, *ent;
@ -358,7 +358,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
// TODO Auto Steam Friend // TODO Auto Steam Friend
#if IPC_ENABLED #if ENABLE_IPC
{ {
PROF_SECTION(CM_playerlist); PROF_SECTION(CM_playerlist);
static Timer ipc_update_timer {}; static Timer ipc_update_timer {};
@ -412,7 +412,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
ret = false; ret = false;
} }
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
if (CE_GOOD(g_pLocalPlayer->entity) && !g_pLocalPlayer->life_state) { if (CE_GOOD(g_pLocalPlayer->entity) && !g_pLocalPlayer->life_state) {
PROF_SECTION(CM_followbot); PROF_SECTION(CM_followbot);
SAFE_CALL(hacks::shared::followbot::AfterCreateMove()); SAFE_CALL(hacks::shared::followbot::AfterCreateMove());

View File

@ -100,6 +100,7 @@ void OverrideView_hook(void* _this, CViewSetup* setup) {
setup->fov = override_fov; setup->fov = override_fov;
} }
} }
setup->origin -= Vector(0, 0, 96);
draw::fov = setup->fov; draw::fov = setup->fov;
SEGV_END; SEGV_END;
} }
@ -241,7 +242,7 @@ void Shutdown_hook(void* _this, const char* reason) {
} else if (strstr(reason, "VAC")) { } else if (strstr(reason, "VAC")) {
logging::Info("VAC error?"); logging::Info("VAC error?");
} }
#if IPC_ENABLED #if ENABLE_IPC
ipc::UpdateServerAddress(true); ipc::UpdateServerAddress(true);
#endif #endif
SEGV_BEGIN; SEGV_BEGIN;
@ -328,7 +329,7 @@ static CatVar ipc_name(CV_STRING, "name_ipc", "", "IPC Name");
const char* GetFriendPersonaName_hook(ISteamFriends* _this, CSteamID steamID) { const char* GetFriendPersonaName_hook(ISteamFriends* _this, CSteamID steamID) {
static const GetFriendPersonaName_t original = (GetFriendPersonaName_t)hooks::steamfriends.GetMethod(offsets::GetFriendPersonaName()); static const GetFriendPersonaName_t original = (GetFriendPersonaName_t)hooks::steamfriends.GetMethod(offsets::GetFriendPersonaName());
#if IPC_ENABLED #if ENABLE_IPC
if (ipc::peer) { if (ipc::peer) {
static std::string namestr(ipc_name.GetString()); static std::string namestr(ipc_name.GetString());
namestr.assign(ipc_name.GetString()); namestr.assign(ipc_name.GetString());
@ -417,7 +418,7 @@ void FrameStageNotify_hook(void* _this, int stage) {
} }
} }
if (stage == FRAME_START) { if (stage == FRAME_START) {
#if IPC_ENABLED #if ENABLE_IPC
static Timer nametimer {}; static Timer nametimer {};
if (nametimer.test_and_set(1000 * 10)) { if (nametimer.test_and_set(1000 * 10)) {
if (ipc::peer) { if (ipc::peer) {
@ -540,7 +541,7 @@ void LevelInit_hook(void* _this, const char* newmap) {
hacks::shared::anticheat::ResetEverything(); hacks::shared::anticheat::ResetEverything();
original(_this, newmap); original(_this, newmap);
hacks::shared::walkbot::OnLevelInit(); hacks::shared::walkbot::OnLevelInit();
#if IPC_ENABLED #if ENABLE_IPC
if (ipc::peer) { if (ipc::peer) {
ipc::peer->memory->peer_user_data[ipc::peer->client_id].ts_connected = time(nullptr); 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(); chat_stack::Reset();
hacks::shared::anticheat::ResetEverything(); hacks::shared::anticheat::ResetEverything();
original(_this); original(_this);
#if IPC_ENABLED #if ENABLE_IPC
if (ipc::peer) { if (ipc::peer) {
ipc::peer->memory->peer_user_data[ipc::peer->client_id].ts_disconnected = time(nullptr); ipc::peer->memory->peer_user_data[ipc::peer->client_id].ts_disconnected = time(nullptr);
} }

View File

@ -12,7 +12,7 @@
#include "hack.h" #include "hack.h"
#include "hitrate.hpp" #include "hitrate.hpp"
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
namespace ipc { namespace ipc {

View File

@ -5,7 +5,7 @@
* Author: nullifiedcat * Author: nullifiedcat
*/ */
#ifdef IPC_ENABLED #if ENABLE_IPC == 1
#ifndef IPC_H_ #ifndef IPC_H_
#define IPC_H_ #define IPC_H_