improve minwalk

some more backend changes
This commit is contained in:
rei-2 committed 2024-10-29 03:10:09 -04:00
1 parent 52ee025e7f
commit 212d838b31
30 files changed
+134 -135

No files matched your search

+1 -1
View File
@@ -478,8 +478,8 @@
<ClCompile Include="src\Hooks\CAttributeManager_AttribHookValue.cpp" />
<ClCompile Include="src\Hooks\CParticleProperty_Create.cpp" />
<ClCompile Include="src\Hooks\CPlayerResource_GetPlayerName.cpp" />
<ClCompile Include="src\Hooks\CTFGameRules_AllowThirdPersonCamera.cpp" />
<ClCompile Include="src\Hooks\CTFGCClientSystem_UpdateAssignedLobby.cpp" />
<ClCompile Include="src\Hooks\CThirdPersonManager_Update.cpp" />
<ClCompile Include="src\Hooks\CViewRender_PerformScreenOverlay.cpp" />
<ClCompile Include="src\Hooks\IBaseClientDLL_DispatchUserMessage.cpp" />
<ClCompile Include="src\Hooks\IBaseClientDLL_FrameStageNotify.cpp" />
+1 -1
View File
@@ -161,7 +161,6 @@
<ClCompile Include="src\Hooks\R_DrawSkyBox.cpp" />
<ClCompile Include="src\Hooks\CL_ProcessPacketEntities.cpp" />
<ClCompile Include="src\Hooks\GenerateEquipRegionConflictMask.cpp" />
<ClCompile Include="src\Hooks\CTFGameRules_AllowThirdPersonCamera.cpp" />
<ClCompile Include="src\Hooks\CBaseViewModel_ShouldFlipViewModel.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_WorldSpaceCenter.cpp" />
<ClCompile Include="src\Hooks\IPanel_PaintTraverse.cpp" />
@@ -174,6 +173,7 @@
<ClCompile Include="src\Utils\CrashLog\CrashLog.cpp" />
<ClCompile Include="src\BytePatches\BytePatches.cpp" />
<ClCompile Include="src\Hooks\CBaseAnimating_DoAnimationEvents.cpp" />
<ClCompile Include="src\Hooks\CThirdPersonManager_Update.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Utils\UtlVector\UtlVector.h" />
@@ -538,7 +538,7 @@ void CAimbotMelee::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd
}
}
int GetAttachment(CBaseObject* pBuilding, int i)
static inline int GetAttachment(CBaseObject* pBuilding, int i)
{
int iAttachment = pBuilding->GetBuildPointAttachmentIndex(i);
if (pBuilding->IsSentrygun() && pBuilding->m_iUpgradeLevel() > 1) // idk why i need this
@@ -122,7 +122,7 @@ std::vector<Target_t> CAimbotProjectile::SortTargets(CTFPlayer* pLocal, CTFWeapo
float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pLocal = nullptr)
static inline float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pLocal = nullptr)
{
float flRadius = 0.f;
switch (pWeapon->GetWeaponID())
@@ -150,7 +150,7 @@ float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pLocal = nullptr)
return flRadius * Vars::Aimbot::Projectile::SplashRadius.Value / 100;
}
float PrimeTime(CTFWeaponBase* pWeapon)
static inline float PrimeTime(CTFWeaponBase* pWeapon)
{
if (Vars::Aimbot::Projectile::Modifiers.Value & Vars::Aimbot::Projectile::ModifiersEnum::UsePrimeTime && pWeapon->GetWeaponID() == TF_WEAPON_PIPEBOMBLAUNCHER)
{
@@ -232,7 +232,7 @@ std::unordered_map<int, Vec3> CAimbotProjectile::GetDirectPoints(Target_t& targe
}
// seode
std::vector<std::pair<Vec3, int>> ComputeSphere(float flRadius, int iSamples)
static inline std::vector<std::pair<Vec3, int>> ComputeSphere(float flRadius, int iSamples)
{
std::vector<std::pair<Vec3, int>> vPoints;
vPoints.reserve(iSamples);
@@ -385,7 +385,7 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& target, std::v
return vPoints;
}
float AABBLine(Vec3 vMins, Vec3 vMaxs, Vec3 vStart, Vec3 vDir)
static inline float AABBLine(Vec3 vMins, Vec3 vMaxs, Vec3 vStart, Vec3 vDir)
{
Vec3 a = {
(vMins.x - vStart.x) / vDir.x,
@@ -404,7 +404,7 @@ float AABBLine(Vec3 vMins, Vec3 vMaxs, Vec3 vStart, Vec3 vDir)
};
return std::max(std::max(c.x, c.y), c.z);
}
Vec3 PullPoint(Vec3 vPoint, Vec3 vLocalPos, Info_t& tInfo, Vec3 vMins, Vec3 vMaxs, Vec3 vTargetPos)
static inline Vec3 PullPoint(Vec3 vPoint, Vec3 vLocalPos, Info_t& tInfo, Vec3 vMins, Vec3 vMaxs, Vec3 vTargetPos)
{
auto HeightenLocalPos = [&]()
{ // basic trajectory pass
@@ -432,7 +432,7 @@ Vec3 PullPoint(Vec3 vPoint, Vec3 vLocalPos, Info_t& tInfo, Vec3 vMins, Vec3 vMax
void SolveProjectileSpeed(CTFWeaponBase* pWeapon, const Vec3& vLocalPos, const Vec3& vTargetPos, float& flVelocity, float& flDragTime, const float flGravity)
static inline void SolveProjectileSpeed(CTFWeaponBase* pWeapon, const Vec3& vLocalPos, const Vec3& vTargetPos, float& flVelocity, float& flDragTime, const float flGravity)
{
if (F::ProjSim.obj->m_dragBasis.IsZero())
return;
@@ -649,7 +649,7 @@ bool CAimbotProjectile::TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, Tar
//G::LineStorage.clear();
//G::LineStorage.push_back({ { pLocal->GetShootPos(), vPos }, I::GlobalVars->curtime + 5.f, Vars::Colors::Prediction.Value });
float closestDist; int closestId = -1;
float closestDist = 0.f; int closestId = -1;
for (int i = 0; i < pSet->numhitboxes; ++i)
{
auto pBox = pSet->pHitbox(i);
@@ -1,7 +1,5 @@
#include "Backtrack.h"
//#include "../Simulation/MovementSimulation/MovementSimulation.h"
void CBacktrack::Restart()
{
m_mRecords.clear();
+6 -5
View File
@@ -128,7 +128,7 @@ void CCritHack::GetTotalCrits(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
{
int shots = iCritChecks, crits = iCritSeedRequests;
float bucket = flBucket, flCost = flDamage * TF_DAMAGE_CRIT_MULTIPLIER;
const int iAttempts = std::min(tStorage.m_iPotentialCrits + 1, 100);
const int iAttempts = std::min(tStorage.m_iPotentialCrits + 1, 1000);
for (int i = 0; i < iAttempts; i++)
{
shots++; crits++;
@@ -146,7 +146,7 @@ void CCritHack::GetTotalCrits(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
{
int shots = iCritChecks + 1, crits = iCritSeedRequests + 1;
float bucket = std::min(flBucket + tStorage.m_flDamage, flBucketCap), flCost = flDamage * TF_DAMAGE_CRIT_MULTIPLIER;
for (int i = 0; i < 100; i++)
for (int i = 0; i < 1000; i++)
{
iCrits--;
if (!tWeaponData.m_bUseRapidFireCrits || !(i % int(tWeaponData.m_flTimeFireDelay / TICK_INTERVAL)))
@@ -478,14 +478,15 @@ void CCritHack::Draw(CTFPlayer* pLocal)
}
else
{
const int shots = -tStorage.m_iAvailableCrits;
H::Draw.StringOutlined(fFont, x, y, { 255, 150, 150, 255 }, { 0, 0, 0, 255 }, align, shots == 1 ? std::format("Crit in {} shot", shots).c_str() : std::format("Crit in {}{} shots", shots, shots == 100 ? "+" : "").c_str());
const int iShots = -tStorage.m_iAvailableCrits;
H::Draw.StringOutlined(fFont, x, y, { 255, 150, 150, 255 }, { 0, 0, 0, 255 }, align, std::format("Crit in {}{} shot{}", iShots, iShots == 1000 ? "+" : "", iShots == 1 ? "" : "s").c_str());
}
}
else
H::Draw.StringOutlined(fFont, x, y, { 255, 150, 150, 255 }, { 0, 0, 0, 255 }, align, std::format("Deal {} damage", m_iDamageTilUnban).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("{} / {} potential crits", std::max(tStorage.m_iAvailableCrits, 0), tStorage.m_iPotentialCrits).c_str());
int iCrits = std::max(tStorage.m_iAvailableCrits, 0);
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("{}{} / {} potential crits", iCrits, iCrits == 1000 ? "+" : "", tStorage.m_iPotentialCrits).c_str());
}
else
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Calculating");
+3 -69
View File
@@ -34,8 +34,6 @@ void CMisc::RunPost(CTFPlayer* pLocal, CUserCmd* pCmd, bool pSendPacket)
TauntKartControl(pLocal, pCmd);
FastMovement(pLocal, pCmd);
AntiWarp(pLocal, pCmd);
LegJitter(pLocal, pCmd, pSendPacket);
}
@@ -202,7 +200,8 @@ void CMisc::MovementLock(CTFPlayer* pLocal, CUserCmd* pCmd)
}
Vec3 vMove = Math::RotatePoint(vDir, {}, { 0, -pCmd->viewangles.y, 0 });
pCmd->forwardmove = vMove.x * (fmodf(fabsf(pCmd->viewangles.x), 180.f) > 90.f ? -1 : 1), pCmd->sidemove = -vMove.y, pCmd->upmove = vDir.z;
pCmd->forwardmove = vMove.x * (fmodf(fabsf(pCmd->viewangles.x), 180.f) > 90.f ? -1 : 1);
pCmd->sidemove = -vMove.y, pCmd->upmove = vDir.z;
}
void CMisc::AntiAFK(CTFPlayer* pLocal, CUserCmd* pCmd)
@@ -401,71 +400,6 @@ void CMisc::FastMovement(CTFPlayer* pLocal, CUserCmd* pCmd)
}
}
void CMisc::AntiWarp(CTFPlayer* pLocal, CUserCmd* pCmd)
{
static Vec3 vVelocity = {};
if (G::AntiWarp)
{
const int iDoubletapTicks = F::Ticks.GetTicks();
Vec3 vAngles; Math::VectorAngles(vVelocity, vAngles);
vAngles.y = pCmd->viewangles.y - vAngles.y;
Vec3 vForward; Math::AngleVectors(vAngles, &vForward);
vForward *= vVelocity.Length();
if (iDoubletapTicks > std::max(Vars::CL_Move::Doubletap::TickLimit.Value - 8, 3))
{
pCmd->forwardmove = -vForward.x;
pCmd->sidemove = -vForward.y;
}
else if (iDoubletapTicks > 3)
{
pCmd->forwardmove = pCmd->sidemove = 0.f;
pCmd->buttons &= ~(IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT);
}
else
{
pCmd->forwardmove = vForward.x;
pCmd->sidemove = vForward.y;
}
}
else
vVelocity = pLocal->m_vecVelocity();
/*
static bool bSet = false;
if (!G::AntiWarp)
{
bSet = false;
return;
}
if (G::Attacking != 1 && !bSet)
{
bSet = true;
SDK::StopMovement(pLocal, pCmd);
}
else
pCmd->forwardmove = pCmd->sidemove = 0.f;
*/
}
void CMisc::LegJitter(CTFPlayer* pLocal, CUserCmd* pCmd, bool pSendPacket)
{
if (!Vars::AntiHack::AntiAim::MinWalk.Value || !F::AntiAim.YawOn() || G::Attacking == 1 || G::DoubleTap || pSendPacket || !pLocal->m_hGroundEntity() || pLocal->IsInBumperKart())
return;
static bool pos = true;
const float scale = pLocal->IsDucking() ? 14.f : 1.f;
if (pCmd->forwardmove == 0.f && pCmd->sidemove == 0.f && pLocal->m_vecVelocity().Length2D() < 10.f)
{
pos ? pCmd->forwardmove = scale : pCmd->forwardmove = -scale;
pos ? pCmd->sidemove = scale : pCmd->sidemove = -scale;
pos = !pos;
}
}
void CMisc::Event(IGameEvent* pEvent, uint32_t uHash)
@@ -487,7 +421,7 @@ void CMisc::Event(IGameEvent* pEvent, uint32_t uHash)
int CMisc::AntiBackstab(CTFPlayer* pLocal, CUserCmd* pCmd, bool bSendPacket)
{
if (!Vars::Misc::Automation::AntiBackstab.Value || !bSendPacket || G::Attacking == 1 || pLocal->IsInBumperKart())
if (!Vars::Misc::Automation::AntiBackstab.Value || !bSendPacket || G::Attacking == 1 || pLocal->m_MoveType() != MOVETYPE_WALK || pLocal->IsInBumperKart())
return 0;
std::vector<std::pair<Vec3, CBaseEntity*>> vTargets = {};
-2
View File
@@ -22,8 +22,6 @@ class CMisc
void TauntKartControl(CTFPlayer* pLocal, CUserCmd* pCmd);
void FastMovement(CTFPlayer* pLocal, CUserCmd* pCmd);
void AntiWarp(CTFPlayer* pLocal, CUserCmd* pCmd);
void LegJitter(CTFPlayer* pLocal, CUserCmd* pCmd, bool pSendPacket);
Vec3 vPeekReturnPos = {};
//bool bSteamCleared = false;
@@ -30,18 +30,15 @@ bool CAntiAim::YawOn()
bool CAntiAim::ShouldRun(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
{
if (!pLocal)
if (!pLocal || !pLocal->IsAlive() || pLocal->IsAGhost() || pLocal->IsTaunting() || pLocal->m_MoveType() != MOVETYPE_WALK || pLocal->IsInBumperKart()
|| G::Attacking == 1 || F::AutoRocketJump.IsRunning()
|| pWeapon && pWeapon->m_iItemDefinitionIndex() == Soldier_m_TheBeggarsBazooka && pCmd->buttons & IN_ATTACK && !(G::LastUserCmd->buttons & IN_ATTACK))
return false;
if (pLocal->IsCharging() || pCmd->buttons & IN_ATTACK2 && (pLocal->m_bShieldEquipped() && pLocal->m_flChargeMeter() == 100.f
|| pWeapon && pWeapon->GetWeaponID() == TF_WEAPON_LUNCHBOX && G::PrimaryWeaponType == EWeaponType::PROJECTILE && pWeapon->HasPrimaryAmmoForShot()))
return false;
if (!pLocal->IsAlive() || pLocal->IsAGhost() || pLocal->IsTaunting() || pLocal->IsInBumperKart()
|| G::Attacking == 1 || F::AutoRocketJump.IsRunning()
|| pWeapon && pWeapon->m_iItemDefinitionIndex() == Soldier_m_TheBeggarsBazooka && pCmd->buttons & IN_ATTACK && !(G::LastUserCmd->buttons & IN_ATTACK))
return false;
return true;
}
@@ -195,6 +192,23 @@ float CAntiAim::GetPitch(float flCurPitch)
return flCurPitch;
}
void CAntiAim::MinWalk(CTFPlayer* pLocal, CUserCmd* pCmd, bool bSendPacket)
{
if (!Vars::AntiHack::AntiAim::MinWalk.Value || !F::AntiAim.YawOn() || G::DoubleTap || !pLocal->m_hGroundEntity() || pLocal->IsInBumperKart())
return;
static bool bVar = true;
if (!pCmd->forwardmove && !pCmd->sidemove && pLocal->m_vecVelocity().Length2D() < 10.f)
{
float flMove = (pLocal->IsDucking() ? 14.f : 1.f) * ((bVar = !bVar) ? 1 : -1);
Vec3 vDir = { flMove, flMove, 0 };
Vec3 vMove = Math::RotatePoint(vDir, {}, { 0, -pCmd->viewangles.y, 0 });
pCmd->forwardmove = vMove.x * (fmodf(fabsf(pCmd->viewangles.x), 180.f) > 90.f ? -1 : 1);
pCmd->sidemove = -vMove.y;
}
}
void CAntiAim::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bool bSendPacket)
@@ -204,7 +218,7 @@ void CAntiAim::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bo
G::AntiAim = AntiAimOn() && ShouldRun(pLocal, pWeapon, pCmd);
int iAntiBackstab = F::Misc.AntiBackstab(pLocal, pCmd, bSendPacket);
if (!iAntiBackstab)
if (!iAntiBackstab && pLocal->m_MoveType() == MOVETYPE_WALK)
FakeShotAngles(pCmd);
if (!G::AntiAim)
@@ -221,4 +235,6 @@ void CAntiAim::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bo
SDK::FixMovement(pCmd, vAngles);
pCmd->viewangles.x = vAngles.x;
pCmd->viewangles.y = vAngles.y;
MinWalk(pLocal, pCmd, bSendPacket);
}
@@ -13,6 +13,7 @@ private:
float GetYaw(CTFPlayer* pLocal, CUserCmd* pCmd, bool bFake);
float GetPitch(float flCurPitch);
void MinWalk(CTFPlayer* pLocal, CUserCmd* pCmd, bool bSendPacket);
public:
bool AntiAimOn();
@@ -2,7 +2,7 @@
#include "../Visuals/FakeAngle/FakeAngle.h"
bool AntiAimCheck(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
static inline bool AntiAimCheck(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
{
return F::AntiAim.YawOn() && F::AntiAim.ShouldRun(pLocal, pWeapon, pCmd) && I::ClientState->chokedcommands < 3 && !G::Recharge;
}
+1 -1
View File
@@ -3,7 +3,7 @@
#include "../../SDK/Definitions/Types.h"
#include "../Records/Records.h"
uint32_t GetFriendsID(int iIndex)
static inline uint32_t GetFriendsID(int iIndex)
{
PlayerInfo_t pi{};
if (I::EngineClient->GetPlayerInfo(iIndex, &pi) && !pi.fakeplayer)
@@ -120,7 +120,7 @@ void CMovementSimulation::Reset(PlayerStorage& playerStorage)
}
inline float GetPlayerGravity(CTFPlayer* pEntity)
static inline float GetPlayerGravity(CTFPlayer* pEntity)
{
static auto sv_gravity = U::ConVars.FindVar("sv_gravity");
@@ -117,6 +117,56 @@ bool CTickshiftHandler::ValidWeapon(CTFWeaponBase* pWeapon)
return true;
}
void CTickshiftHandler::AntiWarp(CTFPlayer* pLocal, CUserCmd* pCmd)
{
static Vec3 vVelocity = {};
if (G::AntiWarp)
{
const int iDoubletapTicks = F::Ticks.GetTicks();
Vec3 vAngles; Math::VectorAngles(vVelocity, vAngles);
vAngles.y = pCmd->viewangles.y - vAngles.y;
Vec3 vForward; Math::AngleVectors(vAngles, &vForward);
vForward *= vVelocity.Length();
if (iDoubletapTicks > std::max(Vars::CL_Move::Doubletap::TickLimit.Value - 8, 3))
{
pCmd->forwardmove = -vForward.x;
pCmd->sidemove = -vForward.y;
}
else if (iDoubletapTicks > 3)
{
pCmd->forwardmove = pCmd->sidemove = 0.f;
pCmd->buttons &= ~(IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT);
}
else
{
pCmd->forwardmove = vForward.x;
pCmd->sidemove = vForward.y;
}
}
else
vVelocity = pLocal->m_vecVelocity();
/*
static bool bSet = false;
if (!G::AntiWarp)
{
bSet = false;
return;
}
if (G::Attacking != 1 && !bSet)
{
bSet = true;
SDK::StopMovement(pLocal, pCmd);
}
else
pCmd->forwardmove = pCmd->sidemove = 0.f;
*/
}
void CTickshiftHandler::CLMoveFunc(float accumulated_extra_samples, bool bFinalTick)
{
static auto CL_Move = U::Hooks.m_mHooks["CL_Move"];
@@ -206,6 +256,7 @@ void CTickshiftHandler::MovePost(CTFPlayer* pLocal, CUserCmd* pCmd)
return;
Doubletap(pLocal, pCmd);
AntiWarp(pLocal, pCmd);
}
void CTickshiftHandler::Run(float accumulated_extra_samples, bool bFinalTick, CTFPlayer* pLocal)
@@ -3,29 +3,29 @@
class CTickshiftHandler
{
// logic
void Recharge(CTFPlayer* pLocal);
void Teleport();
void Doubletap(CTFPlayer* pLocal, CUserCmd* pCmd);
void Speedhack();
bool ValidWeapon(CTFWeaponBase* pWeapon);
void AntiWarp(CTFPlayer* pLocal, CUserCmd* pCmd);
// utils
void CLMoveFunc(float accumulated_extra_samples, bool bFinalTick);
void MovePre(CTFPlayer* pLocal);
void MoveMain(float accumulated_extra_samples, bool bFinalTick);
bool bSpeedhack = false;
bool bGoalReached = true;
public:
int GetTicks();
void Run(float accumulated_extra_samples, bool bFinalTick, CTFPlayer* pLocal);
void MovePost(CTFPlayer* pLocal, CUserCmd* pCmd);
void ManagePacket(CUserCmd* pCmd, bool* pSendPacket);
void Reset();
void MovePre(CTFPlayer* pLocal);
void MoveMain(float accumulated_extra_samples, bool bFinalTick);
void MovePost(CTFPlayer* pLocal, CUserCmd* pCmd);
int GetTicks();
void ManagePacket(CUserCmd* pCmd, bool* pSendPacket);
int iDeficit = 0;
};
+1 -1
View File
@@ -5,7 +5,7 @@
#include "../../Backtrack/Backtrack.h"
#include "../../Players/PlayerUtils.h"
inline bool GetPlayerChams(CBaseEntity* pEntity, CTFPlayer* pLocal, Chams_t* pChams, bool bFriendly, bool bEnemy)
static inline bool GetPlayerChams(CBaseEntity* pEntity, CTFPlayer* pLocal, Chams_t* pChams, bool bFriendly, bool bEnemy)
{
if (Vars::Chams::Player::Local.Value && pEntity == pLocal
|| Vars::Chams::Player::Friend.Value && H::Entities.IsFriend(pEntity->entindex())
+1 -1
View File
@@ -5,7 +5,7 @@
#include "../../Backtrack/Backtrack.h"
#include "../../Players/PlayerUtils.h"
inline bool GetPlayerGlow(CBaseEntity* pEntity, CTFPlayer* pLocal, Glow_t* pGlow, Color_t* pColor, bool bFriendly, bool bEnemy)
static inline bool GetPlayerGlow(CBaseEntity* pEntity, CTFPlayer* pLocal, Glow_t* pGlow, Color_t* pColor, bool bFriendly, bool bEnemy)
{
if (Vars::Glow::Player::Local.Value && pEntity == pLocal
|| Vars::Glow::Player::Friend.Value && H::Entities.IsFriend(pEntity->entindex())
@@ -374,12 +374,12 @@ void CPlayerConditions::Draw(CTFPlayer* pLocal)
align = ALIGN_TOPRIGHT;
}
std::vector<std::wstring> conditionsVec = Get(pLocal);
std::vector<std::wstring> vConditions = Get(pLocal);
int offset = 0;
for (const std::wstring& cond : conditionsVec)
int iOffset = 0;
for (const std::wstring& sCondition : vConditions)
{
H::Draw.StringOutlined(fFont, x, y + offset, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, cond.data());
offset += fFont.m_nTall + 1;
H::Draw.StringOutlined(fFont, x, y + iOffset, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, sCondition.c_str());
iOffset += fFont.m_nTall + 1;
}
}
@@ -129,6 +129,6 @@ void CSpectatorList::Draw(CTFPlayer* pLocal)
color = { 255, 100, 100, 255 };
else if (FNV1A::Hash32(Spectator.m_sMode.c_str()) == FNV1A::Hash32Const("1st"))
color = { 255, 200, 127, 255 };
H::Draw.StringOutlined(fFont, x + iconOffset, y, color, Vars::Menu::Theme::Background.Value, align, "%s - %s (respawn %ds)", Spectator.m_sName.c_str(), Spectator.m_sMode.c_str(), Spectator.m_iRespawnIn);
H::Draw.StringOutlined(fFont, x + iconOffset, y, color, Vars::Menu::Theme::Background.Value, align, std::format("{} - {} (respawn {}s)", Spectator.m_sName, Spectator.m_sMode, Spectator.m_iRespawnIn).c_str());
}
}
+12 -12
View File
@@ -48,7 +48,7 @@ void CVisuals::DrawTicks(CTFPlayer* pLocal)
float flRatio = float(std::clamp(iTicks, 0, G::MaxShift)) / G::MaxShift;
float flSizeX = 100 * Vars::Menu::Scale.Value, flSizeY = 12 * Vars::Menu::Scale.Value, flPosX = dtPos.x - flSizeX / 2, flPosY = dtPos.y + 5 + fFont.m_nTall;
H::Draw.StringOutlined(fFont, dtPos.x, dtPos.y + 2, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOP, "Ticks %d / %d", iTicks, G::MaxShift);
H::Draw.StringOutlined(fFont, dtPos.x, dtPos.y + 2, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOP, std::format("Ticks {} / {}", iTicks, G::MaxShift).c_str());
if (G::WaitForShift)
H::Draw.StringOutlined(fFont, dtPos.x, dtPos.y + fFont.m_nTall + iOffset, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOP, "Not Ready");
@@ -101,13 +101,13 @@ void CVisuals::DrawPing(CTFPlayer* pLocal)
}
if (flFake || Vars::Backtrack::Interp.Value && Vars::Backtrack::Enabled.Value)
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Real %.0f (+ %.0f) ms", flLatency, flFake);
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Real {:.0f} (+ {:.0f}) ms", flLatency, flFake).c_str());
else
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Real %.0f ms", flLatency);
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Real {:.0f} ms", flLatency).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Scoreboard %d ms", iLatencyScoreboard);
}
std::deque<Vec3> SplashTrace(Vec3 vOrigin, float flRadius, Vec3 vNormal = { 0, 0, 1 }, bool bTrace = true, int iSegments = 32)
static std::deque<Vec3> SplashTrace(Vec3 vOrigin, float flRadius, Vec3 vNormal = { 0, 0, 1 }, bool bTrace = true, int iSegments = 32)
{
if (!flRadius)
return {};
@@ -424,23 +424,23 @@ void CVisuals::DrawDebugInfo(CTFPlayer* pLocal)
if (pCmd)
{
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "View: (%.3f, %.3f, %.3f)", pCmd->viewangles.x, pCmd->viewangles.y, pCmd->viewangles.z);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Move: (%.0f, %.0f, %.0f)", pCmd->forwardmove, pCmd->sidemove, pCmd->upmove);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Buttons: %i", pCmd->buttons);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("View: ({:.3f}, {:.3f}, {:.3f})", pCmd->viewangles.x, pCmd->viewangles.y, pCmd->viewangles.z).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Move: ({}, {}, {})", pCmd->forwardmove, pCmd->sidemove, pCmd->upmove).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Buttons: {}", pCmd->buttons).c_str());
}
{
Vec3 vOrigin = pLocal->m_vecOrigin();
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Origin: (%.3f, %.3f, %.3f)", vOrigin.x, vOrigin.y, vOrigin.z);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Origin: ({:.3f}, {:.3f}, {:.3f})", vOrigin.x, vOrigin.y, vOrigin.z).c_str());
}
{
Vec3 vVelocity = pLocal->m_vecVelocity();
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Velocity: %.3f (%.3f, %.3f, %.3f)", vVelocity.Length(), vVelocity.x, vVelocity.y, vVelocity.z);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Velocity: {:.3f} ({:.3f}, {:.3f}, {:.3f})", vVelocity.Length(), vVelocity.x, vVelocity.y, vVelocity.z).c_str());
}
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Choke: {}, {}", G::Choking, I::ClientState->chokedcommands).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Ticks: {}, {}", G::ShiftedTicks, G::ShiftedGoal).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Round state: %i", SDK::GetRoundState());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Tickcount: %i", pLocal->m_nTickBase());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Entities: %i (%i, %i)", I::ClientEntityList->GetMaxEntities(), I::ClientEntityList->GetHighestEntityIndex(), I::ClientEntityList->NumberOfEntities(false));
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Round state: {}", SDK::GetRoundState()).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Tickcount: {}", pLocal->m_nTickBase()).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Entities: {} ({}, {})", I::ClientEntityList->GetMaxEntities(), I::ClientEntityList->GetHighestEntityIndex(), I::ClientEntityList->NumberOfEntities(false)).c_str());
if (!pWeapon || !pCmd)
return;
@@ -3,7 +3,7 @@
MAKE_SIGNATURE(CAttributeManager_AttribHookInt, "client.dll", "4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56 41 57 48 83 EC ? 48 8B 3D ? ? ? ? 4C 8D 35", 0x0);
MAKE_SIGNATURE(CTFPlayer_FireEvent_AttribHookValue_Call, "client.dll", "E8 ? ? ? ? 8B F8 83 BE", 0x5);
int ColorToInt(const Color_t& col)
static int ColorToInt(const Color_t& col)
{
return col.r << 16 | col.g << 8 | col.b;
}
@@ -2,7 +2,7 @@
// don't really see any benefit to keeping this
std::unordered_map<void*, std::pair<int, float>> pAnimatingInfo;
static std::unordered_map<void*, std::pair<int, float>> pAnimatingInfo;
MAKE_HOOK(CBaseAnimating_FrameAdvance, S::CBaseAnimating_FrameAdvance(), float, __fastcall,
void* rcx, float flInterval)
+1 -1
View File
@@ -2,7 +2,7 @@
#include "../Features/EnginePrediction/EnginePrediction.h"
std::vector<Vec3> vAngles;
static std::vector<Vec3> vAngles;
MAKE_HOOK(CPrediction_RunCommand, U::Memory.GetVFunc(I::Prediction, 17), void, __fastcall,
void* rcx, CTFPlayer* pPlayer, CUserCmd* pCmd, IMoveHelper* pMoveHelper)
@@ -10,7 +10,7 @@ MAKE_SIGNATURE(CTFHudMatchStatus_UpdatePlayerAvatar, "client.dll", "4D 85 C0 0F
MAKE_SIGNATURE(SectionedListPanel_SetItemFgColor, "client.dll", "40 53 48 83 EC ? 48 8B D9 3B 91 ? ? ? ? 73 ? 3B 91 ? ? ? ? 7F ? 48 8B 89 ? ? ? ? 48 89 7C 24 ? 8B FA 48 03 FF 39 54 F9 ? 75 ? 39 54 F9 ? 75 ? 48 8B 0C F9 41 8B D0 48 8B 01 FF 90 ? ? ? ? 48 8B 83 ? ? ? ? B2 ? 48 8B 0C F8 48 8B 01 FF 90 ? ? ? ? 48 8B 83 ? ? ? ? 45 33 C0", 0x0);
MAKE_SIGNATURE(CTFClientScoreBoardDialog_UpdatePlayerList_SetItemFgColor_Call, "client.dll", "49 8B 04 24 8B D5 C7 44 24", 0x0);
int CTFClientScoreBoardDialog_UpdatePlayerList_PlayerIndex;
static int CTFClientScoreBoardDialog_UpdatePlayerList_PlayerIndex;
MAKE_HOOK(CTFClientScoreBoardDialog_UpdatePlayerAvatar, S::CTFClientScoreBoardDialog_UpdatePlayerAvatar(), void, __fastcall,
void* rcx, int playerIndex, KeyValues* kv)
+1 -1
View File
@@ -23,7 +23,7 @@ MAKE_HOOK(CTFPlayerPanel_GetTeam, S::CTFPlayerPanel_GetTeam(), int, __fastcall,
return CALL_ORIGINAL(rcx);
}
int CTFTeamStatusPlayerPanel_Update_PlayerIndex;
static int CTFTeamStatusPlayerPanel_Update_PlayerIndex;
MAKE_HOOK(CTFTeamStatusPlayerPanel_Update, S::CTFTeamStatusPlayerPanel_Update(), bool, __fastcall,
void* rcx)
+1 -1
View File
@@ -10,7 +10,7 @@
#include "../Features/Visuals/SpectatorList/SpectatorList.h"
#include "../Features/Visuals/Visuals.h"
void Paint()
static void Paint()
{
H::Draw.UpdateW2SMatrix();
H::Draw.UpdateScreenSize();
@@ -2,7 +2,7 @@
MAKE_SIGNATURE(CTFGCClientSystem_PingThink, "client.dll", "48 89 4C 24 ? 55 41 54 41 55 48 8D AC 24 ? ? ? ? 48 81 EC", 0x0);
void POPID_ToString(SteamNetworkingPOPID popID, char* out)
static void POPID_ToString(SteamNetworkingPOPID popID, char* out)
{
out[0] = static_cast<char>(popID >> 16);
out[1] = static_cast<char>(popID >> 8);
@@ -43,7 +43,7 @@ MAKE_HOOK(IVModelRender_DrawModelExecute, U::Memory.GetVFunc(I::ModelRender, 19)
CALL_ORIGINAL(rcx, pState, pInfo, pBoneToWorld);
}
bool bDrawingViewmodel = false;
static bool bDrawingViewmodel = false;
MAKE_HOOK(CBaseAnimating_DrawModel, S::CBaseAnimating_DrawModel(), int, __fastcall,
void* rcx, int flags)
@@ -2,7 +2,7 @@
MAKE_SIGNATURE(RecvProxy_SimulationTime, "client.dll", "48 89 5C 24 ? 57 48 83 EC ? 8B 59 ? 48 8B FA 48 8B 42 ? 48 8D 4A ? FF 50 ? 4C 8B 0D ? ? ? ? 99 41 F7 79 ? 41 8B 49 ? 44 8B C1 44 2B C2 41 8B C0 99 41 F7 79 ? 8D 41 ? 44 2B C2 44 03 C3 44 3B C0 7D ? 41 2B C0 41 81 C0 ? ? ? ? FF C8 25 ? ? ? ? 44 03 C0 8D 41 ? 44 3B C0 7E ? 41 8B C8 2B C8 B8 ? ? ? ? FF C9 81 E1 ? ? ? ? 2B C1 44 03 C0 48 8B 5C 24 ? 66 41 0F 6E C0 0F 5B C0 F3 41 0F 59 41 ? F3 0F 11 87 ? ? ? ? 48 83 C4 ? 5F C3 CC CC CC CC CC 48 89 5C 24", 0x0);
int GetNetworkBase(int nTick, int nEntity)
static int GetNetworkBase(int nTick, int nEntity)
{
int nEntityMod = nEntity % I::GlobalVars->nTimestampRandomizeWindow;
int nBaseTick = I::GlobalVars->nTimestampNetworkingBase * int((nTick - nEntityMod) / I::GlobalVars->nTimestampNetworkingBase);