From 155af2ebb7dc04dfdc515757e22eb2ee1309b923 Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Mon, 30 Jul 2018 18:59:45 +0200 Subject: [PATCH] ToDo --- include/helpers.hpp | 1 - src/entityhitboxcache.cpp | 2 +- src/hacks/AutoHeal.cpp | 6 +++++- src/hacks/Walkbot.cpp | 1 - src/helpers.cpp | 27 +++++++-------------------- 5 files changed, 13 insertions(+), 24 deletions(-) diff --git a/include/helpers.hpp b/include/helpers.hpp index c8bf44a1..ee20e429 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -98,7 +98,6 @@ std::unique_ptr strfmt(const char *fmt, ...); // TODO move that to weaponid.h bool HasWeapon(CachedEntity *ent, int wantedId); bool IsAmbassador(CachedEntity *ent); -bool HasDarwins(CachedEntity *ent); bool AmbassadorCanHeadshot(); inline const char *teamname(int team) diff --git a/src/entityhitboxcache.cpp b/src/entityhitboxcache.cpp index c0324ad4..99a2fcd3 100644 --- a/src/entityhitboxcache.cpp +++ b/src/entityhitboxcache.cpp @@ -111,7 +111,7 @@ static CatVar setupbones_time( setupbones_time_enum, "setupbones_time", "3", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!"); -std::mutex setupbones_mutex; +static std::mutex setupbones_mutex; matrix3x4_t *EntityHitboxCache::GetBones() { diff --git a/src/hacks/AutoHeal.cpp b/src/hacks/AutoHeal.cpp index 769c538f..2491cfab 100644 --- a/src/hacks/AutoHeal.cpp +++ b/src/hacks/AutoHeal.cpp @@ -71,7 +71,11 @@ int BulletDangerValue(CachedEntity *patient) any_zoomed_snipers = true; // TODO VisCheck from patient. if ((int) vacc_sniper == 1) - if (!IsEntityVisible(ent, head)) + if (!IsEntityVisible(ent, head) && + !IsVectorVisible(ENTITY(m_iCurrentHealingTarget) + ->hitboxes.GetHitbox(head) + ->center, + ent->hitboxes.GetHitbox(head)->center, true)) continue; return vacc_sniper ? 2 : 1; } diff --git a/src/hacks/Walkbot.cpp b/src/hacks/Walkbot.cpp index 8cc83e8e..6d2fb256 100644 --- a/src/hacks/Walkbot.cpp +++ b/src/hacks/Walkbot.cpp @@ -841,7 +841,6 @@ index_t SelectNextNode() return FindNearestNode(true); } auto &n = state::nodes[state::active_node]; - // TODO medkit connections and shit std::vector chance{}; for (index_t i = 0; i < MAX_CONNECTIONS; i++) { diff --git a/src/helpers.cpp b/src/helpers.cpp index 358cf41f..6aeb91d6 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -544,20 +544,6 @@ bool HasWeapon(CachedEntity *ent, int wantedId) return false; } -bool HasDarwins(CachedEntity *ent) -{ - if (CE_BAD(ent)) - return false; - // Check if player is sniper - if (CE_INT(ent, netvar.iClass) != tf_sniper) - return false; - // Check if player is using darwins, 231 is the id for darwins danger sheild - if (HasWeapon(ent, 231)) - return true; - // Else return false - return false; -} - void VectorTransform(const float *in1, const matrix3x4_t &in2, float *out) { out[0] = (in1[0] * in2[0][0] + in1[1] * in2[0][1] + in1[2] * in2[0][2]) + @@ -724,7 +710,6 @@ float RandFloatRange(float min, float max) bool IsEntityVisible(CachedEntity *entity, int hb) { - Vector hit; if (g_Settings.bInvalid) return false; if (entity == g_pLocalPlayer->entity) @@ -936,7 +921,10 @@ weaponmode GetWeaponMode() classid == CL_CLASS(CTFSyringeGun) || classid == CL_CLASS(CTFCrossbow) || classid == CL_CLASS(CTFShotgunBuildingRescue) || - classid == CL_CLASS(CTFDRGPomson)) + classid == CL_CLASS(CTFDRGPomson) || + classid == CL_CLASS(CTFWeaponFlameBall) || + classid == CL_CLASS(CTFRaygun) || + classid == CL_CLASS(CTFGrapplingHook)) { return weaponmode::weapon_projectile; } @@ -1382,10 +1370,9 @@ void PrintChat(const char *fmt, ...) va_start(list, fmt); vsprintf(buf.get(), fmt, list); va_end(list); - std::unique_ptr str(strfmt("\x07%06X[\x07%06XCAT\x07%06X]\x01 %s", - 0x5e3252, 0xba3d9a, 0x5e3252, - buf.get()) - .release()); + std::unique_ptr str = + std::move(strfmt("\x07%06X[\x07%06XCAT\x07%06X]\x01 %s", 0x5e3252, + 0xba3d9a, 0x5e3252, buf.get())); // FIXME DEBUG LOG logging::Info("%s", str.get()); chat->Printf(str.get());