mirror of
https://github.com/rei-2/Amalgam.git
synced 2026-10-11 17:58:15 +08:00
misc changes and fixes
This commit is contained in:
1 parent
64b2745056
commit
22a61f3863
128 files changed
+1024
-604
No files matched your search
@@ -921,6 +921,7 @@
|
||||
<ClCompile Include="src\Hooks\CL_ReadPackets.cpp" />
|
||||
<ClCompile Include="src\Hooks\CMatchInviteNotification_OnTick.cpp" />
|
||||
<ClCompile Include="src\Hooks\CMaterial_Uncache.cpp" />
|
||||
<ClCompile Include="src\Hooks\IEngineTrace_SetTraceEntity.cpp" />
|
||||
<ClCompile Include="src\Hooks\CNetChannel_SendDatagram.cpp" />
|
||||
<ClCompile Include="src\Hooks\CNetChannel_SendNetMsg.cpp" />
|
||||
<ClCompile Include="src\Hooks\COPRenderSprites_Render.cpp" />
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
<ClCompile Include="src\Hooks\VGuiMenuBuilder_AddMenuItem.cpp" />
|
||||
<ClCompile Include="src\Features\Output\Output.cpp" />
|
||||
<ClCompile Include="src\Hooks\Cbuf_ExecuteCommand.cpp" />
|
||||
<ClCompile Include="src\Hooks\IEngineTrace_SetTraceEntity.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\Utils\UtlVector\UtlVector.h" />
|
||||
|
||||
@@ -301,14 +301,19 @@ static inline std::vector<std::pair<Vec3, int>> ComputeSphere(float flRadius, in
|
||||
std::vector<std::pair<Vec3, int>> vPoints;
|
||||
vPoints.reserve(iSamples);
|
||||
|
||||
float flRotateX = Vars::Aimbot::Projectile::SplashRotateX.Value < 0.f ? SDK::StdRandomFloat(0.f, 360.f) : Vars::Aimbot::Projectile::SplashRotateX.Value;
|
||||
float flRotateY = Vars::Aimbot::Projectile::SplashRotateY.Value < 0.f ? SDK::StdRandomFloat(0.f, 360.f) : Vars::Aimbot::Projectile::SplashRotateY.Value;
|
||||
|
||||
int iPointType = Vars::Aimbot::Projectile::SplashGrates.Value ? PointTypeEnum::Regular | PointTypeEnum::Obscured : PointTypeEnum::Regular;
|
||||
float flRotate = Vars::Aimbot::Projectile::SplashRotate.Value * PI / 180.f;
|
||||
if (Vars::Aimbot::Projectile::RocketSplashMode.Value == Vars::Aimbot::Projectile::RocketSplashModeEnum::SpecialHeavy)
|
||||
iPointType |= PointTypeEnum::Multi1 | PointTypeEnum::Multi2;
|
||||
for (int n = 0; n < iSamples; n++)
|
||||
{
|
||||
float flA = acosf(1.f - 2.f * n / iSamples);
|
||||
float flB = PI * (3.f - sqrtf(5.f)) * n + flRotate;
|
||||
float flB = PI * (3.f - sqrtf(5.f)) * n;
|
||||
|
||||
Vec3 vPoint = Vec3(sinf(flA) * cosf(flB), sinf(flA) * sinf(flB), -cosf(flA));
|
||||
vPoint = Math::RotatePoint(vPoint, {}, { flRotateX, flRotateY });
|
||||
if (flNthroot != 1.f)
|
||||
{
|
||||
vPoint.x = powf(fabsf(vPoint.x), 1 / flNthroot) * sign(vPoint.x);
|
||||
@@ -332,16 +337,24 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& tTarget, std::
|
||||
Vec3 vTargetEye = tTarget.m_vPos + tInfo.m_vTargetEye;
|
||||
|
||||
#if !defined(SPLASH_DEBUG1) && !defined(SPLASH_DEBUG2)
|
||||
auto checkPoint = [&](CGameTrace& trace, bool& bErase, bool& bNormal)
|
||||
auto checkPoint = [&](CGameTrace& trace, bool* pErase = nullptr, bool* pNormal = nullptr)
|
||||
#else
|
||||
auto checkPoint = [&](CGameTrace& trace, bool& bErase, bool& bNormal, Vec3* pFrom = nullptr)
|
||||
auto checkPoint = [&](CGameTrace& trace, bool* pErase = nullptr, bool* pNormal = nullptr, bool bDebug = false)
|
||||
#endif
|
||||
{
|
||||
bErase = trace.fraction == 1.f || !trace.m_pEnt || !trace.m_pEnt->GetAbsVelocity().IsZero() || trace.surface.flags & 0x0004 /*SURF_SKY*/;
|
||||
{
|
||||
bool bErase = false, bNormal = false;
|
||||
|
||||
bErase = trace.fraction == 1.f || !trace.m_pEnt || !trace.m_pEnt->GetAbsVelocity().IsZero() || trace.surface.flags & SURF_SKY;
|
||||
#if defined(SPLASH_DEBUG1) || defined(SPLASH_DEBUG2)
|
||||
if (pFrom && bErase)
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(*pFrom, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::Halloween.Value);
|
||||
if (bDebug && pErase && bErase)
|
||||
{
|
||||
Vec3 vMins = Vec3(-1, -1, -1), vMaxs = Vec3(1, 1, 1);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::Halloween.Value, Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::Halloween.Value);
|
||||
}
|
||||
#endif
|
||||
if (pErase) *pErase = bErase;
|
||||
if (bErase)
|
||||
return false;
|
||||
|
||||
@@ -366,17 +379,23 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& tTarget, std::
|
||||
bNormal = vForward.Dot(trace.plane.normal) >= 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
#if defined(SPLASH_DEBUG1) || defined(SPLASH_DEBUG2)
|
||||
if (pFrom)
|
||||
if (bDebug && pNormal)
|
||||
{
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(*pFrom, trace.endpos), I::GlobalVars->curtime + 60.f, !bNormal ? Vars::Colors::TeamBlu.Value : Vars::Colors::TeamRed.Value);
|
||||
//G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.endpos, trace.endpos - vForward * 10), I::GlobalVars->curtime + 60.f, Vars::Colors::Local.Value);
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, !bNormal ? Vars::Colors::TeamBlu.Value : Vars::Colors::TeamRed.Value, Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, !bNormal ? Vars::Colors::TeamBlu.Value : Vars::Colors::TeamRed.Value);
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
if (pNormal) *pNormal = bNormal;
|
||||
if (bNormal)
|
||||
return false;
|
||||
|
||||
bErase = tPoint.m_Solution.m_iCalculated == 1;
|
||||
if (pErase) *pErase = bErase;
|
||||
if (!bErase || !tInfo.m_flPrimeTime && int(tPoint.m_Solution.m_flTime / TICK_INTERVAL) + 1 != iSimTime)
|
||||
return false;
|
||||
|
||||
@@ -405,10 +424,17 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& tTarget, std::
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash regular"]++;
|
||||
#endif
|
||||
|
||||
#ifndef SPLASH_DEBUG1
|
||||
checkPoint(trace, bErase, bNormal);
|
||||
checkPoint(trace, &bErase, &bNormal);
|
||||
#else
|
||||
checkPoint(trace, bErase, bNormal, &vTargetEye);
|
||||
checkPoint(trace, &bErase, &bNormal, true);
|
||||
{
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::Local.Value.Alpha(Vars::Colors::Local.Value.a / (bNormal ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::Local.Value.Alpha(Vars::Colors::Local.Value.a / (bNormal ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bErase)
|
||||
@@ -416,11 +442,12 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& tTarget, std::
|
||||
else if (bNormal)
|
||||
iType &= ~PointTypeEnum::Regular;
|
||||
else
|
||||
iType &= ~PointTypeEnum::Obscured;
|
||||
iType &= ~(PointTypeEnum::Obscured | PointTypeEnum::Multi1);
|
||||
}
|
||||
if (iType & PointTypeEnum::Obscured)
|
||||
{
|
||||
bool bErase = false, bNormal = false;
|
||||
size_t iOriginalSize = vPointDistances.size();
|
||||
|
||||
switch (tInfo.m_iSplashMode)
|
||||
{
|
||||
@@ -433,106 +460,179 @@ std::vector<Point_t> CAimbotProjectile::GetSplashPoints(Target_t& tTarget, std::
|
||||
#endif
|
||||
bNormal = trace.DidHit();
|
||||
#ifdef SPLASH_DEBUG2
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(vPoint, trace.endpos), I::GlobalVars->curtime + 60.f, bNormal ? Vars::Colors::IndicatorGood.Value : Vars::Colors::IndicatorBad.Value);
|
||||
#endif
|
||||
if (!bNormal)
|
||||
{
|
||||
SDK::TraceHull(vPoint, vTargetEye, tInfo.m_vHull * -1, tInfo.m_vHull, MASK_SOLID, &filter, &trace);
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorGood.Value.Alpha(Vars::Colors::IndicatorGood.Value.a / (bNormal ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorGood.Value.Alpha(Vars::Colors::IndicatorGood.Value.a / (bNormal ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
if (bNormal)
|
||||
break;
|
||||
|
||||
SDK::TraceHull(vPoint, vTargetEye, tInfo.m_vHull * -1, tInfo.m_vHull, MASK_SOLID, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash grate"]++;
|
||||
mTraceCount["Splash grate"]++;
|
||||
#endif
|
||||
#ifndef SPLASH_DEBUG2
|
||||
checkPoint(trace, bErase, bNormal);
|
||||
checkPoint(trace, &bErase, &bNormal);
|
||||
#else
|
||||
checkPoint(trace, bErase, bNormal, &vPoint);
|
||||
checkPoint(trace, &bErase, &bNormal, true);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
// currently experimental, there may be a more efficient way to do this?
|
||||
case Vars::Aimbot::Projectile::RocketSplashModeEnum::SpecialLight:
|
||||
case Vars::Aimbot::Projectile::RocketSplashModeEnum::SpecialHeavy:
|
||||
{
|
||||
SDK::Trace(vPoint, vTargetEye, MASK_SOLID, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket"]++;
|
||||
#endif
|
||||
bNormal = trace.fraction == 1.f /*|| trace.startsolid*/;
|
||||
if (!bNormal)
|
||||
bNormal = trace.fraction == 1.f;
|
||||
#ifdef SPLASH_DEBUG2
|
||||
{
|
||||
#ifndef SPLASH_DEBUG2
|
||||
if (checkPoint(trace, bErase, bNormal))
|
||||
#else
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(vPoint, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorBad.Value);
|
||||
if (checkPoint(trace, bErase, bNormal, &vPoint))
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorMid.Value.Alpha(Vars::Colors::IndicatorMid.Value.a / (bNormal ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorMid.Value.Alpha(Vars::Colors::IndicatorMid.Value.a / (bNormal ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
{
|
||||
SDK::Trace(trace.endpos + trace.plane.normal, vTargetEye, MASK_SHOT, &filter, &trace);
|
||||
if (bNormal)
|
||||
break;
|
||||
|
||||
if (iType & PointTypeEnum::Multi2 && trace.surface.flags & SURF_NODRAW)
|
||||
{
|
||||
CGameTrace trace2 = {};
|
||||
SDK::Trace(trace.endpos - trace.plane.normal, vTargetEye, MASK_SOLID | CONTENTS_NOSTARTSOLID, &filter, &trace2);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket check"]++;
|
||||
mTraceCount["Splash rocket (2)"]++;
|
||||
#endif
|
||||
if (trace.fraction < 1.f)
|
||||
vPointDistances.pop_back();
|
||||
bool bNormal2 = trace2.fraction == 1.f || (trace.endpos - trace.plane.normal - trace.endpos).IsZero();
|
||||
#ifdef SPLASH_DEBUG2
|
||||
{
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace2.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace2.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorBad.Value.Alpha(Vars::Colors::IndicatorBad.Value.a / (bNormal ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace2.startpos, trace2.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorBad.Value.Alpha(Vars::Colors::IndicatorBad.Value.a / (bNormal ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
if (!bNormal2)
|
||||
trace = trace2;
|
||||
else
|
||||
iType &= ~PointTypeEnum::Multi2;
|
||||
}
|
||||
|
||||
#ifndef SPLASH_DEBUG2
|
||||
if (checkPoint(trace, &bErase, &bNormal))
|
||||
#else
|
||||
if (checkPoint(trace, &bErase, &bNormal, true))
|
||||
#endif
|
||||
{
|
||||
SDK::Trace(trace.endpos + trace.plane.normal, vTargetEye, MASK_SHOT, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket check"]++;
|
||||
#endif
|
||||
#ifdef SPLASH_DEBUG2
|
||||
{
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorMisc.Value.Alpha(Vars::Colors::IndicatorMisc.Value.a / (trace.fraction < 1.f ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorMisc.Value.Alpha(Vars::Colors::IndicatorMisc.Value.a / (trace.fraction < 1.f ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
if (trace.fraction < 1.f)
|
||||
vPointDistances.pop_back();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (vPointDistances.size() != iOriginalSize)
|
||||
iType = 0;
|
||||
else if (bErase || bNormal)
|
||||
iType &= ~PointTypeEnum::Obscured;
|
||||
else
|
||||
iType &= ~PointTypeEnum::Regular;
|
||||
}
|
||||
if (iType & PointTypeEnum::Multi1)
|
||||
{
|
||||
bool bErase = false, bNormal = false;
|
||||
size_t iOriginalSize = vPointDistances.size();
|
||||
|
||||
switch (tInfo.m_iSplashMode)
|
||||
{
|
||||
case Vars::Aimbot::Projectile::RocketSplashModeEnum::SpecialHeavy:
|
||||
{
|
||||
SDK::Trace(vTargetEye, vPoint, MASK_SOLID, &filter, &trace);
|
||||
SDK::TraceHull(vTargetEye, vPoint, tInfo.m_vHull * -1, tInfo.m_vHull, MASK_SOLID, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket"]++;
|
||||
mTraceCount["Splash rocket (3)"]++;
|
||||
#endif
|
||||
bErase = trace.fraction == 1.f /*|| trace.startsolid*/;
|
||||
if (!bNormal)
|
||||
bNormal = trace.fraction == 1.f;
|
||||
#ifdef SPLASH_DEBUG2
|
||||
{
|
||||
std::vector<std::tuple<Vec3, Vec3, bool>> vPoints = { { trace.endpos + (vPoint - trace.endpos).Normalized(), vPoint, false }, { vPoint, vTargetEye, true } };
|
||||
for (auto& [vFrom, vTo, bErases] : vPoints)
|
||||
{
|
||||
bool bAdded = false;
|
||||
|
||||
SDK::Trace(vFrom, vTo, MASK_SOLID, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket (2)"]++;
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorTextMid.Value.Alpha(Vars::Colors::IndicatorTextMid.Value.a / (bNormal ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorTextMid.Value.Alpha(Vars::Colors::IndicatorTextMid.Value.a / (bNormal ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
if (trace.fraction < 1.f)
|
||||
{
|
||||
if (bNormal)
|
||||
break;
|
||||
|
||||
SDK::TraceHull(trace.endpos - trace.plane.normal, vPoint, tInfo.m_vHull * -1, tInfo.m_vHull, MASK_SOLID | CONTENTS_NOSTARTSOLID, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket (4)"]++;
|
||||
#endif
|
||||
bNormal = trace.fraction == 1.f || (trace.startpos - trace.endpos).IsZero() || trace.allsolid;
|
||||
#ifdef SPLASH_DEBUG2
|
||||
{
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorTextBad.Value.Alpha(Vars::Colors::IndicatorTextBad.Value.a / (bNormal ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorTextBad.Value.Alpha(Vars::Colors::IndicatorTextBad.Value.a / (bNormal ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
if (bNormal)
|
||||
break;
|
||||
|
||||
#ifndef SPLASH_DEBUG2
|
||||
if (checkPoint(trace, bErase, bNormal))
|
||||
if (checkPoint(trace, &bErase, &bNormal))
|
||||
#else
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(vFrom, trace.endpos), I::GlobalVars->curtime + 60.f, bErases ? Vars::Colors::IndicatorBad.Value : Vars::Colors::IndicatorGood.Value);
|
||||
if (checkPoint(trace, bErase, bNormal, &vPoint))
|
||||
if (checkPoint(trace, &bErase, &bNormal, &vPoint))
|
||||
#endif
|
||||
{
|
||||
SDK::Trace(trace.endpos + trace.plane.normal, vTargetEye, MASK_SHOT, &filter, &trace);
|
||||
{
|
||||
SDK::Trace(trace.endpos + trace.plane.normal, vTargetEye, MASK_SHOT, &filter, &trace);
|
||||
#ifdef SPLASH_DEBUG5
|
||||
mTraceCount["Splash rocket check"]++;
|
||||
mTraceCount["Splash rocket check (2)"]++;
|
||||
#endif
|
||||
bAdded = trace.fraction == 1.f;
|
||||
if (!bAdded)
|
||||
vPointDistances.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
if (!bErases && !bAdded)
|
||||
bErase = bNormal = false;
|
||||
if (bErase || bNormal)
|
||||
break;
|
||||
#ifdef SPLASH_DEBUG2
|
||||
{
|
||||
Vec3 vMins = Vec3(-1, -1, -1) * (bNormal ? 0.5f : 1.f), vMaxs = Vec3(1, 1, 1) * (bNormal ? 0.5f : 1.f);
|
||||
Vec3 vAngles; Math::VectorAngles(trace.plane.normal, vAngles);
|
||||
G::BoxStorage.emplace_back(trace.endpos, vMins, vMaxs, vAngles, I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorTextMisc.Value.Alpha(Vars::Colors::IndicatorTextMisc.Value.a / (trace.fraction < 1.f ? 10 : 1)), Color_t(0, 0, 0, 0));
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Vars::Colors::IndicatorTextMisc.Value.Alpha(Vars::Colors::IndicatorTextMisc.Value.a / (trace.fraction < 1.f ? 10 : 1)));
|
||||
}
|
||||
#endif
|
||||
if (trace.fraction < 1.f)
|
||||
vPointDistances.pop_back();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
iType &= ~PointTypeEnum::Multi1;
|
||||
}
|
||||
|
||||
if (bErase)
|
||||
if (vPointDistances.size() != iOriginalSize)
|
||||
iType = 0;
|
||||
else if (bNormal)
|
||||
iType &= ~PointTypeEnum::Obscured;
|
||||
if (bErase || bNormal)
|
||||
iType &= ~PointTypeEnum::Multi1;
|
||||
else
|
||||
iType &= ~PointTypeEnum::Regular;
|
||||
}
|
||||
}
|
||||
|
||||
if (!iType)
|
||||
if (!(iType & ~(PointTypeEnum::Multi1 | PointTypeEnum::Multi2)))
|
||||
it = vSpherePoints.erase(it);
|
||||
else
|
||||
++it;
|
||||
@@ -1545,7 +1645,7 @@ bool CAimbotProjectile::RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
|
||||
#if defined(SPLASH_DEBUG1) || defined(SPLASH_DEBUG2) || defined(SPLASH_DEBUG4)
|
||||
G::LineStorage.clear();
|
||||
#endif
|
||||
#if defined(SPLASH_DEBUG3) || defined(SPLASH_DEBUG4)
|
||||
#if defined(SPLASH_DEBUG1) || defined(SPLASH_DEBUG2) || defined(SPLASH_DEBUG3) || defined(SPLASH_DEBUG4)
|
||||
G::BoxStorage.clear();
|
||||
#endif
|
||||
for (auto& tTarget : vTargets)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "../AimbotGlobal/AimbotGlobal.h"
|
||||
|
||||
Enum(PointType, None = 0, Regular = 1 << 0, Obscured = 1 << 1)
|
||||
Enum(PointType, None = 0, Regular = 1 << 0, Obscured = 1 << 1, Multi1 = 1 << 2, Multi2 = 1 << 3)
|
||||
|
||||
struct Solution_t
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@ void CBinds::AddBind(int iBind, Bind_t& tBind)
|
||||
m_vBinds[iBind] = tBind;
|
||||
}
|
||||
|
||||
#define HasType(type, bind) IsType(type) && var->As<type>()->Map.find(bind) != var->As<type>()->Map.end()
|
||||
#define HasType(type, bind) IsType(type) && var->As<type>()->contains(bind)
|
||||
|
||||
#define RemoveType(type, bind)\
|
||||
{\
|
||||
|
||||
@@ -469,7 +469,7 @@ bool CConfigs::LoadConfig(const std::string& sConfigName, bool bNotify)
|
||||
}
|
||||
}
|
||||
|
||||
H::Fonts.Reload(Vars::Menu::Scale.Map[DEFAULT_BIND]);
|
||||
H::Fonts.Reload(Vars::Menu::Scale[DEFAULT_BIND]);
|
||||
|
||||
m_sCurrentConfig = sConfigName; m_sCurrentVisuals = "";
|
||||
if (bNotify)
|
||||
|
||||
@@ -204,7 +204,7 @@ void CCritHack::GetTotalCrits(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
|
||||
void CCritHack::CanFireCritical(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
|
||||
{
|
||||
m_bCritBanned = false;
|
||||
m_iDamageTilUnban = 0;
|
||||
m_flDamageTilFlip = 0;
|
||||
|
||||
if (pWeapon->GetSlot() == SLOT_MELEE)
|
||||
m_flCritChance = TF_DAMAGE_CRIT_CHANCE_MELEE * pLocal->GetCritMult();
|
||||
@@ -218,14 +218,18 @@ void CCritHack::CanFireCritical(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
|
||||
m_flCritChance = TF_DAMAGE_CRIT_CHANCE * pLocal->GetCritMult();
|
||||
m_flCritChance = SDK::AttribHookValue(m_flCritChance, "mult_crit_chance", pWeapon);
|
||||
|
||||
if (!m_iAllDamage || !m_iCritDamage || pWeapon->GetSlot() == SLOT_MELEE)
|
||||
return;
|
||||
|
||||
const float flNormalizedDamage = m_iCritDamage / TF_DAMAGE_CRIT_MULTIPLIER;
|
||||
const float flObservedCritChance = flNormalizedDamage / (flNormalizedDamage + m_iAllDamage - m_iCritDamage);
|
||||
float flCritChance = m_flCritChance + 0.1f;
|
||||
if (m_bCritBanned = flObservedCritChance > flCritChance)
|
||||
m_iDamageTilUnban = flNormalizedDamage / flCritChance + m_iCritDamage - flNormalizedDamage - m_iAllDamage;
|
||||
if (m_iAllDamage && m_iCritDamage)
|
||||
{
|
||||
const float flObservedCritChance = flNormalizedDamage / (flNormalizedDamage + m_iAllDamage - m_iCritDamage);
|
||||
m_bCritBanned = flObservedCritChance > flCritChance;
|
||||
}
|
||||
|
||||
if (m_bCritBanned)
|
||||
m_flDamageTilFlip = flNormalizedDamage / flCritChance + flNormalizedDamage * 2 - m_iAllDamage;
|
||||
else
|
||||
m_flDamageTilFlip = 3 * (flNormalizedDamage - flCritChance * (flNormalizedDamage + m_iAllDamage - m_iCritDamage)) / (flCritChance - 1);
|
||||
}
|
||||
|
||||
bool CCritHack::WeaponCanCrit(CTFWeaponBase* pWeapon, bool bWeaponOnly)
|
||||
@@ -301,7 +305,7 @@ void CCritHack::Reset()
|
||||
m_iAllDamage = 0;
|
||||
|
||||
m_bCritBanned = false;
|
||||
m_iDamageTilUnban = 0;
|
||||
m_flDamageTilFlip = 0;
|
||||
m_flCritChance = 0.f;
|
||||
|
||||
m_mHealthStorage.clear();
|
||||
@@ -577,7 +581,7 @@ void CCritHack::Draw(CTFPlayer* pLocal)
|
||||
}
|
||||
}
|
||||
else
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Colors::IndicatorTextBad.Value, Vars::Menu::Theme::Background.Value, align, std::format("Deal {} damage", m_iDamageTilUnban).c_str());
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Colors::IndicatorTextBad.Value, Vars::Menu::Theme::Background.Value, align, std::format("Deal {} damage", ceilf(m_flDamageTilFlip)).c_str());
|
||||
|
||||
int iCrits = tStorage.m_iAvailableCrits;
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("{}{} / {} potential crits", iCrits, iCrits == 1000 ? "+" : "", tStorage.m_iPotentialCrits).c_str());
|
||||
@@ -587,6 +591,9 @@ void CCritHack::Draw(CTFPlayer* pLocal)
|
||||
int iShots = tStorage.m_iNextCrit;
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Next in {}{} shot{}", iShots, iShots == 1000 ? "+" : "", iShots == 1 ? "" : "s").c_str());
|
||||
}
|
||||
|
||||
if (!m_bCritBanned && iSlot != SLOT_MELEE && m_flDamageTilFlip)
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Colors::IndicatorTextGood.Value, Vars::Menu::Theme::Background.Value, align, std::format("{} damage", floor(m_flDamageTilFlip)).c_str());
|
||||
}
|
||||
else
|
||||
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Calculating");
|
||||
|
||||
@@ -44,7 +44,7 @@ private:
|
||||
std::unordered_map<int, int> m_mHealthStorage = {};
|
||||
|
||||
bool m_bCritBanned = false;
|
||||
int m_iDamageTilUnban = 0;
|
||||
float m_flDamageTilFlip = 0;
|
||||
float m_flCritChance = 0.f;
|
||||
int m_iWishRandomSeed = 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Generated by https://github.com/juliettef/IconFontCppHeaders script GenerateIconFontCppHeaders.py for languages C and C++
|
||||
// from https://github.com/google/material-design-icons/raw/master/font/MaterialIcons-Regular.codepoints
|
||||
// for use with https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.ttf
|
||||
// Generated by https://github.com/juliettef/IconFontCppHeaders script GenerateIconFontCppHeaders.py
|
||||
// for C and C++
|
||||
// from codepoints https://github.com/google/material-design-icons/raw/master/font/MaterialIcons-Regular.codepoints
|
||||
// for use with font https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.ttf
|
||||
|
||||
#pragma once
|
||||
|
||||
#define FONT_ICON_FILE_NAME_MD "MaterialIcons-Regular.ttf"
|
||||
@@ -8,6 +10,7 @@
|
||||
#define ICON_MIN_MD 0xe000
|
||||
#define ICON_MAX_16_MD 0xf8ff
|
||||
#define ICON_MAX_MD 0x10fffd
|
||||
|
||||
#define ICON_MD_10K "\xee\xa5\x91" // U+e951
|
||||
#define ICON_MD_10MP "\xee\xa5\x92" // U+e952
|
||||
#define ICON_MD_11MP "\xee\xa5\x93" // U+e953
|
||||
|
||||
@@ -142,11 +142,14 @@ namespace ImGui
|
||||
vDisabled.pop_back();
|
||||
Disabled = !vDisabled.empty() ? vDisabled.back() : false;
|
||||
}
|
||||
inline void PushTransparent(bool bTransparent)
|
||||
inline void PushTransparent(bool bTransparent, bool bPushAlpha = false)
|
||||
{
|
||||
vTransparent.push_back(Transparent = bTransparent);
|
||||
|
||||
if (bPushAlpha)
|
||||
PushStyleVar(ImGuiStyleVar_Alpha, !bTransparent ? 1.f : 0.5f);
|
||||
}
|
||||
inline void PopTransparent(int count = 1)
|
||||
inline void PopTransparent(int count = 1, int iPopAlpha = false)
|
||||
{
|
||||
int iSize = int(vTransparent.size());
|
||||
if (iSize < count)
|
||||
@@ -157,6 +160,9 @@ namespace ImGui
|
||||
for (int i = 0; i < count; i++)
|
||||
vTransparent.pop_back();
|
||||
Transparent = !vTransparent.empty() ? vTransparent.back() : false;
|
||||
|
||||
if (iPopAlpha)
|
||||
PopStyleVar(iPopAlpha);
|
||||
}
|
||||
|
||||
inline float fnmodf(float flX, float flY)
|
||||
@@ -1907,18 +1913,22 @@ namespace ImGui
|
||||
SetCursorPos(vOriginalPos);
|
||||
}
|
||||
|
||||
PushStyleVar(ImGuiStyleVar_Alpha, 1.f);
|
||||
PushStyleVar(ImGuiStyleVar_FramePadding, { H::Draw.Scale(2), H::Draw.Scale(2) });
|
||||
PushStyleVar(ImGuiStyleVar_ItemSpacing, { 0, H::Draw.Scale(4) });
|
||||
PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, { H::Draw.Scale(4), 0 });
|
||||
PushStyleColor(ImGuiCol_PopupBg, F::Render.Background0p5.Value);
|
||||
|
||||
ImVec4 tempColor = ColorToVec(*tColor);
|
||||
bool bReturn = ColorEdit4(std::format("##{}", sLabel).c_str(), &tempColor.x, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_NoBorder | ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_AlphaBar | ImGuiColorEditFlags_LargeAlphaGrid, vSize);
|
||||
if (bReturn)
|
||||
*tColor = VecToColor(tempColor);
|
||||
PopStyleColor();
|
||||
PopStyleVar(3);
|
||||
if (!Disabled && IsItemHovered())
|
||||
SetMouseCursor(ImGuiMouseCursor_Hand);
|
||||
|
||||
PopStyleColor();
|
||||
PopStyleVar(4);
|
||||
|
||||
if (bTooltip)
|
||||
FTooltip(sLabel);
|
||||
|
||||
@@ -2341,7 +2351,7 @@ namespace ImGui
|
||||
int iParent = CurrentBind;
|
||||
while (true)
|
||||
{
|
||||
if (iParent == DEFAULT_BIND || var.Map.contains(iParent))
|
||||
if (iParent == DEFAULT_BIND || var.contains(iParent))
|
||||
break;
|
||||
iParent = F::Binds.GetParent(iParent);
|
||||
}
|
||||
@@ -2355,10 +2365,10 @@ namespace ImGui
|
||||
while (true)
|
||||
{
|
||||
iParent = F::Binds.GetParent(iParent);
|
||||
if (iParent == DEFAULT_BIND || var.Map.contains(iParent))
|
||||
if (iParent == DEFAULT_BIND || var.contains(iParent))
|
||||
break;
|
||||
}
|
||||
return var.Map[iParent];
|
||||
return var[iParent];
|
||||
}
|
||||
|
||||
bool bPushedDisabled = false, bPushedTransparent = false;
|
||||
@@ -2373,7 +2383,7 @@ namespace ImGui
|
||||
|
||||
if (CurrentBind == DEFAULT_BIND)
|
||||
{
|
||||
if (Vars::Menu::MenuShowsBinds.Value && var.Map[DEFAULT_BIND] != var.Value)
|
||||
if (Vars::Menu::MenuShowsBinds.Value && var[DEFAULT_BIND] != var.Value)
|
||||
{
|
||||
for (auto& [_iBind, tVal] : var.Map)
|
||||
{
|
||||
@@ -2395,7 +2405,7 @@ namespace ImGui
|
||||
bPushedTransparent = true;
|
||||
}
|
||||
}
|
||||
return var.Map[iBind];
|
||||
return var[iBind];
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -2407,7 +2417,7 @@ namespace ImGui
|
||||
auto tVal = GetParentValue(var, iBind);
|
||||
|
||||
if (tVal != val)
|
||||
var.Map[iBind] = val;
|
||||
var[iBind] = val;
|
||||
else if (iBind != DEFAULT_BIND)
|
||||
{
|
||||
for (auto it = var.Map.begin(); it != var.Map.end();)
|
||||
@@ -2467,8 +2477,8 @@ namespace ImGui
|
||||
tBind = F::Binds.m_vBinds[iBind];
|
||||
else
|
||||
tBind = { sBind };
|
||||
if (var.Map.contains(iBind))
|
||||
val = var.Map[iBind];
|
||||
if (var.contains(iBind))
|
||||
val = var[iBind];
|
||||
}
|
||||
bool bClickedNew = iBind == DEFAULT_BIND && bLastHovered && IsMouseDown(ImGuiMouseButton_Left);
|
||||
if (iModified != -2 || bClickedNew)
|
||||
@@ -2528,7 +2538,7 @@ namespace ImGui
|
||||
|
||||
if (!Disabled && iBind != DEFAULT_BIND && iBind < F::Binds.m_vBinds.size())
|
||||
{
|
||||
var.Map[iBind] = val;
|
||||
var[iBind] = val;
|
||||
|
||||
// don't completely override to retain misc info
|
||||
auto& _tBind = F::Binds.m_vBinds[iBind];
|
||||
|
||||
@@ -268,8 +268,9 @@ void CMenu::MenuAimbot(int iTab)
|
||||
|
||||
FSlider("Splash points", Vars::Aimbot::Projectile::SplashPoints, 1, 400, 5, "%i", FSlider_Left | FSlider_Min);
|
||||
FToggle("Splash grates", Vars::Aimbot::Projectile::SplashGrates, FToggle_Right);
|
||||
FSlider("Splash Nth root", Vars::Aimbot::Projectile::SplashNthRoot, 0.5f, 2.f, 0.1f, "%g", FSlider_Left | FSlider_Min);
|
||||
FSlider("Splash rotate", Vars::Aimbot::Projectile::SplashRotate, 0.f, 360.f, 1.f, "%g%%", FSlider_Right | FSlider_Min);
|
||||
FSlider("Splash Rx", Vars::Aimbot::Projectile::SplashRotateX, -1.f, 360.f, 1.f, Vars::Aimbot::Projectile::SplashRotateX[DEFAULT_BIND] < 0.f ? "random" : "%g", FSlider_Left | FSlider_Min);
|
||||
FSlider("Splash Ry", Vars::Aimbot::Projectile::SplashRotateY, -1.f, 360.f, 1.f, Vars::Aimbot::Projectile::SplashRotateY[DEFAULT_BIND] < 0.f ? "random" : "%g", FSlider_Right | FSlider_Min);
|
||||
FSlider("Splash Nth root", Vars::Aimbot::Projectile::SplashNthRoot, 0.5f, 2.f, 0.1f, "%g", FSlider_Min);
|
||||
FSlider("Direct splash count", Vars::Aimbot::Projectile::SplashCountDirect, 1, 100, 1, "%i", FSlider_Left | FSlider_Min);
|
||||
FSlider("Arc splash count", Vars::Aimbot::Projectile::SplashCountArc, 1, 100, 1, "%i", FSlider_Right | FSlider_Min);
|
||||
FSlider("Splash trace interval", Vars::Aimbot::Projectile::SplashTraceInterval, 1, 10, 1, "%i", FSlider_Left);
|
||||
@@ -583,13 +584,15 @@ void CMenu::MenuVisuals(int iTab)
|
||||
if (Section("Backtrack", true))
|
||||
{
|
||||
FToggle("Enabled", Vars::Chams::Backtrack::Enabled, FToggle_Left, nullptr, "Backtrack chams");
|
||||
FToggle("Ignore Z", Vars::Chams::Backtrack::IgnoreZ, FToggle_Right, nullptr, "Backtrack ignore Z");
|
||||
|
||||
FMDropdown("Material", Vars::Chams::Backtrack::Visible, FDropdown_Left, 0, nullptr, "Backtrack material");
|
||||
FDropdown("Draw", Vars::Chams::Backtrack::Draw, { "Last", "Last + first", "All" }, {}, FDropdown_Right, 0, nullptr, "Backtrack chams mode");
|
||||
} EndSection();
|
||||
if (Section("Fake Angle", true))
|
||||
{
|
||||
FToggle("Enabled", Vars::Chams::FakeAngle::Enabled, FToggle_None, nullptr, "Fake angle chams");
|
||||
FToggle("Enabled", Vars::Chams::FakeAngle::Enabled, FToggle_Left, nullptr, "Fake angle chams");
|
||||
FToggle("Ignore Z", Vars::Chams::FakeAngle::IgnoreZ, FToggle_Right, nullptr, "Fake angle ignore Z");
|
||||
|
||||
FMDropdown("Material", Vars::Chams::FakeAngle::Visible, FDropdown_None, 0, nullptr, "Fake angle material");
|
||||
} EndSection();
|
||||
@@ -692,6 +695,11 @@ void CMenu::MenuVisuals(int iTab)
|
||||
if (Section("Backtrack", true))
|
||||
{
|
||||
FToggle("Enabled", Vars::Glow::Backtrack::Enabled, FToggle_Left, nullptr, "Backtrack glow");
|
||||
PushTransparent(!FGet(Vars::Colors::Backtrack).a);
|
||||
{
|
||||
FColorPicker("Color", Vars::Colors::Backtrack, 0, FColorPicker_Middle, nullptr, "Backtrack color");
|
||||
}
|
||||
PopTransparent();
|
||||
|
||||
PushTransparent(!FGet(Vars::Glow::Backtrack::Stencil));
|
||||
{
|
||||
@@ -707,7 +715,12 @@ void CMenu::MenuVisuals(int iTab)
|
||||
} EndSection();
|
||||
if (Section("Fake Angle", true))
|
||||
{
|
||||
FToggle("Enabled", Vars::Glow::FakeAngle::Enabled, FToggle_None, nullptr, "Fake angle glow");
|
||||
FToggle("Enabled", Vars::Glow::FakeAngle::Enabled, FToggle_Left, nullptr, "Fake angle glow");
|
||||
PushTransparent(!FGet(Vars::Colors::FakeAngle).a);
|
||||
{
|
||||
FColorPicker("Color", Vars::Colors::FakeAngle, 0, FColorPicker_Middle, nullptr, "Fake angle color");
|
||||
}
|
||||
PopTransparent();
|
||||
|
||||
PushTransparent(!FGet(Vars::Glow::FakeAngle::Stencil));
|
||||
{
|
||||
@@ -1066,19 +1079,19 @@ void CMenu::MenuVisuals(int iTab)
|
||||
|
||||
FSDropdown("Cheat title", Vars::Menu::CheatName, {}, FDropdown_Left | FSDropdown_AutoUpdate);
|
||||
FSDropdown("Chat info prefix", Vars::Menu::CheatPrefix, {}, FDropdown_Right);
|
||||
FKeybind("Primary key", Vars::Menu::MenuPrimaryKey.Map[DEFAULT_BIND], FButton_Left | FKeybind_AllowMenu);
|
||||
FKeybind("Secondary key", Vars::Menu::MenuSecondaryKey.Map[DEFAULT_BIND], FButton_Right | FButton_SameLine | FKeybind_AllowMenu);
|
||||
switch (Vars::Menu::MenuPrimaryKey.Map[DEFAULT_BIND])
|
||||
FKeybind("Primary key", Vars::Menu::MenuPrimaryKey[DEFAULT_BIND], FButton_Left | FKeybind_AllowMenu);
|
||||
FKeybind("Secondary key", Vars::Menu::MenuSecondaryKey[DEFAULT_BIND], FButton_Right | FButton_SameLine | FKeybind_AllowMenu);
|
||||
switch (Vars::Menu::MenuPrimaryKey[DEFAULT_BIND])
|
||||
{
|
||||
case VK_LBUTTON:
|
||||
case VK_RBUTTON:
|
||||
Vars::Menu::MenuPrimaryKey.Map[DEFAULT_BIND] = Vars::Menu::MenuPrimaryKey.Default;
|
||||
Vars::Menu::MenuPrimaryKey[DEFAULT_BIND] = Vars::Menu::MenuPrimaryKey.Default;
|
||||
}
|
||||
switch (Vars::Menu::MenuSecondaryKey.Map[DEFAULT_BIND])
|
||||
switch (Vars::Menu::MenuSecondaryKey[DEFAULT_BIND])
|
||||
{
|
||||
case VK_LBUTTON:
|
||||
case VK_RBUTTON:
|
||||
Vars::Menu::MenuSecondaryKey.Map[DEFAULT_BIND] = Vars::Menu::MenuSecondaryKey.Default;
|
||||
Vars::Menu::MenuSecondaryKey[DEFAULT_BIND] = Vars::Menu::MenuSecondaryKey.Default;
|
||||
}
|
||||
} EndSection();
|
||||
|
||||
@@ -1088,7 +1101,7 @@ void CMenu::MenuVisuals(int iTab)
|
||||
{
|
||||
FDropdown("Indicators", Vars::Menu::Indicators, { "Ticks", "Crit hack", "Spectators", "Ping", "Conditions", "Seed prediction" }, {}, FDropdown_Multi);
|
||||
if (FSlider("Scale", Vars::Menu::Scale, 0.75f, 2.f, 0.25f, "%g", FSlider_Min | FSlider_Precision | FSlider_NoAutoUpdate))
|
||||
H::Fonts.Reload(Vars::Menu::Scale.Map[DEFAULT_BIND]);
|
||||
H::Fonts.Reload(Vars::Menu::Scale[DEFAULT_BIND]);
|
||||
FToggle("Cheap text", Vars::Menu::CheapText);
|
||||
} EndSection();
|
||||
if (Vars::Debug::Options.Value)
|
||||
@@ -1897,17 +1910,33 @@ void CMenu::MenuSettings(int iTab)
|
||||
if (_tBind.m_bNot && (_tBind.m_iType != BindEnum::Key || _tBind.m_iInfo == BindEnum::KeyEnum::Hold))
|
||||
sType = std::format("not {}", sType);
|
||||
|
||||
ImVec2 vOriginalPos = { H::Draw.Scale(8) + H::Draw.Scale(28) * x, H::Draw.Scale(108) + H::Draw.Scale(36) * y };
|
||||
ImVec2 vOriginalPos = { H::Draw.Scale(8) + H::Draw.Scale(28) * std::min(x, 3), H::Draw.Scale(108) + H::Draw.Scale(36) * y };
|
||||
|
||||
// background
|
||||
float flWidth = GetWindowWidth() - GetStyle().WindowPadding.x * 2 - H::Draw.Scale(28) * x;
|
||||
float flWidth = GetWindowWidth() - GetStyle().WindowPadding.x * 2 - H::Draw.Scale(28) * std::min(x, 3);
|
||||
float flHeight = H::Draw.Scale(28);
|
||||
ImVec2 vDrawPos = GetDrawPos() + vOriginalPos;
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, F::Render.Background1p5, H::Draw.Scale(3));
|
||||
if (iBind != _iBind)
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, F::Render.Background1p5, H::Draw.Scale(3));
|
||||
else
|
||||
{
|
||||
ImColor tColor = F::Render.Background1p5L;
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, tColor, H::Draw.Scale(3));
|
||||
|
||||
tColor = ColorToVec((VecToColor(F::Render.Background1p5)).Lerp({ 127, 127, 127 }, 1.f / 9, LerpEnum::NoAlpha));
|
||||
GetWindowDrawList()->AddRect(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, tColor, H::Draw.Scale(3), ImDrawFlags_None, H::Draw.Scale());
|
||||
}
|
||||
|
||||
// text
|
||||
if (x > 3)
|
||||
{ // don't indent too much
|
||||
auto sText = std::format("-> {}", x);
|
||||
SetCursorPos({ vOriginalPos.x - FCalcTextSize(sText.c_str()).x - H::Draw.Scale(10), vOriginalPos.y + H::Draw.Scale(7) });
|
||||
FText(sText.c_str());
|
||||
}
|
||||
|
||||
float flTextWidth = flWidth - H::Draw.Scale(127);
|
||||
PushStyleVar(ImGuiStyleVar_Alpha, F::Binds.WillBeEnabled(_iBind) ? 1.f : 0.5f);
|
||||
PushTransparent(!F::Binds.WillBeEnabled(_iBind), true);
|
||||
|
||||
SetCursorPos({ vOriginalPos.x + H::Draw.Scale(10), vOriginalPos.y + H::Draw.Scale(7) });
|
||||
FText(TruncateText(_tBind.m_sName, flTextWidth* (1.f / 3) - H::Draw.Scale(20)).c_str());
|
||||
@@ -1930,16 +1959,18 @@ void CMenu::MenuSettings(int iTab)
|
||||
SetCursorPos({ vOriginalPos.x + flWidth - H::Draw.Scale(iOffset += 25), vOriginalPos.y + H::Draw.Scale(6) });
|
||||
bool bNot = IconButton(!_tBind.m_bNot ? ICON_MD_CODE : ICON_MD_CODE_OFF);
|
||||
|
||||
PushTransparent(Transparent || !_tBind.m_bVisible, true);
|
||||
SetCursorPos({ vOriginalPos.x + flWidth - H::Draw.Scale(iOffset += 25), vOriginalPos.y + H::Draw.Scale(6) });
|
||||
bool bVisibility = IconButton(_tBind.m_bVisible ? ICON_MD_VISIBILITY : ICON_MD_VISIBILITY_OFF);
|
||||
PopTransparent(1, 1);
|
||||
|
||||
SetCursorPos({ vOriginalPos.x + flWidth - H::Draw.Scale(iOffset += 25), vOriginalPos.y + H::Draw.Scale(6) });
|
||||
bool bEnable = IconButton(_tBind.m_bEnabled ? ICON_MD_RADIO_BUTTON_ON : ICON_MD_RADIO_BUTTON_OFF);
|
||||
bool bEnable = IconButton(_tBind.m_bEnabled ? ICON_MD_TOGGLE_ON : ICON_MD_TOGGLE_OFF);
|
||||
|
||||
SetCursorPos(vOriginalPos);
|
||||
bool bClicked = Button(std::format("##{}", _iBind).c_str(), { flWidth, flHeight });
|
||||
|
||||
PopStyleVar();
|
||||
PopTransparent(1, 1);
|
||||
|
||||
if (bClicked)
|
||||
{
|
||||
@@ -1947,6 +1978,18 @@ void CMenu::MenuSettings(int iTab)
|
||||
{
|
||||
bParent = false;
|
||||
tBind.m_iParent = _iBind;
|
||||
|
||||
// make sure bind can't be parented to itself or any of its children
|
||||
int _iBind2 = _iBind;
|
||||
Bind_t _tBind2;
|
||||
while (true)
|
||||
{
|
||||
if (_iBind2 == iBind)
|
||||
tBind.m_iParent = DEFAULT_BIND;
|
||||
if (!F::Binds.GetBind(_iBind2, &_tBind2))
|
||||
break;
|
||||
_iBind2 = _tBind2.m_iParent;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2016,15 +2059,14 @@ void CMenu::MenuSettings(int iTab)
|
||||
{
|
||||
switch (team)
|
||||
{
|
||||
case 3: return Color_t(100, 150, 200, alive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, false);
|
||||
case 2: return Color_t(255, 100, 100, alive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, false);
|
||||
case 3: return Color_t(100, 150, 200, alive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
|
||||
case 2: return Color_t(255, 100, 100, alive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
|
||||
}
|
||||
return Color_t(127, 127, 127, 255).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, false);
|
||||
return Color_t(127, 127, 127, 255).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
|
||||
};
|
||||
auto drawPlayer = [getTeamColor](const ListPlayer& player, int x, int y)
|
||||
{
|
||||
const Color_t teamColor = getTeamColor(player.m_iTeam, player.m_bAlive);
|
||||
const ImColor imColor = ColorToVec(teamColor);
|
||||
ImColor tColor = ColorToVec(getTeamColor(player.m_iTeam, player.m_bAlive));
|
||||
|
||||
ImVec2 vOriginalPos = { !x ? GetStyle().WindowPadding.x : GetWindowWidth() / 2 + GetStyle().WindowPadding.x / 2, H::Draw.Scale(36 + 36 * y) };
|
||||
|
||||
@@ -2032,7 +2074,7 @@ void CMenu::MenuSettings(int iTab)
|
||||
float flWidth = GetWindowWidth() / 2 - GetStyle().WindowPadding.x * 1.5f;
|
||||
float flHeight = H::Draw.Scale(28);
|
||||
ImVec2 vDrawPos = GetDrawPos() + vOriginalPos;
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, imColor, H::Draw.Scale(3));
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, tColor, H::Draw.Scale(3));
|
||||
|
||||
// text + icons
|
||||
int lOffset = H::Draw.Scale(10);
|
||||
@@ -2108,14 +2150,14 @@ void CMenu::MenuSettings(int iTab)
|
||||
float flTagOffset = 0;
|
||||
for (auto& [pTag, iID] : vTags)
|
||||
{
|
||||
ImColor tagColor = ColorToVec(pTag->Color);
|
||||
ImColor tTagColor = ColorToVec(pTag->Color);
|
||||
float flTagWidth = FCalcTextSize(pTag->Name.c_str()).x + H::Draw.Scale(!iID ? 10 : 25);
|
||||
float flTagHeight = H::Draw.Scale(20);
|
||||
ImVec2 vTagPos = { flTagOffset, H::Draw.Scale(4) };
|
||||
|
||||
PushStyleColor(ImGuiCol_Text, IsColorDark(tagColor) ? ImVec4{ 1, 1, 1, 1 } : ImVec4{ 0, 0, 0, 1 });
|
||||
PushStyleColor(ImGuiCol_Text, IsColorDark(tTagColor) ? ImVec4{ 1, 1, 1, 1 } : ImVec4{ 0, 0, 0, 1 });
|
||||
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos + vTagPos, { vDrawPos.x + vTagPos.x + flTagWidth, vDrawPos.y + vTagPos.y + flTagHeight }, tagColor, H::Draw.Scale(3));
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos + vTagPos, { vDrawPos.x + vTagPos.x + flTagWidth, vDrawPos.y + vTagPos.y + flTagHeight }, tTagColor, H::Draw.Scale(3));
|
||||
SetCursorPos({ vTagPos.x + H::Draw.Scale(5), vTagPos.y + H::Draw.Scale(4) });
|
||||
FText(pTag->Name.c_str());
|
||||
SetCursorPos({ vTagPos.x + flTagWidth - H::Draw.Scale(18), vTagPos.y + H::Draw.Scale(2) });
|
||||
@@ -2474,9 +2516,18 @@ void CMenu::MenuSettings(int iTab)
|
||||
// background
|
||||
float flWidth = GetWindowWidth() * (_tTag.Label ? 1.f / 3 : 2.f / 3) - GetStyle().WindowPadding.x * 1.5f;
|
||||
float flHeight = H::Draw.Scale(28);
|
||||
ImColor imColor = ColorToVec(_tTag.Color.Lerp(Vars::Menu::Theme::Background.Value, 0.5f, false));
|
||||
ImColor tColor = ColorToVec(_tTag.Color.Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha));
|
||||
ImVec2 vDrawPos = GetDrawPos() + vOriginalPos;
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, imColor, H::Draw.Scale(3));
|
||||
if (iID != _iID)
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, tColor, H::Draw.Scale(3));
|
||||
else
|
||||
{
|
||||
ImColor tColor2 = { tColor.Value.x * 1.1f, tColor.Value.y * 1.1f, tColor.Value.z * 1.1f, tColor.Value.w };
|
||||
GetWindowDrawList()->AddRectFilled(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, tColor2, H::Draw.Scale(3));
|
||||
|
||||
tColor2 = ColorToVec(_tTag.Color.Lerp(Vars::Menu::Theme::Background.Value, 0.25f, LerpEnum::NoAlpha));
|
||||
GetWindowDrawList()->AddRect(vDrawPos, { vDrawPos.x + flWidth, vDrawPos.y + flHeight }, tColor2, H::Draw.Scale(3), ImDrawFlags_None, H::Draw.Scale());
|
||||
}
|
||||
|
||||
// text
|
||||
SetCursorPos({ vOriginalPos.x + H::Draw.Scale(10), vOriginalPos.y + H::Draw.Scale(7) });
|
||||
@@ -2883,7 +2934,8 @@ void CMenu::MenuSettings(int iTab)
|
||||
|
||||
/* Column 1 */
|
||||
TableNextColumn();
|
||||
if (Section("Manager"))
|
||||
bool bManager = Section("Manager");
|
||||
if (bManager)
|
||||
{
|
||||
static std::string newName;
|
||||
FSDropdown("Material name", &newName, {}, FDropdown_Left | FSDropdown_AutoUpdate);
|
||||
@@ -2956,6 +3008,8 @@ void CMenu::MenuSettings(int iTab)
|
||||
SetCursorPos(vOriginalPos); DebugDummy({ 0, H::Draw.Scale(28) });
|
||||
}
|
||||
} EndSection();
|
||||
if (!bManager)
|
||||
SetScrollY(0);
|
||||
SetCursorPosY(GetCursorPosY() - 8);
|
||||
if (FButton("Folder", FButton_Fit))
|
||||
ShellExecuteA(NULL, NULL, F::Configs.m_sMaterialsPath.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
@@ -3214,7 +3268,7 @@ void CMenu::DrawBinds()
|
||||
float flHeight = H::Draw.Scale(18 * vInfo.size() + (Vars::Menu::BindWindowTitle.Value ? 42 : 12));
|
||||
SetNextWindowSize({ flWidth, flHeight });
|
||||
PushStyleVar(ImGuiStyleVar_WindowMinSize, { H::Draw.Scale(40), H::Draw.Scale(40) });
|
||||
if (Begin("Binds", nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize))
|
||||
if (Begin("Binds", nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing))
|
||||
{
|
||||
ImVec2 vWindowPos = GetWindowPos();
|
||||
|
||||
@@ -3246,7 +3300,7 @@ void CMenu::DrawBinds()
|
||||
float flPosX = 0;
|
||||
|
||||
if (m_bIsOpen)
|
||||
PushStyleVar(ImGuiStyleVar_Alpha, F::Binds.WillBeEnabled(iBind) ? 1.f : 0.5f);
|
||||
PushTransparent(!F::Binds.WillBeEnabled(iBind), true);
|
||||
|
||||
SetCursorPos({ flPosX += H::Draw.Scale(12), H::Draw.Scale(iListStart + 18 * i) });
|
||||
PushStyleColor(ImGuiCol_Text, tBind.m_bActive ? F::Render.Accent.Value : F::Render.Inactive.Value);
|
||||
@@ -3269,11 +3323,15 @@ void CMenu::DrawBinds()
|
||||
SetCursorPos({ flWidth - H::Draw.Scale(50), H::Draw.Scale(iListStart - 1 + 18 * i) });
|
||||
bool bNot = IconButton(!tBind.m_bNot ? ICON_MD_CODE : ICON_MD_CODE_OFF);
|
||||
|
||||
PushTransparent(Transparent || !tBind.m_bVisible, true);
|
||||
SetCursorPos({ flWidth - H::Draw.Scale(75), H::Draw.Scale(iListStart - 1 + 18 * i) });
|
||||
bool bVisibility = IconButton(tBind.m_bVisible ? ICON_MD_VISIBILITY : ICON_MD_VISIBILITY_OFF);
|
||||
PopTransparent(1, 1);
|
||||
|
||||
SetCursorPos({ flWidth - H::Draw.Scale(100), H::Draw.Scale(iListStart - 1 + 18 * i) });
|
||||
bool bEnable = IconButton(tBind.m_bEnabled ? ICON_MD_RADIO_BUTTON_ON : ICON_MD_RADIO_BUTTON_OFF);
|
||||
bool bEnable = IconButton(tBind.m_bEnabled ? ICON_MD_TOGGLE_ON : ICON_MD_TOGGLE_OFF);
|
||||
|
||||
PopTransparent(1, 1);
|
||||
|
||||
PushFont(F::Render.FontRegular);
|
||||
PushStyleVar(ImGuiStyleVar_WindowPadding, { H::Draw.Scale(8), H::Draw.Scale(8) });
|
||||
@@ -3311,9 +3369,6 @@ void CMenu::DrawBinds()
|
||||
PopFont();
|
||||
}
|
||||
|
||||
if (m_bIsOpen)
|
||||
PopStyleVar();
|
||||
|
||||
i++;
|
||||
}
|
||||
PopFont();
|
||||
|
||||
@@ -55,13 +55,12 @@ void CRender::LoadColors()
|
||||
};
|
||||
|
||||
Accent = ColorToVec(Vars::Menu::Theme::Accent.Value);
|
||||
AccentL = ImColor(Accent.Value.x * 1.1f, Accent.Value.y * 1.1f, Accent.Value.z * 1.1f, Accent.Value.w);
|
||||
Background0 = ColorToVec(Vars::Menu::Theme::Background.Value);
|
||||
Background0p5 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127, Vars::Menu::Theme::Background.Value.a }, 0.5f / 9));
|
||||
Background1 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127, Vars::Menu::Theme::Background.Value.a }, 1.f / 9));
|
||||
Background1p5 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127, Vars::Menu::Theme::Background.Value.a }, 1.5f / 9));
|
||||
Background1p5L = ImColor(Background1p5.Value.x * 1.1f, Background1p5.Value.y * 1.1f, Background1p5.Value.z * 1.1f, Background1p5.Value.w);
|
||||
Background2 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127, Vars::Menu::Theme::Background.Value.a }, 2.f / 9));
|
||||
Background0p5 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127 }, 0.5f / 9, LerpEnum::NoAlpha));
|
||||
Background1 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127 }, 1.f / 9, LerpEnum::NoAlpha));
|
||||
Background1p5 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127 }, 1.5f / 9, LerpEnum::NoAlpha));
|
||||
Background1p5L = { Background1p5.Value.x * 1.1f, Background1p5.Value.y * 1.1f, Background1p5.Value.z * 1.1f, Background1p5.Value.w };
|
||||
Background2 = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127 }, 2.f / 9, LerpEnum::NoAlpha));
|
||||
Inactive = ColorToVec(Vars::Menu::Theme::Inactive.Value);
|
||||
Active = ColorToVec(Vars::Menu::Theme::Active.Value);
|
||||
|
||||
@@ -82,8 +81,6 @@ void CRender::LoadColors()
|
||||
colors[ImGuiCol_ResizeGripActive] = {};
|
||||
colors[ImGuiCol_ResizeGripHovered] = {};
|
||||
colors[ImGuiCol_ScrollbarBg] = {};
|
||||
colors[ImGuiCol_SliderGrab] = Accent;
|
||||
colors[ImGuiCol_SliderGrabActive] = AccentL;
|
||||
colors[ImGuiCol_Text] = Active;
|
||||
colors[ImGuiCol_WindowBg] = {};
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ public:
|
||||
|
||||
// Colors
|
||||
ImColor Accent = {};
|
||||
ImColor AccentL = {};
|
||||
ImColor Background0 = {};
|
||||
ImColor Background0p5 = {};
|
||||
ImColor Background1 = {};
|
||||
|
||||
@@ -401,11 +401,11 @@ void CMisc::FastMovement(CTFPlayer* pLocal, CUserCmd* pCmd)
|
||||
if (!Vars::Misc::Movement::FastStop.Value || !flSpeed)
|
||||
return;
|
||||
|
||||
Vec3 direction = pLocal->m_vecVelocity().toAngle();
|
||||
direction.y = pCmd->viewangles.y - direction.y;
|
||||
const Vec3 negatedDirection = direction.fromAngle() * -flSpeed;
|
||||
pCmd->forwardmove = negatedDirection.x;
|
||||
pCmd->sidemove = negatedDirection.y;
|
||||
Vec3 vDirection = pLocal->m_vecVelocity().ToAngle();
|
||||
vDirection.y = pCmd->viewangles.y - vDirection.y;
|
||||
Vec3 vNegatedDirection = vDirection.FromAngle() * -flSpeed;
|
||||
pCmd->forwardmove = vNegatedDirection.x;
|
||||
pCmd->sidemove = vNegatedDirection.y;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -419,13 +419,12 @@ void CMisc::FastMovement(CTFPlayer* pLocal, CUserCmd* pCmd)
|
||||
if (!(pCmd->buttons & (IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT)))
|
||||
return;
|
||||
|
||||
const Vec3 vecMove(pCmd->forwardmove, pCmd->sidemove, 0.f);
|
||||
const float flLength = vecMove.Length();
|
||||
Vec3 angMoveReverse;
|
||||
Math::VectorAngles(vecMove * -1.f, angMoveReverse);
|
||||
Vec3 vMove = { pCmd->forwardmove, pCmd->sidemove, 0.f };
|
||||
float flLength = vMove.Length();
|
||||
Vec3 vAngMoveReverse; Math::VectorAngles(vMove * -1.f, vAngMoveReverse);
|
||||
pCmd->forwardmove = -flLength;
|
||||
pCmd->sidemove = 0.f;
|
||||
pCmd->viewangles.y = fmodf(pCmd->viewangles.y - angMoveReverse.y, 360.f);
|
||||
pCmd->viewangles.y = fmodf(pCmd->viewangles.y - vAngMoveReverse.y, 360.f);
|
||||
pCmd->viewangles.z = 270.f;
|
||||
G::PSilentAngles = true;
|
||||
|
||||
|
||||
@@ -364,7 +364,8 @@ void CChams::RenderBacktrack(const DrawModelState_t& pState, const ModelRenderIn
|
||||
return;
|
||||
|
||||
static auto ModelRender_DrawModelExecute = U::Hooks.m_mHooks["IVModelRender_DrawModelExecute"];
|
||||
if (!ModelRender_DrawModelExecute)
|
||||
auto pRenderContext = I::MaterialSystem->GetRenderContext();
|
||||
if (!ModelRender_DrawModelExecute || !pRenderContext)
|
||||
return;
|
||||
|
||||
auto pEntity = I::ClientEntityList->GetClientEntity(pInfo.entity_index)->As<CTFPlayer>();
|
||||
@@ -373,6 +374,8 @@ void CChams::RenderBacktrack(const DrawModelState_t& pState, const ModelRenderIn
|
||||
|
||||
|
||||
|
||||
pRenderContext->DepthRange(0.f, Vars::Chams::Backtrack::IgnoreZ.Value ? 0.2f : 1.f);
|
||||
|
||||
auto drawModel = [&](Vec3& vOrigin, const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo, matrix3x4* pBoneToWorld)
|
||||
{
|
||||
if (!SDK::IsOnScreen(pEntity, vOrigin))
|
||||
@@ -416,6 +419,8 @@ void CChams::RenderBacktrack(const DrawModelState_t& pState, const ModelRenderIn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pRenderContext->DepthRange(0.f, 1.f);
|
||||
}
|
||||
void CChams::RenderFakeAngle(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo)
|
||||
{
|
||||
@@ -423,12 +428,17 @@ void CChams::RenderFakeAngle(const DrawModelState_t& pState, const ModelRenderIn
|
||||
return;
|
||||
|
||||
static auto ModelRender_DrawModelExecute = U::Hooks.m_mHooks["IVModelRender_DrawModelExecute"];
|
||||
if (!ModelRender_DrawModelExecute)
|
||||
auto pRenderContext = I::MaterialSystem->GetRenderContext();
|
||||
if (!ModelRender_DrawModelExecute || !pRenderContext)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
pRenderContext->DepthRange(0.f, Vars::Chams::FakeAngle::IgnoreZ.Value ? 0.2f : 1.f);
|
||||
|
||||
ModelRender_DrawModelExecute->Call<void>(I::ModelRender, pState, pInfo, F::FakeAngle.aBones);
|
||||
|
||||
pRenderContext->DepthRange(0.f, 1.f);
|
||||
}
|
||||
void CChams::RenderHandler(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo, matrix3x4* pBoneToWorld)
|
||||
{
|
||||
|
||||
@@ -352,7 +352,7 @@ void CGlow::Store(CTFPlayer* pLocal)
|
||||
if (bShowFriendly && pEntity->m_iTeamNum() == pLocal->m_iTeamNum() || bShowEnemy && pEntity->m_iTeamNum() != pLocal->m_iTeamNum())
|
||||
{
|
||||
tGlow = Glow_t(Vars::Glow::Backtrack::Stencil.Value, Vars::Glow::Backtrack::Blur.Value);
|
||||
mvEntities[tGlow].emplace_back(pEntity, tColor, true);
|
||||
mvEntities[tGlow].emplace_back(pEntity, Vars::Colors::Backtrack.Value.a ? Vars::Colors::Backtrack.Value : tColor, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,7 @@ void CGlow::Store(CTFPlayer* pLocal)
|
||||
if (Vars::Glow::FakeAngle::Enabled.Value && (Vars::Glow::FakeAngle::Stencil.Value || Vars::Glow::FakeAngle::Blur.Value) && pEntity == pLocal && F::FakeAngle.bDrawChams && F::FakeAngle.bBonesSetup)
|
||||
{
|
||||
tGlow = Glow_t(Vars::Glow::FakeAngle::Stencil.Value, Vars::Glow::FakeAngle::Blur.Value);
|
||||
mvEntities[tGlow].emplace_back(pEntity, tColor, true);
|
||||
mvEntities[tGlow].emplace_back(pEntity, Vars::Colors::FakeAngle.Value.a ? Vars::Colors::FakeAngle.Value : tColor, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,8 @@ void CMaterials::Remove(IMaterial* pMaterial)
|
||||
if (!pMaterial)
|
||||
return;
|
||||
|
||||
auto it = m_mMatList.find(pMaterial);
|
||||
if (it != m_mMatList.end())
|
||||
m_mMatList.erase(it);
|
||||
if (m_mMatList.contains(pMaterial))
|
||||
m_mMatList.erase(pMaterial);
|
||||
|
||||
pMaterial->DecrementReferenceCount();
|
||||
pMaterial->DeleteIfUnreferenced();
|
||||
@@ -39,7 +38,7 @@ void CMaterials::StoreStruct(std::string sName, std::string sVMT, bool bLocked)
|
||||
m_mMaterials[FNV1A::Hash32(sName.c_str())] = tMaterial;
|
||||
}
|
||||
|
||||
void CMaterials::StoreVars(Material_t& tMaterial)
|
||||
static inline void StoreVars(Material_t& tMaterial)
|
||||
{
|
||||
if (tMaterial.m_bStored || !tMaterial.m_pMaterial)
|
||||
return;
|
||||
@@ -59,6 +58,14 @@ void CMaterials::StoreVars(Material_t& tMaterial)
|
||||
tMaterial.m_bInvertCull = true;
|
||||
}
|
||||
|
||||
static inline void RemoveVars(Material_t& tMaterial)
|
||||
{
|
||||
tMaterial.m_bStored = false;
|
||||
tMaterial.m_phongtint = nullptr;
|
||||
tMaterial.m_envmaptint = nullptr;
|
||||
tMaterial.m_bInvertCull = false;
|
||||
}
|
||||
|
||||
static inline void ModifyKeyValues(KeyValues* pKV)
|
||||
{
|
||||
pKV->SetString("$model", "1"); // prevent wacko chams
|
||||
@@ -206,6 +213,8 @@ void CMaterials::ReloadMaterials()
|
||||
LoadMaterials();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CMaterials::SetColor(Material_t* pMaterial, Color_t tColor)
|
||||
{
|
||||
float r = float(tColor.r) / 255.f;
|
||||
@@ -238,9 +247,8 @@ Material_t* CMaterials::GetMaterial(uint32_t uHash)
|
||||
|
||||
std::string CMaterials::GetVMT(uint32_t uHash)
|
||||
{
|
||||
const auto cham = m_mMaterials.find(uHash);
|
||||
if (cham != m_mMaterials.end())
|
||||
return cham->second.m_sVMT;
|
||||
if (m_mMaterials.contains(uHash))
|
||||
return m_mMaterials[uHash].m_sVMT;
|
||||
|
||||
return "";
|
||||
}
|
||||
@@ -248,7 +256,7 @@ std::string CMaterials::GetVMT(uint32_t uHash)
|
||||
void CMaterials::AddMaterial(const char* sName)
|
||||
{
|
||||
auto uHash = FNV1A::Hash32(sName);
|
||||
if (uHash == FNV1A::Hash32Const("Original") || std::filesystem::exists(F::Configs.m_sMaterialsPath + sName) || m_mMaterials.contains(uHash))
|
||||
if (uHash == FNV1A::Hash32Const("Original") || std::filesystem::exists(F::Configs.m_sMaterialsPath + sName + ".vmt") || m_mMaterials.contains(uHash))
|
||||
return;
|
||||
|
||||
StoreStruct(
|
||||
@@ -265,26 +273,27 @@ void CMaterials::AddMaterial(const char* sName)
|
||||
ModifyKeyValues(kv);
|
||||
|
||||
tMaterial.m_pMaterial = Create(sName, kv);
|
||||
StoreVars(tMaterial);
|
||||
//StoreVars(tMaterial);
|
||||
|
||||
std::ofstream outStream(F::Configs.m_sMaterialsPath + sName);
|
||||
std::ofstream outStream(F::Configs.m_sMaterialsPath + sName + ".vmt");
|
||||
outStream << tMaterial.m_sVMT;
|
||||
outStream.close();
|
||||
}
|
||||
|
||||
void CMaterials::EditMaterial(const char* sName, const char* sVMT)
|
||||
{
|
||||
if (!std::filesystem::exists(F::Configs.m_sMaterialsPath + sName))
|
||||
if (!std::filesystem::exists(F::Configs.m_sMaterialsPath + sName + ".vmt"))
|
||||
return;
|
||||
|
||||
m_bLoaded = false;
|
||||
|
||||
const auto cham = m_mMaterials.find(FNV1A::Hash32(sName));
|
||||
if (cham != m_mMaterials.end() && !cham->second.m_bLocked)
|
||||
auto uHash = FNV1A::Hash32(sName);
|
||||
if (m_mMaterials.contains(uHash) && !m_mMaterials[uHash].m_bLocked)
|
||||
{
|
||||
auto& tMaterial = cham->second;
|
||||
auto& tMaterial = m_mMaterials[uHash];
|
||||
|
||||
Remove(tMaterial.m_pMaterial);
|
||||
RemoveVars(tMaterial);
|
||||
tMaterial.m_sVMT = sVMT;
|
||||
|
||||
KeyValues* kv = new KeyValues(sName);
|
||||
@@ -292,9 +301,9 @@ void CMaterials::EditMaterial(const char* sName, const char* sVMT)
|
||||
ModifyKeyValues(kv);
|
||||
|
||||
tMaterial.m_pMaterial = Create(sName, kv);
|
||||
StoreVars(tMaterial);
|
||||
//StoreVars(tMaterial);
|
||||
|
||||
std::ofstream outStream(F::Configs.m_sMaterialsPath + sName);
|
||||
std::ofstream outStream(F::Configs.m_sMaterialsPath + sName + ".vmt");
|
||||
outStream << sVMT;
|
||||
outStream.close();
|
||||
}
|
||||
@@ -304,18 +313,16 @@ void CMaterials::EditMaterial(const char* sName, const char* sVMT)
|
||||
|
||||
void CMaterials::RemoveMaterial(const char* sName)
|
||||
{
|
||||
if (!std::filesystem::exists(F::Configs.m_sMaterialsPath + sName))
|
||||
if (!std::filesystem::exists(F::Configs.m_sMaterialsPath + sName + ".vmt"))
|
||||
return;
|
||||
|
||||
m_bLoaded = false;
|
||||
|
||||
auto uHash = FNV1A::Hash32(sName);
|
||||
const auto cham = m_mMaterials.find(uHash);
|
||||
if (cham != m_mMaterials.end() && !cham->second.m_bLocked)
|
||||
if (m_mMaterials.contains(uHash) && !m_mMaterials[uHash].m_bLocked)
|
||||
{
|
||||
Remove(cham->second.m_pMaterial);
|
||||
|
||||
m_mMaterials.erase(cham);
|
||||
Remove(m_mMaterials[uHash].m_pMaterial);
|
||||
m_mMaterials.erase(uHash);
|
||||
|
||||
std::filesystem::remove(F::Configs.m_sMaterialsPath + sName + ".vmt");
|
||||
|
||||
|
||||
@@ -23,19 +23,17 @@ public:
|
||||
void ReloadMaterials();
|
||||
|
||||
IMaterial* Create(char const* szName, KeyValues* pKV);
|
||||
void StoreStruct(std::string sName, std::string sVMT, bool bLocked = false);
|
||||
void StoreVars(Material_t& tMaterial);
|
||||
void Remove(IMaterial* pMaterial);
|
||||
void StoreStruct(std::string sName, std::string sVMT, bool bLocked = false);
|
||||
|
||||
void SetColor(Material_t* pMaterial, Color_t tColor);
|
||||
|
||||
Material_t* GetMaterial(uint32_t uHash);
|
||||
std::string GetVMT(uint32_t uHash);
|
||||
|
||||
void AddMaterial(const char* sName);
|
||||
void EditMaterial(const char* sName, const char* sVMT);
|
||||
void RemoveMaterial(const char* sName);
|
||||
|
||||
void SetColor(Material_t* pMaterial, Color_t tColor);
|
||||
|
||||
std::unordered_map<uint32_t, Material_t> m_mMaterials;
|
||||
std::unordered_map<IMaterial*, bool> m_mMatList;
|
||||
|
||||
|
||||
@@ -47,11 +47,10 @@ void CNotifications::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
auto& cAccent = tNotification.m_tAccent, &cBackground = tNotification.m_tBackground, &cActive = tNotification.m_tActive;
|
||||
H::Draw.GradientRect(x + 1, y + 1, w - 2, h - 2, { cBackground.r, cBackground.g, cBackground.b, 255 }, { cBackground.r, cBackground.g, cBackground.b, 127 }, true);
|
||||
H::Draw.FillRect(x + 1, y + 1, H::Draw.Scale(2, Scale_Round), h - 2, { cAccent.r, cAccent.g, cAccent.b, 255 });
|
||||
H::Draw.LineRect(x, y, w, h, { cBackground.r, cBackground.g, cBackground.b, 255 });
|
||||
H::Draw.StringOutlined(fFont, x + H::Draw.Scale(13, Scale_Round), y + H::Draw.Scale(9, Scale_Round), { cActive.r, cActive.g, cActive.b, 255 }, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, tNotification.m_sText.c_str());
|
||||
H::Draw.GradientRect(x + 1, y + 1, w - 2, h - 2, tNotification.m_tBackground.Alpha(255), tNotification.m_tBackground.Alpha(127), true);
|
||||
H::Draw.FillRect(x + 1, y + 1, H::Draw.Scale(2, Scale_Round), h - 2, tNotification.m_tAccent.Alpha(255));
|
||||
H::Draw.LineRect(x, y, w, h, tNotification.m_tBackground.Alpha(255));
|
||||
H::Draw.StringOutlined(fFont, x + H::Draw.Scale(13, Scale_Round), y + H::Draw.Scale(9, Scale_Round), tNotification.m_tActive.Alpha(255), Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, tNotification.m_sText.c_str());
|
||||
|
||||
y += (h + 8) * (1.f - flEase);
|
||||
}
|
||||
|
||||
@@ -24,9 +24,8 @@ bool CSpectatorList::GetSpectators(CTFPlayer* pTarget)
|
||||
if (pPlayer->IsAlive() || pObserverTarget != pTarget
|
||||
|| bLocal && !I::EngineClient->IsPlayingDemo() && F::Spectate.m_iTarget == -1)
|
||||
{
|
||||
auto it = m_mRespawnCache.find(pPlayer->entindex());
|
||||
if (it != m_mRespawnCache.end())
|
||||
m_mRespawnCache.erase(it);
|
||||
if (m_mRespawnCache.contains(pPlayer->entindex()))
|
||||
m_mRespawnCache.erase(pPlayer->entindex());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,9 @@ void CVisuals::ProjectileTrace(CTFPlayer* pPlayer, CTFWeaponBase* pWeapon, const
|
||||
}
|
||||
else if (Vars::Visuals::Simulation::ShotPath.Value)
|
||||
{
|
||||
G::BoxStorage.clear();
|
||||
G::PathStorage.clear();
|
||||
|
||||
if (Vars::Colors::ShotPath.Value.a)
|
||||
G::PathStorage.emplace_back(tProjInfo.m_vPath, -float(tProjInfo.m_vPath.size()) - TIME_TO_TICKS(F::Backtrack.GetReal()), Vars::Colors::ShotPath.Value, Vars::Visuals::Simulation::ShotPath.Value);
|
||||
if (Vars::Colors::ShotPathClipped.Value.a)
|
||||
@@ -296,8 +298,6 @@ void CVisuals::ProjectileTrace(CTFPlayer* pPlayer, CTFWeaponBase* pWeapon, const
|
||||
const Vec3 vSize = { 1.f, flSize, flSize };
|
||||
Vec3 vAngles; Math::VectorAngles(*pNormal, vAngles);
|
||||
|
||||
if (Vars::Colors::ShotPath.Value.a || Vars::Colors::TrajectoryPathClipped.Value.a)
|
||||
G::BoxStorage.clear();
|
||||
if (Vars::Colors::ShotPath.Value.a)
|
||||
G::BoxStorage.emplace_back(trace.endpos, vSize * -1, vSize, vAngles, I::GlobalVars->curtime + TICKS_TO_TIME(tProjInfo.m_vPath.size()) + F::Backtrack.GetReal(), Vars::Colors::ShotPath.Value, Color_t(0, 0, 0, 0));
|
||||
if (Vars::Colors::ShotPathClipped.Value.a)
|
||||
@@ -996,33 +996,39 @@ void CVisuals::OverrideWorldTextures()
|
||||
return;
|
||||
|
||||
KeyValues* kv = new KeyValues("LightmappedGeneric");
|
||||
if (uHash == FNV1A::Hash32Const("Dev"))
|
||||
kv->SetString("$basetexture", "dev/dev_measuregeneric01b");
|
||||
else if (uHash == FNV1A::Hash32Const("Camo"))
|
||||
kv->SetString("$basetexture", "patterns/paint_strokes");
|
||||
else if (uHash == FNV1A::Hash32Const("Black"))
|
||||
kv->SetString("$basetexture", "patterns/combat/black");
|
||||
else if (uHash == FNV1A::Hash32Const("White"))
|
||||
kv->SetString("$basetexture", "patterns/combat/white");
|
||||
else if (uHash == FNV1A::Hash32Const("Flat"))
|
||||
{
|
||||
kv->SetString("$basetexture", "vgui/white_additive");
|
||||
kv->SetString("$color2", "[0.12 0.12 0.15]");
|
||||
}
|
||||
else
|
||||
kv->SetString("$basetexture", Vars::Visuals::World::WorldTexture.Value.c_str());
|
||||
|
||||
if (!kv)
|
||||
return;
|
||||
|
||||
switch (uHash)
|
||||
{
|
||||
case FNV1A::Hash32Const("Dev"):
|
||||
kv->SetString("$basetexture", "dev/dev_measuregeneric01b");
|
||||
break;
|
||||
case FNV1A::Hash32Const("Camo"):
|
||||
kv->SetString("$basetexture", "patterns/paint_strokes");
|
||||
break;
|
||||
case FNV1A::Hash32Const("Black"):
|
||||
kv->SetString("$basetexture", "patterns/combat/black");
|
||||
break;
|
||||
case FNV1A::Hash32Const("White"):
|
||||
kv->SetString("$basetexture", "patterns/combat/white");
|
||||
break;
|
||||
case FNV1A::Hash32Const("Flat"):
|
||||
kv->SetString("$basetexture", "vgui/white_additive");
|
||||
kv->SetString("$color2", "[0.12 0.12 0.15]");
|
||||
break;
|
||||
default:
|
||||
kv->SetString("$basetexture", Vars::Visuals::World::WorldTexture.Value.c_str());
|
||||
}
|
||||
|
||||
for (auto h = I::MaterialSystem->FirstMaterial(); h != I::MaterialSystem->InvalidMaterial(); h = I::MaterialSystem->NextMaterial(h))
|
||||
{
|
||||
auto pMaterial = I::MaterialSystem->GetMaterial(h);
|
||||
if (!pMaterial || pMaterial->IsErrorMaterial() || !pMaterial->IsPrecached() || pMaterial->IsTranslucent() || pMaterial->IsSpriteCard())
|
||||
continue;
|
||||
|
||||
auto sGroup = std::string_view(pMaterial->GetTextureGroupName());
|
||||
auto sName = std::string_view(pMaterial->GetName());
|
||||
std::string_view sGroup = pMaterial->GetTextureGroupName();
|
||||
std::string_view sName = pMaterial->GetName();
|
||||
|
||||
if (!sGroup._Starts_with("World")
|
||||
|| sName.find("water") != std::string_view::npos || sName.find("glass") != std::string_view::npos
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CAchievementMgr_CheckAchievementsEnabled, S::CAchievementMgr_CheckAchi
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CAchievementMgr_CheckAchievementsEnabled.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CAchievementMgr_CheckAchievementsEnabled[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ MAKE_HOOK(CAttributeManager_AttribHookInt, S::CAttributeManager_AttribHookInt(),
|
||||
int value, const char* name, void* econent, void* buffer, bool isGlobalConstString)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CAttributeManager_AttribHookValue.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CAttributeManager_AttribHookValue[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(value, name, econent, buffer, isGlobalConstString);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ MAKE_HOOK(CBaseAnimating_Interpolate, S::CBaseAnimating_Interpolate(), bool,
|
||||
void* rcx, float currentTime)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_Interpolate.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseAnimating_Interpolate[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, currentTime);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBaseAnimating_MaintainSequenceTransitions, S::CBaseAnimating_Maintain
|
||||
void* rcx, void* boneSetup, float flCycle, Vec3 pos[], Vector4D q[])
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_MaintainSequenceTransitions.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseAnimating_MaintainSequenceTransitions[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, boneSetup, flCycle, pos, q);
|
||||
#endif
|
||||
}
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBaseAnimating_SetSequence, S::CBaseAnimating_SetSequence(), void,
|
||||
void* rcx, int nSequence)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_SetSequence.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseAnimating_SetSequence[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, nSequence);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBaseAnimating_SetupBones, S::CBaseAnimating_SetupBones(), bool,
|
||||
void* rcx, matrix3x4* pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_SetupBones.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseAnimating_SetupBones[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pBoneToWorldOut, nMaxBones, boneMask, currentTime);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CBaseAnimating_UpdateClientSideAnimation, S::CBaseAnimating_UpdateClie
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_UpdateClientSideAnimation.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseAnimating_UpdateClientSideAnimation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CBaseEntity_BaseInterpolatePart1, S::CBaseEntity_BaseInterpolatePart1(
|
||||
void* rcx, float& currentTime, Vector& oldOrigin, QAngle& oldAngles, Vector& oldVel, int& bNoMoreChanges)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_BaseInterpolatePart1.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseEntity_BaseInterpolatePart1[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, currentTime, oldOrigin, oldAngles, oldVel, bNoMoreChanges);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ MAKE_HOOK(CBaseEntity_EstimateAbsVelocity, S::CBaseEntity_EstimateAbsVelocity(),
|
||||
void* rcx, Vector& vel)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_EstimateAbsVelocity.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseEntity_EstimateAbsVelocity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, vel);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CBaseEntity_FireBullets, S::CBaseEntity_FireBullets(), void,
|
||||
void* rcx, CBaseCombatWeapon* pWeapon, const FireBulletsInfo_t& info, bool bDoEffects, int nDamageType, int nCustomDamageType)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_FireBullets.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseEntity_FireBullets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pWeapon, info, nDamageType, nDamageType, nCustomDamageType);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBaseEntity_ResetLatched, S::CBaseEntity_ResetLatched(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_ResetLatched.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseEntity_ResetLatched[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ MAKE_HOOK(CBaseEntity_SetAbsVelocity, S::CBaseEntity_SetAbsVelocity(), void,
|
||||
void* rcx, const Vec3& vecAbsVelocity)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_SetAbsVelocity.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseEntity_SetAbsVelocity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, vecAbsVelocity);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CBaseEntity_WorldSpaceCenter, S::CBaseEntity_WorldSpaceCenter(), const
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_WorldSpaceCenter.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseEntity_WorldSpaceCenter[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CBaseHudChatLine_InsertAndColorizeText, S::CBaseHudChatLine_InsertAndC
|
||||
void* rcx, wchar_t* buf, int clientIndex)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseHudChatLine_InsertAndColorizeText.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseHudChatLine_InsertAndColorizeText[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, buf, clientIndex);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBasePlayer_CalcPlayerView, S::CBasePlayer_CalcPlayerView(), void,
|
||||
void* rcx, Vector& eyeOrigin, QAngle& eyeAngles, float& fov)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_CalcPlayerView.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBasePlayer_CalcPlayerView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles, fov);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), voi
|
||||
void* rcx, CBaseEntity* pOwner, const Vec3& vEyePosition, Vec3& vEyeAngles)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_CalcViewModelView.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBasePlayer_CalcViewModelView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pOwner, vEyePosition, vEyeAngles);
|
||||
#endif
|
||||
|
||||
@@ -67,7 +67,7 @@ MAKE_HOOK(ClientModeTFNormal_GetViewModelFOV, U::Memory.GetVFunc(I::ClientModeSh
|
||||
/*void* rcx*/)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_CalcViewModelView.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBasePlayer_CalcViewModelView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(/*rcx*/);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ MAKE_HOOK(CBasePlayer_ItemPostFrame, S::CBasePlayer_ItemPostFrame(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_ItemPostFrame.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBasePlayer_ItemPostFrame[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CBaseViewModel_ShouldFlipViewModel, S::CBaseViewModel_ShouldFlipViewMo
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseViewModel_ShouldFlipViewModel.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CBaseViewModel_ShouldFlipViewModel[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ MAKE_HOOK(CClientModeShared_CreateMove, U::Memory.GetVFunc(I::ClientModeShared,
|
||||
CClientModeShared* rcx, float flInputSampleTime, CUserCmd* pCmd)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_CreateMove.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CClientModeShared_CreateMove[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, flInputSampleTime, pCmd);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ MAKE_HOOK(CClientModeShared_DoPostScreenSpaceEffects, U::Memory.GetVFunc(I::Clie
|
||||
void* rcx, const CViewSetup* pSetup)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_DoPostScreenSpaceEffects.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CClientModeShared_DoPostScreenSpaceEffects[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pSetup);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CClientModeShared_OverrideView, U::Memory.GetVFunc(I::ClientModeShared
|
||||
void* rcx, CViewSetup* pView)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_OverrideView.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CClientModeShared_OverrideView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pView);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CClientModeShared_ShouldDrawViewModel, U::Memory.GetVFunc(I::ClientMod
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_ShouldDrawViewModel.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CClientModeShared_ShouldDrawViewModel[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CClientState_GetClientInterpAmount, S::CClientState_GetClientInterpAmo
|
||||
CClientState* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientState_GetClientInterpAmount.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CClientState_GetClientInterpAmount[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ MAKE_HOOK(CClientState_ProcessFixAngle, S::CClientState_ProcessFixAngle(), bool,
|
||||
CClientState* rcx, SVC_FixAngle* msg)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientState_ProcessFixAngle.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CClientState_ProcessFixAngle[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, msg);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CHudCrosshair_GetDrawPosition, S::CHudCrosshair_GetDrawPosition(), voi
|
||||
float* pX, float* pY, bool* pbBehindCamera, Vec3 angleCrosshairOffset)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHudCrosshair_GetDrawPosition.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CHudCrosshair_GetDrawPosition[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pX, pY, pbBehindCamera, angleCrosshairOffset);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CInventoryManager_ShowItemsPickedUp, S::CInventoryManager_ShowItemsPic
|
||||
void* rcx, bool bForce, bool bReturnToGame, bool bNoPanel)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CInventoryManager_ShowItemsPickedUp.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CInventoryManager_ShowItemsPickedUp[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, bForce, bReturnToGame, bNoPanel);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CL_CheckForPureServerWhitelist, S::CL_CheckForPureServerWhitelist(), v
|
||||
void **pFilesToReload)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_CheckForPureServerWhitelist.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CL_CheckForPureServerWhitelist[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pFilesToReload);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ MAKE_HOOK(CL_Move, S::CL_Move(), void,
|
||||
float accumulated_extra_samples, bool bFinalTick)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_Move.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CL_Move[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(accumulated_extra_samples, bFinalTick);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ MAKE_HOOK(CL_ProcessPacketEntities, S::CL_ProcessPacketEntities(), bool,
|
||||
SVC_PacketEntities* entmsg)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_ProcessPacketEntities.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CL_ProcessPacketEntities[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(entmsg);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CL_ReadPackets, S::CL_ReadPackets(), void,
|
||||
bool bFinalTick)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_ReadPackets.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CL_ReadPackets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(bFinalTick);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CMatchInviteNotification_OnTick, S::CMatchInviteNotification_OnTick(),
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CMatchInviteNotification_OnTick.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CMatchInviteNotification_OnTick[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CMaterial_Uncache, S::CMaterial_Uncache(), void,
|
||||
IMaterial* rcx, bool bPreserveVars)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CMaterial_Uncache.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CMaterial_Uncache[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, bPreserveVars);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CNetChannel_SendDatagram, S::CNetChannel_SendDatagram(), int,
|
||||
CNetChannel* pNetChan, bf_write* datagram)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CNetChannel_SendDatagram.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CNetChannel_SendDatagram[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pNetChan, datagram);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ MAKE_HOOK(CNetChannel_SendNetMsg, S::CNetChannel_SendNetMsg(), bool,
|
||||
CNetChannel* pNetChan, INetMessage& msg, bool bForceReliable, bool bVoice)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CNetChannel_SendNetMsg.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CNetChannel_SendNetMsg[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pNetChan, msg, bForceReliable, bVoice);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ MAKE_HOOK(COPRenderSprites_Render, S::COPRenderSprites_Render(), void,
|
||||
void* rcx, IMatRenderContext* pRenderContext, CParticleCollection* pParticles, void* pContext)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::COPRenderSprites_Render.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::COPRenderSprites_Render[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pRenderContext, pParticles, pContext);
|
||||
#endif
|
||||
|
||||
@@ -157,7 +157,7 @@ MAKE_HOOK(COPRenderSprites_RenderSpriteCard, S::COPRenderSprites_RenderSpriteCar
|
||||
void* rcx, void* meshBuilder, void* pCtx, SpriteRenderInfo_t& info, int hParticle, void* pSortList, void* pCamera)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::COPRenderSprites_Render.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::COPRenderSprites_Render[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
#endif
|
||||
|
||||
@@ -174,7 +174,7 @@ MAKE_HOOK(COPRenderSprites_RenderTwoSequenceSpriteCard, S::COPRenderSprites_Rend
|
||||
void* rcx, void* meshBuilder, void* pCtx, SpriteRenderInfo_t& info, int hParticle, void* pSortList, void* pCamera)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::COPRenderSprites_Render.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::COPRenderSprites_Render[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ MAKE_HOOK(CParticleProperty_CreateName, S::CParticleProperty_CreateName(), void*
|
||||
void* rcx, const char* pszParticleName, ParticleAttachment_t iAttachType, const char* pszAttachmentName)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CParticleProperty_Create.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CParticleProperty_Create[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pszParticleName, iAttachType, pszAttachmentName);
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,7 @@ MAKE_HOOK(CParticleProperty_CreatePoint, S::CParticleProperty_CreatePoint(), voi
|
||||
void* rcx, const char* pszParticleName, ParticleAttachment_t iAttachType, int iAttachmentPoint, Vector vecOriginOffset)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CParticleProperty_Create.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CParticleProperty_Create[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pszParticleName, iAttachType, iAttachmentPoint, vecOriginOffset);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CPlayerResource_GetPlayerName, S::CPlayerResource_GetPlayerName(), con
|
||||
void* rcx, int iIndex)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CPlayerResource_GetPlayerName.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CPlayerResource_GetPlayerName[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iIndex);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ MAKE_HOOK(CPrediction_RunSimulation, S::CPrediction_RunSimulation(), void,
|
||||
void* rcx, int current_command, float curtime, CUserCmd* cmd, CTFPlayer* localPlayer)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CPrediction_RunSimulation.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CPrediction_RunSimulation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, current_command, curtime, cmd, localPlayer);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CRendering3dView_EnableWorldFog, S::CRendering3dView_EnableWorldFog(),
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CRendering3dView_EnableWorldFog.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CRendering3dView_EnableWorldFog[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CSkyboxView_Enable3dSkyboxFog, S::CSkyboxView_Enable3dSkyboxFog(), voi
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSkyboxView_Enable3dSkyboxFog.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSkyboxView_Enable3dSkyboxFog[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ MAKE_HOOK(CSniperDot_GetRenderingPositions, S::CSniperDot_GetRenderingPositions(
|
||||
void* rcx, CTFPlayer* pPlayer, Vec3& vecAttachment, Vec3& vecEndPos, float& flSize)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pPlayer, vecAttachment, vecEndPos, flSize);
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@ MAKE_HOOK(CBasePlayer_EyePosition, S::CBasePlayer_EyePosition(), Vec3*,
|
||||
void* rcx, void* rdx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, rdx);
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ MAKE_HOOK(CTFPlayer_EyeAngles, S::CTFPlayer_EyeAngles(), Vec3*,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ MAKE_HOOK(CSoundEmitterSystem_EmitSound, S::CSoundEmitterSystem_EmitSound(), voi
|
||||
void* rcx, IRecipientFilter& filter, int entindex, const EmitSound_t& ep)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, filter, entindex, ep);
|
||||
#endif
|
||||
|
||||
@@ -157,7 +157,7 @@ MAKE_HOOK(S_StartDynamicSound, S::S_StartDynamicSound(), int,
|
||||
StartSoundParams_t& params)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(params);
|
||||
#endif
|
||||
|
||||
@@ -173,7 +173,7 @@ MAKE_HOOK(S_StartSound, S::S_StartSound(), int,
|
||||
StartSoundParams_t& params)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(params);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ MAKE_HOOK(CStaticPropMgr_ComputePropOpacity, S::CStaticPropMgr_ComputePropOpacit
|
||||
void* rcx, CStaticProp* pProp)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStaticPropMgr_ComputePropOpacity.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CStaticPropMgr_ComputePropOpacity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pProp);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CStaticPropMgr_DrawStaticProps, S::CStaticPropMgr_DrawStaticProps(), v
|
||||
void* rcx, IClientRenderable** pProps, int count, bool bShadowDepth, bool drawVCollideWireframe)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStaticPropMgr_DrawStaticProps.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CStaticPropMgr_DrawStaticProps[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pProps, count, bShadowDepth, drawVCollideWireframe);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ MAKE_HOOK(CStudioRender_DrawModelStaticProp, U::Memory.GetVFunc(I::StudioRender,
|
||||
void* rcx, const DrawModelState_t& pState, const matrix3x4& modelToWorld, int flags)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStudioRender_DrawModelStaticProp.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CStudioRender_DrawModelStaticProp[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pState, modelToWorld, flags);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ MAKE_HOOK(CStudioRender_SetAlphaModulation, U::Memory.GetVFunc(I::StudioRender,
|
||||
void* rcx, float flAlpha)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStudioRender_SetAlphaModulation.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CStudioRender_SetAlphaModulation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, flAlpha);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ MAKE_HOOK(CStudioRender_SetColorModulation, U::Memory.GetVFunc(I::StudioRender,
|
||||
void* rcx, const float* pColor)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStudioRender_SetColorModulation.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CStudioRender_SetColorModulation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pColor);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CTFBadgePanel_SetupBadge, S::CTFBadgePanel_SetupBadge(), void,
|
||||
void* rcx, const IMatchGroupDescription* pMatchDesc, /*const*/ LevelInfo_t& levelInfo, const CSteamID& steamID)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFBadgePanel_SetupBadge.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFBadgePanel_SetupBadge[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pMatchDesc, levelInfo, steamID);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ MAKE_HOOK(CTFClientScoreBoardDialog_UpdatePlayerAvatar, S::CTFClientScoreBoardDi
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ MAKE_HOOK(CTFMatchSummary_UpdatePlayerAvatar, S::CTFMatchSummary_UpdatePlayerAva
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ MAKE_HOOK(CTFHudMannVsMachineScoreboard_UpdatePlayerAvatar, S::CTFHudMannVsMachi
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
|
||||
@@ -57,7 +57,7 @@ MAKE_HOOK(CTFHudMatchStatus_UpdatePlayerAvatar, S::CTFHudMatchStatus_UpdatePlaye
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ MAKE_HOOK(SectionedListPanel_SetItemFgColor, S::SectionedListPanel_SetItemFgColo
|
||||
void* rcx, int itemID, Color_t color)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, itemID, color);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ MAKE_HOOK(CTFGCClientSystem_UpdateAssignedLobby, S::CTFGCClientSystem_UpdateAssi
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFGCClientSystem_UpdateAssignedLobby.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFGCClientSystem_UpdateAssignedLobby[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ MAKE_HOOK(CTFHudDeathNotice_AddAdditionalMsg, S::CTFHudDeathNotice_AddAdditional
|
||||
void* rcx, int iKillerID, int iVictimID, const char* pMsgKey)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFHudDeathNotice_AddAdditionalMsg.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFHudDeathNotice_AddAdditionalMsg[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iKillerID, iVictimID, pMsgKey);
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@ MAKE_HOOK(CLocalizedStringTable_Find, S::CLocalizedStringTable_Find(), wchar_t*,
|
||||
void* rcx, const char* pName)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFHudDeathNotice_AddAdditionalMsg.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFHudDeathNotice_AddAdditionalMsg[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pName);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CTFInput_ApplyMouse, S::CTFInput_ApplyMouse(), void,
|
||||
void* rcx, QAngle& viewangles, CUserCmd* cmd, float mouse_x, float mouse_y)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFInput_ApplyMouse.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFInput_ApplyMouse[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, viewangles, cmd, mouse_x, mouse_y);
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@ MAKE_HOOK(CTFInput_CAM_CapYaw, S::CTFInput_CAM_CapYaw(), float,
|
||||
void* rcx, float fVal)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFInput_ApplyMouse.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFInput_ApplyMouse[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, fVal);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CTFPlayerInventory_GetMaxItemCount, S::CTFPlayerInventory_GetMaxItemCo
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerInventory_GetMaxItemCount.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayerInventory_GetMaxItemCount[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ MAKE_HOOK(CTFPlayerPanel_GetTeam, S::CTFPlayerPanel_GetTeam(), int,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ MAKE_HOOK(CTFTeamStatusPlayerPanel_Update, S::CTFTeamStatusPlayerPanel_Update(),
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@ MAKE_HOOK(vgui_Panel_SetBgColor, S::vgui_Panel_SetBgColor(), void,
|
||||
void* rcx, Color_t color)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, color);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ MAKE_HOOK(CTFPlayerShared_InCond, S::CTFPlayerShared_InCond(), bool,
|
||||
void* rcx, ETFCond nCond)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerShared_InCond.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayerShared_InCond[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, nCond);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(CTFPlayerShared_IsPlayerDominated, S::CTFPlayerShared_IsPlayerDominate
|
||||
void* rcx, int index)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerShared_IsPlayerDominated.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayerShared_IsPlayerDominated[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, index);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CTFPlayer_AvoidPlayers, S::CTFPlayer_AvoidPlayers(), void,
|
||||
void* rcx, CUserCmd* pCmd)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_AvoidPlayers.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_AvoidPlayers[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pCmd);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ MAKE_HOOK(CTFPlayer_BRenderAsZombie, S::CTFPlayer_BRenderAsZombie(), bool,
|
||||
void* rcx, bool bWeaponsCheck)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_BRenderAsZombie.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_BRenderAsZombie[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, bWeaponsCheck);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CTFPlayer_BuildTransformations, S::CTFPlayer_BuildTransformations(), v
|
||||
void* rcx, CStudioHdr* hdr, Vector* pos, Quaternion q[], const matrix3x4& cameraTransform, int boneMask, void* boneComputed)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_BuildTransformations.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_BuildTransformations[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, hdr, pos, q, cameraTransform, boneMask, boneComputed);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CTFPlayer_DoAnimationEvent, S::CTFPlayer_DoAnimationEvent(), void,
|
||||
void* rcx, PlayerAnimEvent_t event, int nData)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_DoAnimationEvent.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_DoAnimationEvent[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, event, nData);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ MAKE_HOOK(CTFPlayer_IsPlayerClass, S::CTFPlayer_IsPlayerClass(), bool,
|
||||
void* rcx, int iClass)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_IsPlayerClass.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_IsPlayerClass[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iClass);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ MAKE_HOOK(CTFPlayer_ShouldDraw, S::CTFPlayer_ShouldDraw(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ MAKE_HOOK(CBasePlayer_ShouldDrawThisPlayer, S::CBasePlayer_ShouldDrawThisPlayer(
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ MAKE_HOOK(CViewRender_DrawViewModels, S::CViewRender_DrawViewModels(), void,
|
||||
void* rcx, const CViewSetup& viewRender, bool drawViewmodel)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, viewRender, drawViewmodel);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ MAKE_HOOK(CTFPlayer_UpdateStepSound, S::CTFPlayer_UpdateStepSound(), void,
|
||||
void* rcx, void* psurface, const Vec3& vecOrigin, const Vec3& vecVelocity)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_UpdateStepSound.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFPlayer_UpdateStepSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, psurface, vecOrigin, vecVelocity);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CTFRagdoll_CreateTFRagdoll, S::CTFRagdoll_CreateTFRagdoll(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFRagdoll_CreateTFRagdoll.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFRagdoll_CreateTFRagdoll[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ MAKE_HOOK(CTFWeaponBase_CalcIsAttackCritical, S::CTFWeaponBase_CalcIsAttackCriti
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFWeaponBase_CalcIsAttackCritical.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFWeaponBase_CalcIsAttackCritical[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CTFWeaponBase_GetShootSound, S::CTFWeaponBase_GetShootSound(), const c
|
||||
void* rcx, int iIndex)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFWeaponBase_GetShootSound.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CTFWeaponBase_GetShootSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iIndex);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CThirdPersonManager_Update, S::CThirdPersonManager_Update(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CThirdPersonManager_Update.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CThirdPersonManager_Update[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
}
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CViewRender_DrawUnderwaterOverlay, S::CViewRender_DrawUnderwaterOverla
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_DrawUnderwaterOverlay.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CViewRender_DrawUnderwaterOverlay[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ MAKE_HOOK(CViewRender_LevelInit, U::Memory.GetVFunc(I::ViewRender, 1), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_LevelInit.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CViewRender_LevelInit[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CViewRender_PerformScreenOverlay, S::CViewRender_PerformScreenOverlay(
|
||||
void* rcx, int x, int y, int w, int h)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_PerformScreenOverlay.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CViewRender_PerformScreenOverlay[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, x, y, w, h);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(CViewRender_RenderView, U::Memory.GetVFunc(I::ViewRender, 6), void,
|
||||
void* rcx, const CViewSetup& view, ClearFlags_t nClearFlags, RenderViewInfo_t whatToDraw)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_RenderView.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::CViewRender_RenderView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, view, nClearFlags, whatToDraw);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ static std::vector<std::function<void()>> vDynamic = {
|
||||
},
|
||||
[&]()
|
||||
{
|
||||
auto sRegex = R"(\\\{rgb:(\d+),(\d+),(\d+)\})";
|
||||
auto sRegex = R"(\\\{rgb:(\d+)?(?:,(\d+))?(?:,(\d+))?\})";
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -121,16 +121,17 @@ static std::vector<std::function<void()>> vDynamic = {
|
||||
if (match.size() != 4)
|
||||
break;
|
||||
|
||||
int r = std::clamp(std::stoi(match[1]), 0, 255);
|
||||
int g = std::clamp(std::stoi(match[2]), 0, 255);
|
||||
int b = std::clamp(std::stoi(match[3]), 0, 255);
|
||||
int r = !match[1].str().empty() ? std::stoi(match[1]) : 255;
|
||||
int g = !match[2].str().empty() ? std::stoi(match[2]) : 255;
|
||||
int b = !match[3].str().empty() ? std::stoi(match[3]) : 255;
|
||||
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"\x7""{:02x}{:02x}{:02x}", r, g, b));
|
||||
Color_t tColor; tColor.SetRGB(r, g, b);
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHex()));
|
||||
}
|
||||
},
|
||||
[&]()
|
||||
{
|
||||
auto sRegex = R"(\\\{rgba:(\d+),(\d+),(\d+),(\d+)\})";
|
||||
auto sRegex = R"(\\\{rgba:(\d+)?(?:,(\d+))?(?:,(\d+))?(?:,(\d+))?\})";
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -138,17 +139,36 @@ static std::vector<std::function<void()>> vDynamic = {
|
||||
if (match.size() != 5)
|
||||
break;
|
||||
|
||||
int r = std::clamp(std::stoi(match[1]), 0, 255);
|
||||
int g = std::clamp(std::stoi(match[2]), 0, 255);
|
||||
int b = std::clamp(std::stoi(match[3]), 0, 255);
|
||||
int a = std::clamp(std::stoi(match[4]), 0, 255);
|
||||
int r = !match[1].str().empty() ? std::stoi(match[1]) : 255;
|
||||
int g = !match[2].str().empty() ? std::stoi(match[2]) : 255;
|
||||
int b = !match[3].str().empty() ? std::stoi(match[3]) : 255;
|
||||
int a = !match[4].str().empty() ? std::stoi(match[4]) : 255;
|
||||
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"\x8""{:02x}{:02x}{:02x}{:02x}", r, g, b, a));
|
||||
Color_t tColor; tColor.SetRGB(r, g, b, a);
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHexA()));
|
||||
}
|
||||
},
|
||||
[&]()
|
||||
{
|
||||
auto sRegex = R"(\\\{hsv:(?:(\d+)|(\d+),(\d+),(\d+))\})";
|
||||
auto sRegex = R"(\\\{hsv:(\d+)?(?:,(\d+))?(?:,(\d+))?\})";
|
||||
|
||||
while (true)
|
||||
{
|
||||
std::smatch match; std::regex_search(sCmdString, match, std::regex(sRegex));
|
||||
if (match.size() != 4)
|
||||
break;
|
||||
|
||||
int h = !match[1].str().empty() ? std::stoi(match[1]) : 0;
|
||||
int s = !match[2].str().empty() ? std::stoi(match[2]) : 100;
|
||||
int v = !match[3].str().empty() ? std::stoi(match[3]) : 100;
|
||||
|
||||
Color_t tColor; tColor.SetHSV(h, s, v);
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHex()));
|
||||
}
|
||||
},
|
||||
[&]()
|
||||
{
|
||||
auto sRegex = R"(\\\{hsva:(\d+)?(?:,(\d+))?(?:,(\d+))?(?:,(\d+))?\})";
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -156,53 +176,13 @@ static std::vector<std::function<void()>> vDynamic = {
|
||||
if (match.size() != 5)
|
||||
break;
|
||||
|
||||
int h, s, v;
|
||||
if (!match[1].str().empty())
|
||||
{
|
||||
h = std::clamp(std::stoi(match[1]), 0, 360);
|
||||
s = 100;
|
||||
v = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
h = std::clamp(std::stoi(match[2]), 0, 360);
|
||||
s = std::clamp(std::stoi(match[3]), 0, 100);
|
||||
v = std::clamp(std::stoi(match[4]), 0, 100);
|
||||
}
|
||||
int h = !match[1].str().empty() ? std::stoi(match[1]) : 0;
|
||||
int s = !match[2].str().empty() ? std::stoi(match[2]) : 100;
|
||||
int v = !match[3].str().empty() ? std::stoi(match[3]) : 100;
|
||||
int a = !match[4].str().empty() ? std::stoi(match[4]) : 255;
|
||||
|
||||
int r, g, b;
|
||||
{
|
||||
float s2 = s / 100.f;
|
||||
float v2 = v / 100.f;
|
||||
|
||||
float r2, g2, b2;
|
||||
if (s2 == 0)
|
||||
r2 = g2 = b2 = v2;
|
||||
else
|
||||
{
|
||||
float h2 = h / 60.f;
|
||||
int i = floor(h2);
|
||||
float f = h2 - i;
|
||||
float p = v2 * (1 - s2);
|
||||
float q = v2 * (1 - f * s2);
|
||||
float t = v2 * (1 - (1 - f) * s2);
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: r2 = v2; g2 = t; b2 = p; break;
|
||||
case 1: r2 = q; g2 = v2; b2 = p; break;
|
||||
case 2: r2 = p; g2 = v2; b2 = t; break;
|
||||
case 3: r2 = p; g2 = q; b2 = v2; break;
|
||||
case 4: r2 = t; g2 = p; b2 = v2; break;
|
||||
default: r2 = v2; g2 = p; b2 = q; break;
|
||||
}
|
||||
}
|
||||
r = std::clamp(r2 * 255.f, 0.f, 255.f);
|
||||
g = std::clamp(g2 * 255.f, 0.f, 255.f);
|
||||
b = std::clamp(b2 * 255.f, 0.f, 255.f);
|
||||
}
|
||||
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"\x7""{:02x}{:02x}{:02x}", r, g, b));
|
||||
Color_t tColor; tColor.SetHSV(h, s, v, a);
|
||||
sCmdString = sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHexA()));
|
||||
}
|
||||
},
|
||||
[&]()
|
||||
@@ -230,6 +210,11 @@ static std::vector<std::function<void()>> vDynamic = {
|
||||
MAKE_HOOK(Cbuf_ExecuteCommand, S::Cbuf_ExecuteCommand(), void,
|
||||
CCommand& args, cmd_source_t source)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::Cbuf_ExecuteCommand[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, ray, fMask, pTraceFilter, pTrace);
|
||||
#endif
|
||||
|
||||
if (args.ArgC())
|
||||
{
|
||||
std::string sCommand = args[0];
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(ClientModeTFNormal_BIsFriendOrPartyMember, S::ClientModeTFNormal_BIsFr
|
||||
void* rcx, CBaseEntity* pEntity)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::ClientModeTFNormal_BIsFriendOrPartyMember.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::ClientModeTFNormal_BIsFriendOrPartyMember[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pEntity);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(ClientModeTFNormal_UpdateSteamRichPresence, S::ClientModeTFNormal_Upda
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::ClientModeTFNormal_UpdateSteamRichPresence.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::ClientModeTFNormal_UpdateSteamRichPresence[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(DSP_Process, S::DSP_Process(), void,
|
||||
unsigned int idsp, int* pbfront, int* pbrear, int* pbcenter, int sampleCount)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::DSP_Process.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::DSP_Process[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(idsp, pbfront, pbrear, pbcenter, sampleCount);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ MAKE_HOOK(DoEnginePostProcessing, S::DoEnginePostProcessing(), void,
|
||||
int x, int y, int w, int h, bool bFlashlightIsOn, bool bPostVGui)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::DoEnginePostProcessing.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::DoEnginePostProcessing[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(x, y, w, h, bFlashlightIsOn, bPostVGui);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ MAKE_HOOK(FX_FireBullets, S::FX_FireBullets(), void,
|
||||
void* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::FX_FireBullets.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::FX_FireBullets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pWpn, iPlayer, vecOrigin, vecAngles, iWeapon, iMode, iSeed, flSpread, flDamage, bCritical);
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ MAKE_HOOK(FX_FireBullets_Server, S::FX_FireBullets_Server(), void,
|
||||
void* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::FX_FireBullets.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::FX_FireBullets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pWpn, iPlayer, vecOrigin, vecAngles, iWeapon, iMode, iSeed, flSpread, flDamage, bCritical);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ MAKE_HOOK(GenerateEquipRegionConflictMask, S::GenerateEquipRegionConflictMask(),
|
||||
int iClass, int iUpToSlot, int iIgnoreSlot)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(iClass, iUpToSlot, iIgnoreSlot);
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@ MAKE_HOOK(CTFInventoryManager_GetItemInLoadoutForClass, S::CTFInventoryManager_G
|
||||
void* rcx, int iClass, int iSlot, CSteamID* pID)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iClass, iSlot, pID);
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ MAKE_HOOK(CTFPlayerInventory_VerifyChangedLoadoutsAreValid, S::CTFPlayerInventor
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ MAKE_HOOK(GetClientInterpAmount, S::GetClientInterpAmount(), float,
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::GetClientInterpAmount.Map[DEFAULT_BIND])
|
||||
if (!Vars::Hooks::GetClientInterpAmount[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
|
||||
|
||||
Loaded 100 of 128 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user