Skip to content
Permalink
Browse files

remove online

  • Loading branch information...
TotallyNotElite committed Oct 25, 2019
1 parent c97f6fd commit 59093fc4db747f9bd0a3fd368d16cff2dda93393
@@ -86,7 +86,6 @@ set(DataPath "/opt/cathook/data" CACHE FILEPATH "Data location")
set(VACBypass 0 CACHE BOOL "Textmode VAC bypass")
set(EnableTextmodeStdin 0 CACHE BOOL "Textmode Stdin -> Console bridge (EXPERIMENTAL)")
set(EnableWarnings 0 CACHE BOOL "Enable compile warnings")
set(EnableOnlineFeatures 0 CACHE BOOL "Enable online features (WIP)")
set(EnableIRC 1 CACHE BOOL "Enable IRC for messaging and ignore-cathook")
set(EnableLogging 1 CACHE BOOL "Enable logging to /tmp/")
set(EnableClip 1 CACHE BOOL "Enable anti electron/chromium freezing")
@@ -132,11 +131,6 @@ if(EnableIPC)
target_link_libraries(cathook SimpleIPC)
endif()

if(EnableOnlineFeatures)
add_subdirectory(external/co-library)
target_link_libraries(cathook co-library)
endif()

if(EnableVisuals)
if (EnableGlezDrawing)
add_subdirectory(external/libglez)
Submodule co-library deleted from 6d15c3
@@ -7,7 +7,6 @@ add_subdirectory(hacks)
add_subdirectory(hooks)
add_subdirectory(reclasses)
add_subdirectory(sdk)
add_subdirectory(online)
add_subdirectory(settings)

if(EnableVisuals)
@@ -12,7 +12,6 @@
#define ENABLE_TEXTMODE_STDIN @EnableTextmodeStdin@
#define ENABLE_TEXTMODE @Textmode@
#define ENABLE_PROFILER @EnableProfiler@
#define ENABLE_ONLINE @EnableOnlineFeatures@
#define ENABLE_IRC @EnableIRC@
#define ENABLE_LOGGING @EnableLogging@
#define ENABLE_CLIP @EnableClip@

This file was deleted.

This file was deleted.

@@ -44,7 +44,6 @@ add_subdirectory(hacks)
add_subdirectory(hooks)
add_subdirectory(reclasses)
add_subdirectory(sdk)
add_subdirectory(online)
add_subdirectory(settings)

if(EnableVisuals)
@@ -6,7 +6,6 @@
#include <unordered_map>
#include <hoovy.hpp>
#include <playerlist.hpp>
#include <online/Online.hpp>
#include "PlayerTools.hpp"
#include "entitycache.hpp"
#include "settings/Bool.hpp"
@@ -40,25 +39,6 @@ bool shouldTargetSteamId(unsigned id)
auto &pl = playerlist::AccessData(id);
if (playerlist::IsFriendly(pl.state) || (pl.state == playerlist::k_EState::CAT && *ignoreCathook))
return false;
#if ENABLE_ONLINE
auto *co = online::getUserData(id);
if (co)
{
bool check_verified = !online_only_verified || co->is_steamid_verified;
bool check_anonymous = online_anonymous || !co->is_anonymous;

if (check_verified && check_anonymous)
{
if (online_notarget && co->no_target)
return false;
if (online_friendly_software && co->is_using_friendly_software)
return false;
}
// Always check developer status, no exceptions
if (co->is_developer)
return false;
}
#endif
return true;
}
bool shouldTarget(CachedEntity *entity)
@@ -85,11 +65,6 @@ bool shouldAlwaysRenderEspSteamId(unsigned id)
auto &pl = playerlist::AccessData(id);
if (pl.state != playerlist::k_EState::DEFAULT)
return true;
#if ENABLE_ONLINE
auto *co = online::getUserData(id);
if (co)
return true;
#endif
return false;
}
bool shouldAlwaysRenderEsp(CachedEntity *entity)
@@ -112,17 +87,6 @@ std::optional<colors::rgba_t> forceEspColorSteamId(unsigned id)
if (pl != colors::empty)
return std::optional<colors::rgba_t>{ pl };

#if ENABLE_ONLINE
auto *co = online::getUserData(id);
if (co)
{
if (co->has_color)
return std::optional<colors::rgba_t>{ co->color };
if (co->rainbow)
return std::optional<colors::rgba_t>{ colors::RainbowCurrent() };
}
#endif

return std::nullopt;
}
std::optional<colors::rgba_t> forceEspColor(CachedEntity *entity)
@@ -6,7 +6,6 @@
*/

#include <hacks/ESP.hpp>
#include <online/Online.hpp>
#include <PlayerTools.hpp>
#include <settings/Bool.hpp>
#include "common.hpp"
@@ -1103,17 +1102,9 @@ void _FASTCALL ProcessEntity(CachedEntity *ent)
if (!g_IEngine->GetPlayerInfo(ent->m_IDX, &info))
return;

#if ENABLE_ONLINE
online::user_data *data = online_support ? online::getUserData(info.friendsID) : nullptr;
#endif

// TODO, check if u can just use "ent->m_bEnemy()" instead of m_iTeam
// Legit mode handling
if (legit && ent->m_iTeam() != g_pLocalPlayer->team && playerlist::IsDefault(info.friendsID)
#if ENABLE_ONLINE
&& !(data)
#endif
)
if (legit && ent->m_iTeam() != g_pLocalPlayer->team && playerlist::IsDefault(info.friendsID))
{
if (IsPlayerInvisible(ent))
return; // Invis check
@@ -1125,25 +1116,6 @@ void _FASTCALL ProcessEntity(CachedEntity *ent)
// return;
}

#if ENABLE_ONLINE
if (data)
{
AddEntityString(ent, "CO: " + data->username, colors::yellow);
if (data->is_steamid_verified)
AddEntityString(ent, "Verified SteamID", colors::green);
if (online_groups)
for (auto &s : data->shown_groups)
AddEntityString(ent, s, colors::orange);
if (online_software && data->has_software)
{
if (data->is_using_friendly_software)
AddEntityString(ent, "Software: " + data->software_name);
else
AddEntityString(ent, "Software: " + data->software_name, colors::red);
}
}
#endif

// Powerup handling
if (powerup_esp)
{
@@ -6,7 +6,6 @@
*/

#include <hacks/hacklist.hpp>
#include <online/Online.hpp>
#include <settings/Bool.hpp>
#include "common.hpp"
#include "hitrate.hpp"
@@ -32,9 +31,6 @@ DEFINE_HOOKED_METHOD(Paint, void, IEngineVGui *this_, PaintMode_t mode)
if (mode & PaintMode_t::PAINT_UIPANELS)
{
hitrate::Update();
#if ENABLE_ONLINE
online::update();
#endif
#if ENABLE_IPC
static Timer nametimer{};
if (nametimer.test_and_set(1000 * 10))

This file was deleted.

0 comments on commit 59093fc

Please sign in to comment.
You can’t perform that action at this time.