Disable cathook online, remove old scripts
This commit is contained in:
parent
f2fee90358
commit
8a14b7a056
@ -32,7 +32,7 @@ set(Textmode 0 CACHE BOOL "Various textmode-only features for bots")
|
||||
set(EnableTextmodeStdin 0 CACHE BOOL "Textmode Stdin -> Console bridge (EXPERIMENTAL)")
|
||||
set(EnableWarnings 1 CACHE BOOL "Enable compile warnings")
|
||||
set(EnableNullGraphics 0 CACHE BOOL "Enable experimental textmode hooks (CRASHES)")
|
||||
set(EnableOnlineFeatures 1 CACHE BOOL "Enable online features (WIP)")
|
||||
set(EnableOnlineFeatures 0 CACHE BOOL "Enable online features (WIP)")
|
||||
|
||||
if(NOT EnableVisuals)
|
||||
set(EnableGUI 0)
|
||||
|
18
arch-gcc-fix
18
arch-gcc-fix
@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# THIS IS FOR ARCH USERS ONLY
|
||||
# Cathook requires gcc6 to build. Steam requires gcc7 to run. There is no gcc6 and gcc7 package on arch, only a single gcc package that is currently updated to gcc7.
|
||||
# A solution to this would be to simply downgrade to gcc6 to update cathook, then re-upgrade to gcc7 to launch steam.
|
||||
# This will install gcc6, backup the files, then upgrade to gcc7 and place the files back. This way, gcc7 will be installed, but cathook can still use gcc6.
|
||||
#
|
||||
|
||||
# Get gcc6
|
||||
sudo pacman -U /var/cache/pacman/pkg/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz
|
||||
# Backup gcc6 to /tmp
|
||||
sudo cp -r /usr/include/c++/6.3.1/ /tmp/
|
||||
# Update back to gcc7
|
||||
sudo pacman -S lib62-gcc-libs gcc-libs-multilib gcc-multilib
|
||||
# Use backup of gcc6 and place back into c++
|
||||
sudo cp -r /tmp/6.3.1/ /usr/include/c++/
|
||||
# Should we remove the tmp folder afterwards..? It'll be deleted on restart regardless.
|
2
external/libglez
vendored
2
external/libglez
vendored
@ -1 +1 @@
|
||||
Subproject commit 7ccff462376086465ad5795514cdd83f587dbdb4
|
||||
Subproject commit 4e9c1ea11dfa80ace20ab0243c7e9dff499a4851
|
@ -11,11 +11,11 @@ rm ../install-all # remove install file
|
||||
# Install base Dependencies
|
||||
#
|
||||
if [ -f "/etc/arch-release" ]; then
|
||||
sudo pacman -Syy --needed --noconfirm boost cmake make lib32-libpng gcc gdb lib32-sdl2 lib32-glew freetype2 rsync lib32-openssl lib32-libglvnd
|
||||
sudo pacman -Syy --needed --noconfirm boost cmake make gcc gdb lib32-sdl2 lib32-glew freetype2 rsync lib32-openssl lib32-libglvnd
|
||||
else
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt update
|
||||
sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-7-multilib gcc-7 g++-7 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev cmake gcc-multilib g++-multilib libssl-dev:i386 -y
|
||||
sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-7-multilib gcc-7 g++-7 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake cmake gcc-multilib g++-multilib libssl-dev:i386 -y
|
||||
fi
|
||||
#
|
||||
# Update cathook
|
||||
|
@ -19,7 +19,7 @@ bool *bSendPackets{ nullptr };
|
||||
bool CanShootException = false;
|
||||
void SetCanshootStatus()
|
||||
{
|
||||
static int lastammo = -1;
|
||||
static int lastammo = -1;
|
||||
static int prevweaponclass = -1;
|
||||
if (LOCAL_W->m_iClassID() != prevweaponclass)
|
||||
lastammo = -1;
|
||||
@ -27,7 +27,7 @@ void SetCanshootStatus()
|
||||
CanShootException = true;
|
||||
else
|
||||
CanShootException = false;
|
||||
lastammo = CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1);
|
||||
lastammo = CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1);
|
||||
prevweaponclass = LOCAL_W->m_iClassID();
|
||||
}
|
||||
|
||||
|
@ -171,8 +171,10 @@ CachedHitbox *EntityHitboxCache::GetHitbox(int id)
|
||||
if (CE_BAD(parent_ref))
|
||||
return 0;
|
||||
typedef int (*InvalidateBoneCache_t)(IClientEntity *);
|
||||
static uintptr_t addr = gSignatures.GetClientSignature("55 8B 0D ? ? ? ? 89 E5 8B 45 ? 8D 51");
|
||||
static InvalidateBoneCache_t InvalidateBoneCache = InvalidateBoneCache_t(addr);
|
||||
static uintptr_t addr =
|
||||
gSignatures.GetClientSignature("55 8B 0D ? ? ? ? 89 E5 8B 45 ? 8D 51");
|
||||
static InvalidateBoneCache_t InvalidateBoneCache =
|
||||
InvalidateBoneCache_t(addr);
|
||||
InvalidateBoneCache(RAW_ENT(parent_ref));
|
||||
auto model = (model_t *) RAW_ENT(parent_ref)->GetModel();
|
||||
if (!model)
|
||||
|
@ -156,7 +156,7 @@ void updateSearch()
|
||||
#if not ENABLE_VISUALS
|
||||
if (queue_time.test_and_set(1200000))
|
||||
{
|
||||
*(int *)nullptr = 0;
|
||||
*(int *) nullptr = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -70,10 +70,13 @@ void draw()
|
||||
float minsize = 20.0f;
|
||||
if (size < minsize)
|
||||
size = minsize;
|
||||
glez::draw::rect(out.x - fabsf(pout.x - pout2.x) / 4, out.y - fabsf(pout.y - pout2.y) / 4, fabsf(pout.x - pout2.x) / 2, fabsf(pout.y - pout2.y) / 2,
|
||||
glez::draw::rect(out.x - fabsf(pout.x - pout2.x) / 4,
|
||||
out.y - fabsf(pout.y - pout2.y) / 4,
|
||||
fabsf(pout.x - pout2.x) / 2,
|
||||
fabsf(pout.y - pout2.y) / 2,
|
||||
hacks::shared::lightesp::LightESPColor(pEntity));
|
||||
glez::draw::rect(out.x - size / 8, out.y - size / 8, size / 4, size / 4,
|
||||
colors::red);
|
||||
glez::draw::rect(out.x - size / 8, out.y - size / 8, size / 4,
|
||||
size / 4, colors::red);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -194,11 +194,14 @@ static HookedFunction
|
||||
});
|
||||
static bool charge_aimbotted = false;
|
||||
static settings::Bool charge_aim{ "chargeaim.enable", "false" };
|
||||
static settings::Button charge_key{ "chargeaim.key", "<null>" };
|
||||
static HookedFunction
|
||||
ChargeAimbot(HookedFunctions_types::HF_CreateMove, "ChargeAim", 2, []() {
|
||||
charge_aimbotted = false;
|
||||
if (!*charge_aim)
|
||||
return;
|
||||
if (charge_key && !charge_key.isKeyDown())
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer())
|
||||
return;
|
||||
if (!HasCondition<TFCond_Charging>(LOCAL_E))
|
||||
@ -215,22 +218,21 @@ static HookedFunction
|
||||
fClampAngle(angles);
|
||||
DoSlowAim(angles);
|
||||
current_user_cmd->viewangles = angles;
|
||||
charge_aimbotted = true;
|
||||
charge_aimbotted = true;
|
||||
}
|
||||
});
|
||||
static settings::Bool charge_control{ "chargecontrol.enable", "false" };
|
||||
static settings::Int charge_int{ "chargecontrol.strength", "1" };
|
||||
static HookedFunction
|
||||
ChargeControl(HookedFunctions_types::HF_CreateMove, "ChargeControl", 1,
|
||||
[]() {
|
||||
if (!*charge_control || charge_aimbotted)
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer())
|
||||
return;
|
||||
if (!HasCondition<TFCond_Charging>(LOCAL_E))
|
||||
return;
|
||||
float offset = 0.0f;
|
||||
if (current_user_cmd->mousedx > 1 || current_user_cmd->mousedx < -1)
|
||||
offset = -(current_user_cmd->mousedx / 100 * *charge_int);
|
||||
current_user_cmd->viewangles.y += offset;
|
||||
});
|
||||
static HookedFunction ChargeControl(
|
||||
HookedFunctions_types::HF_CreateMove, "ChargeControl", 1, []() {
|
||||
if (!*charge_control || charge_aimbotted)
|
||||
return;
|
||||
if (CE_BAD(LOCAL_E) || !LOCAL_E->m_bAlivePlayer())
|
||||
return;
|
||||
if (!HasCondition<TFCond_Charging>(LOCAL_E))
|
||||
return;
|
||||
float offset = 0.0f;
|
||||
if (current_user_cmd->mousedx > 1 || current_user_cmd->mousedx < -1)
|
||||
offset = -(current_user_cmd->mousedx / 100 * *charge_int);
|
||||
current_user_cmd->viewangles.y += offset;
|
||||
});
|
||||
|
@ -1259,10 +1259,12 @@ bool CanShoot()
|
||||
if (lastfire != currfire)
|
||||
{
|
||||
lastfire = currfire;
|
||||
nextattack = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack);
|
||||
nextattack =
|
||||
CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack);
|
||||
}
|
||||
|
||||
servertime = (float) (CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) * g_GlobalVars->interval_per_tick;
|
||||
servertime = (float) (CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) *
|
||||
g_GlobalVars->interval_per_tick;
|
||||
if (CanShootException)
|
||||
return true;
|
||||
return nextattack <= servertime;
|
||||
|
@ -258,7 +258,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
g_pLocalPlayer->Update();
|
||||
}
|
||||
if (CE_GOOD(LOCAL_E) && !g_pLocalPlayer->life_state && CE_GOOD(LOCAL_W))
|
||||
SetCanshootStatus();
|
||||
SetCanshootStatus();
|
||||
if (firstcm)
|
||||
{
|
||||
DelayTimer.update();
|
||||
|
Reference in New Issue
Block a user