From 212d838b31889d167b3e9820da3fc34ff0f02524 Mon Sep 17 00:00:00 2001
From: rei-2 <174158077+rei-2@users.noreply.github.com>
Date: Tue, 29 Oct 2024 03:10:09 -0400
Subject: [PATCH] improve minwalk some more backend changes
---
Amalgam/Amalgam.vcxproj | 2 +-
Amalgam/Amalgam.vcxproj.filters | 2 +-
.../Aimbot/AimbotMelee/AimbotMelee.cpp | 2 +-
.../AimbotProjectile/AimbotProjectile.cpp | 14 ++--
Amalgam/src/Features/Backtrack/Backtrack.cpp | 2 -
Amalgam/src/Features/CritHack/CritHack.cpp | 11 +--
Amalgam/src/Features/Misc/Misc.cpp | 72 +------------------
Amalgam/src/Features/Misc/Misc.h | 2 -
.../Features/PacketManip/AntiAim/AntiAim.cpp | 30 ++++++--
.../Features/PacketManip/AntiAim/AntiAim.h | 1 +
.../src/Features/PacketManip/PacketManip.cpp | 2 +-
Amalgam/src/Features/Players/PlayerUtils.cpp | 2 +-
.../MovementSimulation/MovementSimulation.cpp | 2 +-
.../src/Features/TickHandler/TickHandler.cpp | 51 +++++++++++++
.../src/Features/TickHandler/TickHandler.h | 16 ++---
Amalgam/src/Features/Visuals/Chams/Chams.cpp | 2 +-
Amalgam/src/Features/Visuals/Glow/Glow.cpp | 2 +-
.../PlayerConditions/PlayerConditions.cpp | 10 +--
.../Visuals/SpectatorList/SpectatorList.cpp | 2 +-
Amalgam/src/Features/Visuals/Visuals.cpp | 24 +++----
.../CAttributeManager_AttribHookValue.cpp | 2 +-
.../src/Hooks/CBaseAnimating_FrameAdvance.cpp | 2 +-
Amalgam/src/Hooks/CPrediction_RunCommand.cpp | 2 +-
...entScoreBoardDialog_UpdatePlayerAvatar.cpp | 2 +-
Amalgam/src/Hooks/CTFPlayerPanel_GetTeam.cpp | 2 +-
...era.cpp => CThirdPersonManager_Update.cpp} | 0
Amalgam/src/Hooks/IEngineVGui_Paint.cpp | 2 +-
...eamNetworkingUtils_GetPingToDataCenter.cpp | 2 +-
.../Hooks/IVModelRender_DrawModelExecute.cpp | 2 +-
.../src/Hooks/RecvProxy_SimulationTime.cpp | 2 +-
30 files changed, 134 insertions(+), 135 deletions(-)
rename Amalgam/src/Hooks/{CTFGameRules_AllowThirdPersonCamera.cpp => CThirdPersonManager_Update.cpp} (100%)
diff --git a/Amalgam/Amalgam.vcxproj b/Amalgam/Amalgam.vcxproj
index 460f214a..aa036739 100644
--- a/Amalgam/Amalgam.vcxproj
+++ b/Amalgam/Amalgam.vcxproj
@@ -478,8 +478,8 @@
-
+
diff --git a/Amalgam/Amalgam.vcxproj.filters b/Amalgam/Amalgam.vcxproj.filters
index 77c4fb40..654511dc 100644
--- a/Amalgam/Amalgam.vcxproj.filters
+++ b/Amalgam/Amalgam.vcxproj.filters
@@ -161,7 +161,6 @@
-
@@ -174,6 +173,7 @@
+
diff --git a/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp b/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp
index 1a9b9d24..8cbcec4f 100644
--- a/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp
+++ b/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp
@@ -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
diff --git a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp
index 17ba7a99..094724fe 100644
--- a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp
+++ b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp
@@ -122,7 +122,7 @@ std::vector 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 CAimbotProjectile::GetDirectPoints(Target_t& targe
}
// seode
-std::vector> ComputeSphere(float flRadius, int iSamples)
+static inline std::vector> ComputeSphere(float flRadius, int iSamples)
{
std::vector> vPoints;
vPoints.reserve(iSamples);
@@ -385,7 +385,7 @@ std::vector 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);
diff --git a/Amalgam/src/Features/Backtrack/Backtrack.cpp b/Amalgam/src/Features/Backtrack/Backtrack.cpp
index 6345f185..b39897ea 100644
--- a/Amalgam/src/Features/Backtrack/Backtrack.cpp
+++ b/Amalgam/src/Features/Backtrack/Backtrack.cpp
@@ -1,7 +1,5 @@
#include "Backtrack.h"
-//#include "../Simulation/MovementSimulation/MovementSimulation.h"
-
void CBacktrack::Restart()
{
m_mRecords.clear();
diff --git a/Amalgam/src/Features/CritHack/CritHack.cpp b/Amalgam/src/Features/CritHack/CritHack.cpp
index b03e832e..0aeaec4b 100644
--- a/Amalgam/src/Features/CritHack/CritHack.cpp
+++ b/Amalgam/src/Features/CritHack/CritHack.cpp
@@ -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");
diff --git a/Amalgam/src/Features/Misc/Misc.cpp b/Amalgam/src/Features/Misc/Misc.cpp
index f3c18d36..bc4594a0 100644
--- a/Amalgam/src/Features/Misc/Misc.cpp
+++ b/Amalgam/src/Features/Misc/Misc.cpp
@@ -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> vTargets = {};
diff --git a/Amalgam/src/Features/Misc/Misc.h b/Amalgam/src/Features/Misc/Misc.h
index 6a5e6049..5863d89e 100644
--- a/Amalgam/src/Features/Misc/Misc.h
+++ b/Amalgam/src/Features/Misc/Misc.h
@@ -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;
diff --git a/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.cpp b/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.cpp
index 03317efb..f093b966 100644
--- a/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.cpp
+++ b/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.cpp
@@ -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);
}
\ No newline at end of file
diff --git a/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.h b/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.h
index c4f09aaa..b3b1fbf3 100644
--- a/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.h
+++ b/Amalgam/src/Features/PacketManip/AntiAim/AntiAim.h
@@ -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();
diff --git a/Amalgam/src/Features/PacketManip/PacketManip.cpp b/Amalgam/src/Features/PacketManip/PacketManip.cpp
index bccc13cd..1a1f27f5 100644
--- a/Amalgam/src/Features/PacketManip/PacketManip.cpp
+++ b/Amalgam/src/Features/PacketManip/PacketManip.cpp
@@ -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;
}
diff --git a/Amalgam/src/Features/Players/PlayerUtils.cpp b/Amalgam/src/Features/Players/PlayerUtils.cpp
index 06792346..14a69e9d 100644
--- a/Amalgam/src/Features/Players/PlayerUtils.cpp
+++ b/Amalgam/src/Features/Players/PlayerUtils.cpp
@@ -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)
diff --git a/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp b/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp
index de1207ae..17f784c5 100644
--- a/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp
+++ b/Amalgam/src/Features/Simulation/MovementSimulation/MovementSimulation.cpp
@@ -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");
diff --git a/Amalgam/src/Features/TickHandler/TickHandler.cpp b/Amalgam/src/Features/TickHandler/TickHandler.cpp
index 3f5244fe..390115b4 100644
--- a/Amalgam/src/Features/TickHandler/TickHandler.cpp
+++ b/Amalgam/src/Features/TickHandler/TickHandler.cpp
@@ -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)
diff --git a/Amalgam/src/Features/TickHandler/TickHandler.h b/Amalgam/src/Features/TickHandler/TickHandler.h
index 5cc567d6..c3f10278 100644
--- a/Amalgam/src/Features/TickHandler/TickHandler.h
+++ b/Amalgam/src/Features/TickHandler/TickHandler.h
@@ -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;
};
diff --git a/Amalgam/src/Features/Visuals/Chams/Chams.cpp b/Amalgam/src/Features/Visuals/Chams/Chams.cpp
index 9f283a77..89cfdc64 100644
--- a/Amalgam/src/Features/Visuals/Chams/Chams.cpp
+++ b/Amalgam/src/Features/Visuals/Chams/Chams.cpp
@@ -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())
diff --git a/Amalgam/src/Features/Visuals/Glow/Glow.cpp b/Amalgam/src/Features/Visuals/Glow/Glow.cpp
index 36b1419f..5fa6c162 100644
--- a/Amalgam/src/Features/Visuals/Glow/Glow.cpp
+++ b/Amalgam/src/Features/Visuals/Glow/Glow.cpp
@@ -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())
diff --git a/Amalgam/src/Features/Visuals/PlayerConditions/PlayerConditions.cpp b/Amalgam/src/Features/Visuals/PlayerConditions/PlayerConditions.cpp
index e5216ab9..8e96d22e 100644
--- a/Amalgam/src/Features/Visuals/PlayerConditions/PlayerConditions.cpp
+++ b/Amalgam/src/Features/Visuals/PlayerConditions/PlayerConditions.cpp
@@ -374,12 +374,12 @@ void CPlayerConditions::Draw(CTFPlayer* pLocal)
align = ALIGN_TOPRIGHT;
}
- std::vector conditionsVec = Get(pLocal);
+ std::vector 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;
}
}
\ No newline at end of file
diff --git a/Amalgam/src/Features/Visuals/SpectatorList/SpectatorList.cpp b/Amalgam/src/Features/Visuals/SpectatorList/SpectatorList.cpp
index cfc5f9c5..dbfafc4a 100644
--- a/Amalgam/src/Features/Visuals/SpectatorList/SpectatorList.cpp
+++ b/Amalgam/src/Features/Visuals/SpectatorList/SpectatorList.cpp
@@ -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());
}
}
diff --git a/Amalgam/src/Features/Visuals/Visuals.cpp b/Amalgam/src/Features/Visuals/Visuals.cpp
index 46e440a6..8b2f0b6f 100644
--- a/Amalgam/src/Features/Visuals/Visuals.cpp
+++ b/Amalgam/src/Features/Visuals/Visuals.cpp
@@ -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 SplashTrace(Vec3 vOrigin, float flRadius, Vec3 vNormal = { 0, 0, 1 }, bool bTrace = true, int iSegments = 32)
+static std::deque 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;
diff --git a/Amalgam/src/Hooks/CAttributeManager_AttribHookValue.cpp b/Amalgam/src/Hooks/CAttributeManager_AttribHookValue.cpp
index f6f8ee64..b0c9de07 100644
--- a/Amalgam/src/Hooks/CAttributeManager_AttribHookValue.cpp
+++ b/Amalgam/src/Hooks/CAttributeManager_AttribHookValue.cpp
@@ -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;
}
diff --git a/Amalgam/src/Hooks/CBaseAnimating_FrameAdvance.cpp b/Amalgam/src/Hooks/CBaseAnimating_FrameAdvance.cpp
index 687e3095..96c1b6c1 100644
--- a/Amalgam/src/Hooks/CBaseAnimating_FrameAdvance.cpp
+++ b/Amalgam/src/Hooks/CBaseAnimating_FrameAdvance.cpp
@@ -2,7 +2,7 @@
// don't really see any benefit to keeping this
-std::unordered_map> pAnimatingInfo;
+static std::unordered_map> pAnimatingInfo;
MAKE_HOOK(CBaseAnimating_FrameAdvance, S::CBaseAnimating_FrameAdvance(), float, __fastcall,
void* rcx, float flInterval)
diff --git a/Amalgam/src/Hooks/CPrediction_RunCommand.cpp b/Amalgam/src/Hooks/CPrediction_RunCommand.cpp
index fabc6c7e..aa360623 100644
--- a/Amalgam/src/Hooks/CPrediction_RunCommand.cpp
+++ b/Amalgam/src/Hooks/CPrediction_RunCommand.cpp
@@ -2,7 +2,7 @@
#include "../Features/EnginePrediction/EnginePrediction.h"
-std::vector vAngles;
+static std::vector vAngles;
MAKE_HOOK(CPrediction_RunCommand, U::Memory.GetVFunc(I::Prediction, 17), void, __fastcall,
void* rcx, CTFPlayer* pPlayer, CUserCmd* pCmd, IMoveHelper* pMoveHelper)
diff --git a/Amalgam/src/Hooks/CTFClientScoreBoardDialog_UpdatePlayerAvatar.cpp b/Amalgam/src/Hooks/CTFClientScoreBoardDialog_UpdatePlayerAvatar.cpp
index df8139f8..50ffad75 100644
--- a/Amalgam/src/Hooks/CTFClientScoreBoardDialog_UpdatePlayerAvatar.cpp
+++ b/Amalgam/src/Hooks/CTFClientScoreBoardDialog_UpdatePlayerAvatar.cpp
@@ -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)
diff --git a/Amalgam/src/Hooks/CTFPlayerPanel_GetTeam.cpp b/Amalgam/src/Hooks/CTFPlayerPanel_GetTeam.cpp
index 1e5910ee..fd35c644 100644
--- a/Amalgam/src/Hooks/CTFPlayerPanel_GetTeam.cpp
+++ b/Amalgam/src/Hooks/CTFPlayerPanel_GetTeam.cpp
@@ -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)
diff --git a/Amalgam/src/Hooks/CTFGameRules_AllowThirdPersonCamera.cpp b/Amalgam/src/Hooks/CThirdPersonManager_Update.cpp
similarity index 100%
rename from Amalgam/src/Hooks/CTFGameRules_AllowThirdPersonCamera.cpp
rename to Amalgam/src/Hooks/CThirdPersonManager_Update.cpp
diff --git a/Amalgam/src/Hooks/IEngineVGui_Paint.cpp b/Amalgam/src/Hooks/IEngineVGui_Paint.cpp
index 709dcd49..78ac3039 100644
--- a/Amalgam/src/Hooks/IEngineVGui_Paint.cpp
+++ b/Amalgam/src/Hooks/IEngineVGui_Paint.cpp
@@ -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();
diff --git a/Amalgam/src/Hooks/ISteamNetworkingUtils_GetPingToDataCenter.cpp b/Amalgam/src/Hooks/ISteamNetworkingUtils_GetPingToDataCenter.cpp
index 66ad8847..aa970c8a 100644
--- a/Amalgam/src/Hooks/ISteamNetworkingUtils_GetPingToDataCenter.cpp
+++ b/Amalgam/src/Hooks/ISteamNetworkingUtils_GetPingToDataCenter.cpp
@@ -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(popID >> 16);
out[1] = static_cast(popID >> 8);
diff --git a/Amalgam/src/Hooks/IVModelRender_DrawModelExecute.cpp b/Amalgam/src/Hooks/IVModelRender_DrawModelExecute.cpp
index 7a57a370..eebb7044 100644
--- a/Amalgam/src/Hooks/IVModelRender_DrawModelExecute.cpp
+++ b/Amalgam/src/Hooks/IVModelRender_DrawModelExecute.cpp
@@ -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)
diff --git a/Amalgam/src/Hooks/RecvProxy_SimulationTime.cpp b/Amalgam/src/Hooks/RecvProxy_SimulationTime.cpp
index 58406fe4..6574f39f 100644
--- a/Amalgam/src/Hooks/RecvProxy_SimulationTime.cpp
+++ b/Amalgam/src/Hooks/RecvProxy_SimulationTime.cpp
@@ -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);