misc fixes

This commit is contained in:
rei-2 committed 2025-10-31 22:05:23 -04:00
1 parent f35919cca7
commit 79b012d413
7 files changed
+45 -26

No files matched your search

@@ -654,7 +654,7 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& tTarget, std::
return false;
bErase = tPoint.m_tSolution.m_iCalculated == CalculatedEnum::Good;
if (!bErase || !m_tInfo.m_flPrimeTime && int(tPoint.m_tSolution.m_flTime / TICK_INTERVAL) + 1 != iSimTime)
if (!bErase /*|| !m_tInfo.m_flPrimeTime && int(tPoint.m_tSolution.m_flTime / TICK_INTERVAL) + 1 != iSimTime*/)
return false;
vPointDistances.emplace_back(tPoint, tPoint.m_vPoint.DistTo(tTarget.m_vPos));
@@ -788,7 +788,7 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPointsSimple(Target_t& tTarget,
CalculateAngle(m_tInfo.m_vLocalEye, tPoint.m_vPoint, iSimTime, tPoint.m_tSolution);
bErase = tPoint.m_tSolution.m_iCalculated == CalculatedEnum::Good;
if (!bErase || !m_tInfo.m_flPrimeTime && int(tPoint.m_tSolution.m_flTime / TICK_INTERVAL) + 1 != iSimTime)
if (!bErase /*|| !m_tInfo.m_flPrimeTime && int(tPoint.m_tSolution.m_flTime / TICK_INTERVAL) + 1 != iSimTime*/)
return false;
vPointDistances.emplace_back(tPoint, tPoint.m_vPoint.DistTo(tTarget.m_vPos));
@@ -1169,7 +1169,8 @@ bool CAimbotProjectile::TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, Tar
F::ProjSim.SetupTrace(filter, nMask, pWeapon);
#ifdef SPLASH_DEBUG5
G::BoxStorage.emplace_back(vPoint, tProjInfo.m_vHull * -1, tProjInfo.m_vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(255, 0, 0), Color_t(0, 0, 0, 0));
Vec3 vHull = tProjInfo.m_vHull.Max(1);
G::BoxStorage.emplace_back(vPoint, vHull * -1, vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(255, 0, 0), Color_t(0, 0, 0, 0));
#endif
if (!tProjInfo.m_flGravity)
@@ -1269,10 +1270,10 @@ bool CAimbotProjectile::TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, Tar
#ifdef SPLASH_DEBUG5
G::BoxStorage.pop_back();
if (bValid)
G::BoxStorage.emplace_back(vPoint, tProjInfo.m_vHull * -1, tProjInfo.m_vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(0, 255, 0), Color_t(0, 0, 0, 0));
G::BoxStorage.emplace_back(vPoint, vHull * -1, vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(0, 255, 0), Color_t(0, 0, 0, 0));
else if (!bTime)
{
G::BoxStorage.emplace_back(vPoint, tProjInfo.m_vHull * -1, tProjInfo.m_vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(255, 0, 255), Color_t(0, 0, 0, 0));
G::BoxStorage.emplace_back(vPoint, vHull * -1, vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(255, 0, 255), Color_t(0, 0, 0, 0));
if (bSplash)
{
G::BoxStorage.emplace_back(trace.endpos, Vec3(-1, -1, -1), Vec3(1, 1, 1), Vec3(), I::GlobalVars->curtime + 5.f, Color_t(0, 0, 0), Color_t(0, 0, 0, 0));
@@ -1280,7 +1281,7 @@ bool CAimbotProjectile::TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, Tar
}
}
else
G::BoxStorage.emplace_back(vPoint, tProjInfo.m_vHull * -1, tProjInfo.m_vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(0, 0, 255), Color_t(0, 0, 0, 0));
G::BoxStorage.emplace_back(vPoint, vHull * -1, vHull, Vec3(), I::GlobalVars->curtime + 5.f, Color_t(0, 0, 255), Color_t(0, 0, 0, 0));
#endif
if (bValid)
@@ -3,7 +3,7 @@
MAKE_SIGNATURE(CBasePlayer_CalcViewModelView, "client.dll", "48 89 74 24 ? 55 41 56 41 57 48 8D AC 24", 0x0);
MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), void,
void* rcx, CBaseEntity* pOwner, const Vec3& vEyePosition, Vec3& vEyeAngles)
void* rcx, CBaseEntity* pOwner, Vec3& vEyePosition, Vec3& vEyeAngles)
{
#ifdef DEBUG_HOOKS
if (!Vars::Hooks::CBasePlayer_CalcViewModelView[DEFAULT_BIND])
@@ -17,14 +17,7 @@ MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), voi
|| Vars::Visuals::UI::CleanScreenshots.Value && I::EngineClient->IsTakingScreenshot())
return CALL_ORIGINAL(rcx, pOwner, vEyePosition, vEyeAngles);
bool bFlip = false;
{
static auto cl_flipviewmodels = U::ConVars.FindVar("cl_flipviewmodels");
if (cl_flipviewmodels->GetBool())
bFlip = !bFlip;
if (G::FlipViewmodels)
bFlip = !bFlip;
}
bool bFlip = G::FlipViewmodels;
if (Vars::Visuals::Viewmodel::ViewmodelAim.Value)
{
@@ -38,13 +31,12 @@ MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), voi
}
}
Vec3 vNewEyePosition = vEyePosition;
if (bOffset)
{
Vec3 vForward, vRight, vUp; Math::AngleVectors(vEyeAngles, &vForward, &vRight, &vUp);
vNewEyePosition += vForward * vOffset.y;
vNewEyePosition += vRight * vOffset.x * (bFlip ? -1 : 1);
vNewEyePosition += vUp * vOffset.z;
vEyePosition += vForward * vOffset.y;
vEyePosition += vRight * vOffset.x * (bFlip ? -1 : 1);
vEyePosition += vUp * vOffset.z;
}
if (Vars::Visuals::Viewmodel::Pitch.Value)
vEyeAngles.x += Vars::Visuals::Viewmodel::Pitch.Value;
@@ -53,5 +45,5 @@ MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), voi
if (Vars::Visuals::Viewmodel::Roll.Value)
vEyeAngles.z += Vars::Visuals::Viewmodel::Roll.Value * (bFlip ? -1 : 1);
CALL_ORIGINAL(rcx, pOwner, vNewEyePosition, vEyeAngles);
CALL_ORIGINAL(rcx, pOwner, vEyePosition, vEyeAngles);
}
+27 -1
View File
@@ -256,9 +256,35 @@ MAKE_HOOK(Cbuf_ExecuteCommand, S::Cbuf_ExecuteCommand(), void,
s_sCmdString = std::format("{} {}", sCommand, s_sCmdString).substr(0, COMMAND_MAX_LENGTH - 1);
strncpy_s(args.m_pArgSBuffer, s_sCmdString.c_str(), COMMAND_MAX_LENGTH);
args.m_nArgv0Size = int(strlen(sCommand)) + 1;
break;
}
case FNV1A::Hash32Const("cl_flipviewmodels"):
{ // server does string comparison to "1"
auto pCVar = I::CVar->FindVar(sCommand);
if (!pCVar)
break;
CALL_ORIGINAL(args, source);
try
{
if (pCVar->GetFloat() != float(std::stoi(pCVar->GetString())))
break;
auto sValue = std::format("{}", pCVar->GetInt());
if (FNV1A::Hash32(sValue.c_str()) == FNV1A::Hash32(pCVar->GetString()))
break;
pCVar->SetValue(sValue.c_str());
SDK::Output("Cbuf_ExecuteCommand", std::format("{}: {}, {}, {}", sCommand, pCVar->GetString(), pCVar->GetFloat(), pCVar->GetInt()).c_str());
}
catch (...) {}
return;
}
}
}
CALL_ORIGINAL(args, source);
CALL_ORIGINAL(args, source);
}
+1 -1
View File
@@ -786,7 +786,7 @@ void SDK::WalkTo(CUserCmd* pCmd, CTFPlayer* pLocal, Vec3& vTo, float flScale)
void SDK::GetProjectileFireSetup(CTFPlayer* pPlayer, const Vec3& vAngIn, Vec3 vOffset, Vec3& vPosOut, Vec3& vAngOut, bool bPipes, bool bInterp, bool bAllowFlip)
{
static auto cl_flipviewmodels = U::ConVars.FindVar("cl_flipviewmodels");
if (bAllowFlip && cl_flipviewmodels->GetBool())
if (bAllowFlip && FNV1A::Hash32(cl_flipviewmodels->GetString()) == FNV1A::Hash32Const("1"))
vOffset.y *= -1.f;
const Vec3 vShootPos = bInterp ? pPlayer->GetEyePosition() : pPlayer->GetShootPos();
+2 -2
View File
@@ -360,8 +360,8 @@ namespace Vars
CVar(HuntsmanClamp, "Huntsman clamp", 5.f, NOSAVE | DEBUGVAR | SLIDER_CLAMP | SLIDER_PRECISION, 0.f, 10.f, 0.5f);
CVar(HuntsmanPullPoint, "Huntsman pull point", false, NOSAVE | DEBUGVAR);
CVar(SplashPointsDirect, "Direct splash points", 100, NOSAVE | DEBUGVAR | SLIDER_MIN, 1, 400, 5);
CVar(SplashPointsArc, "Arc splash points", 100, NOSAVE | DEBUGVAR | SLIDER_MIN, 1, 400, 5);
CVar(SplashPointsDirect, "Direct splash points", 100, NOSAVE | DEBUGVAR | SLIDER_MIN, 0, 400, 5);
CVar(SplashPointsArc, "Arc splash points", 100, NOSAVE | DEBUGVAR | SLIDER_MIN, 0, 400, 5);
CVar(SplashCountDirect, "Direct splash count", 100, NOSAVE | DEBUGVAR | SLIDER_MIN, 1, 100);
CVar(SplashCountArc, "Arc splash count", 5, NOSAVE | DEBUGVAR | SLIDER_MIN, 1, 100);
CVar(SplashRotateX, "Splash Rx", -1.f, NOSAVE | DEBUGVAR | SLIDER_MIN | SLIDER_PRECISION, -1.f, 360.f);
+1 -1
View File
@@ -23,7 +23,7 @@ bool Timer::Run(float flS)
return false;
}
inline void Timer::Update()
void Timer::Update()
{
m_flLast = SDK::PlatFloatTime();
}
+1 -1
View File
@@ -9,5 +9,5 @@ public:
Timer();
bool Check(float flS) const;
bool Run(float flS);
inline void Update();
void Update();
};