mirror of
https://github.com/rei-2/Amalgam
synced 2026-10-10 04:43:09 +08:00
rework how points are handled in projectile aim
This commit is contained in:
@@ -300,17 +300,17 @@ int CAimbotHitscan::CanHit(Target_t& tTarget, CTFPlayer* pLocal, CTFWeaponBase*
|
||||
tTarget.m_vPos = tTarget.m_pEntity->m_vecOrigin();
|
||||
|
||||
// not lag compensated (i assume) so run movesim based on ping
|
||||
MoveStorage tStorage;
|
||||
F::MoveSim.Initialize(tTarget.m_pEntity, tStorage);
|
||||
if (!tStorage.m_bFailed)
|
||||
MoveStorage tMoveStorage;
|
||||
F::MoveSim.Initialize(tTarget.m_pEntity, tMoveStorage);
|
||||
if (!tMoveStorage.m_bFailed)
|
||||
{
|
||||
for (int i = 1 - TIME_TO_TICKS(F::Backtrack.GetReal()); i <= 0; i++)
|
||||
{
|
||||
F::MoveSim.RunTick(tStorage);
|
||||
tTarget.m_vPos = tStorage.m_vPredictedOrigin;
|
||||
F::MoveSim.RunTick(tMoveStorage);
|
||||
tTarget.m_vPos = tMoveStorage.m_vPredictedOrigin;
|
||||
}
|
||||
}
|
||||
F::MoveSim.Restore(tStorage);
|
||||
F::MoveSim.Restore(tMoveStorage);
|
||||
|
||||
float flBoneScale = std::max(Vars::Aimbot::Hitscan::BoneSizeMinimumScale.Value, Vars::Aimbot::Hitscan::MultipointScale.Value / 100.f);
|
||||
float flBoneSubtract = Vars::Aimbot::Hitscan::BoneSizeSubtract.Value;
|
||||
|
||||
@@ -139,18 +139,18 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
|
||||
|
||||
if ((Vars::Aimbot::Melee::SwingPrediction.Value && iSimTicks || m_iDoubletapTicks) && G::CanPrimaryAttack && pWeapon->m_flSmackTime() < 0.f)
|
||||
{
|
||||
std::unordered_map<int, MoveStorage> mStorage;
|
||||
std::unordered_map<int, MoveStorage> mMoveStorage;
|
||||
|
||||
F::MoveSim.Initialize(pLocal, mStorage[I::EngineClient->GetLocalPlayer()], false, !m_iDoubletapTicks);
|
||||
F::MoveSim.Initialize(pLocal, mMoveStorage[I::EngineClient->GetLocalPlayer()], false, !m_iDoubletapTicks);
|
||||
for (auto& tTarget : vTargets)
|
||||
F::MoveSim.Initialize(tTarget.m_pEntity, mStorage[tTarget.m_pEntity->entindex()], false);
|
||||
F::MoveSim.Initialize(tTarget.m_pEntity, mMoveStorage[tTarget.m_pEntity->entindex()], false);
|
||||
|
||||
int iMax = std::max(iSimTicks, m_iDoubletapTicks);
|
||||
int iTicks = iMax; bool bSwung = false;
|
||||
for (int i = 0; i < iTicks; i++) // intended for plocal to collide with targets
|
||||
{
|
||||
{
|
||||
auto& tStorage = mStorage[I::EngineClient->GetLocalPlayer()];
|
||||
auto& tMoveStorage = mMoveStorage[I::EngineClient->GetLocalPlayer()];
|
||||
|
||||
if (!bSwung && (!m_iDoubletapTicks || Vars::Doubletap::AntiWarp.Value && pLocal->m_hGroundEntity() || iMax - i <= iSwingTicks))
|
||||
{
|
||||
@@ -160,18 +160,18 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
|
||||
|
||||
if (pLocal->InCond(TF_COND_SHIELD_CHARGE))
|
||||
{ // demo charge fix for swing pred
|
||||
tStorage.m_MoveData.m_flMaxSpeed = tStorage.m_MoveData.m_flClientMaxSpeed = SDK::MaxSpeed(pLocal, false, true);
|
||||
pLocal->m_flMaxspeed() = tStorage.m_MoveData.m_flMaxSpeed;
|
||||
tMoveStorage.m_MoveData.m_flMaxSpeed = tMoveStorage.m_MoveData.m_flClientMaxSpeed = SDK::MaxSpeed(pLocal, false, true);
|
||||
pLocal->m_flMaxspeed() = tMoveStorage.m_MoveData.m_flMaxSpeed;
|
||||
pLocal->RemoveCond(TF_COND_SHIELD_CHARGE);
|
||||
}
|
||||
}
|
||||
if (m_iDoubletapTicks && Vars::Doubletap::AntiWarp.Value && pLocal->m_hGroundEntity())
|
||||
F::Ticks.AntiWarp(pLocal, pCmd->viewangles.y, tStorage.m_MoveData.m_flForwardMove, tStorage.m_MoveData.m_flSideMove, iMax - i - 1);
|
||||
F::Ticks.AntiWarp(pLocal, pCmd->viewangles.y, tMoveStorage.m_MoveData.m_flForwardMove, tMoveStorage.m_MoveData.m_flSideMove, iMax - i - 1);
|
||||
|
||||
F::MoveSim.RunTick(tStorage);
|
||||
F::MoveSim.RunTick(tMoveStorage);
|
||||
m_mRecordMap[I::EngineClient->GetLocalPlayer()].emplace_front(
|
||||
pLocal->m_flSimulationTime() + TICKS_TO_TIME(i + 1),
|
||||
tStorage.m_MoveData.m_vecAbsOrigin,
|
||||
tMoveStorage.m_MoveData.m_vecAbsOrigin,
|
||||
pLocal->m_vecMins(), pLocal->m_vecMaxs()
|
||||
);
|
||||
}
|
||||
@@ -180,26 +180,26 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
|
||||
{
|
||||
for (auto& tTarget : vTargets)
|
||||
{
|
||||
auto& tStorage = mStorage[tTarget.m_pEntity->entindex()];
|
||||
if (tStorage.m_bFailed)
|
||||
auto& tMoveStorage = mMoveStorage[tTarget.m_pEntity->entindex()];
|
||||
if (tMoveStorage.m_bFailed)
|
||||
continue;
|
||||
|
||||
F::MoveSim.RunTick(tStorage);
|
||||
F::MoveSim.RunTick(tMoveStorage);
|
||||
m_mRecordMap[tTarget.m_pEntity->entindex()].emplace_front(
|
||||
!Vars::Aimbot::Melee::SwingPredictLag.Value || tStorage.m_bPredictNetworked ? tTarget.m_pEntity->m_flSimulationTime() + TICKS_TO_TIME(i + 1) : 0.f,
|
||||
Vars::Aimbot::Melee::SwingPredictLag.Value ? tStorage.m_vPredictedOrigin : tStorage.m_MoveData.m_vecAbsOrigin,
|
||||
!Vars::Aimbot::Melee::SwingPredictLag.Value || tMoveStorage.m_bPredictNetworked ? tTarget.m_pEntity->m_flSimulationTime() + TICKS_TO_TIME(i + 1) : 0.f,
|
||||
Vars::Aimbot::Melee::SwingPredictLag.Value ? tMoveStorage.m_vPredictedOrigin : tMoveStorage.m_MoveData.m_vecAbsOrigin,
|
||||
tTarget.m_pEntity->m_vecMins(), tTarget.m_pEntity->m_vecMaxs()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_vEyePos = mStorage[I::EngineClient->GetLocalPlayer()].m_MoveData.m_vecAbsOrigin + pLocal->m_vecViewOffset();
|
||||
m_vEyePos = mMoveStorage[I::EngineClient->GetLocalPlayer()].m_MoveData.m_vecAbsOrigin + pLocal->m_vecViewOffset();
|
||||
m_flRange = pWeapon->GetSwingRange();
|
||||
|
||||
if (Vars::Visuals::Simulation::SwingLines.Value && Vars::Visuals::Simulation::PlayerPath.Value)
|
||||
{
|
||||
for (auto& [iIndex, tStorage] : mStorage)
|
||||
m_mPaths[iIndex] = tStorage.m_vPath;
|
||||
for (auto& [iIndex, tMoveStorage] : mMoveStorage)
|
||||
m_mPaths[iIndex] = tMoveStorage.m_vPath;
|
||||
|
||||
const bool bAlwaysDraw = !Vars::Aimbot::General::AutoShoot.Value || Vars::Debug::Info.Value;
|
||||
if (bAlwaysDraw)
|
||||
@@ -218,8 +218,8 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& [_, tStorage] : mStorage)
|
||||
F::MoveSim.Restore(tStorage);
|
||||
for (auto& [_, tMoveStorage] : mMoveStorage)
|
||||
F::MoveSim.Restore(tMoveStorage);
|
||||
}
|
||||
|
||||
m_bShouldSwing = m_iDoubletapTicks <= iSwingTicks || Vars::Doubletap::AntiWarp.Value && pLocal->m_hGroundEntity();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,26 +2,18 @@
|
||||
#include "../../../SDK/SDK.h"
|
||||
|
||||
#include "../AimbotGlobal/AimbotGlobal.h"
|
||||
#include "../../Simulation/MovementSimulation/MovementSimulation.h"
|
||||
#include "../../Simulation/ProjectileSimulation/ProjectileSimulation.h"
|
||||
|
||||
Enum(PointType, None = 0, Regular = 1 << 0, Obscured = 1 << 1, ObscuredExtra = 1 << 2, ObscuredMulti = 1 << 3)
|
||||
Enum(PointType, None = 0, Out = 1 << 0, In = 1 << 1, Out2 = 1 << 2, In2 = 1 << 3)
|
||||
Enum(Calculated, Pending, Good, Time, Bad)
|
||||
|
||||
struct Solution_t
|
||||
{
|
||||
float m_flPitch = 0.f;
|
||||
float m_flYaw = 0.f;
|
||||
float m_flTime = 0.f;
|
||||
int m_iCalculated = CalculatedEnum::Pending;
|
||||
};
|
||||
struct Point_t
|
||||
{
|
||||
Vec3 m_vPoint = {};
|
||||
Solution_t m_tSolution = {};
|
||||
};
|
||||
struct Info_t
|
||||
{
|
||||
CTFPlayer* m_pLocal = nullptr;
|
||||
CTFWeaponBase* m_pWeapon = nullptr;
|
||||
Target_t* m_pTarget = nullptr;
|
||||
CBaseEntity* m_pProjectile = nullptr;
|
||||
|
||||
Vec3 m_vLocalEye = {};
|
||||
Vec3 m_vTargetEye = {};
|
||||
@@ -39,31 +31,67 @@ struct Info_t
|
||||
float m_flOffsetTime = 0.f;
|
||||
int m_iSplashCount = 0;
|
||||
int m_iSplashMode = 0;
|
||||
float m_flPrimeTime = 0;
|
||||
int m_iPrimeTime = 0;
|
||||
int m_iArmTime = 0;
|
||||
};
|
||||
|
||||
struct Solution_t
|
||||
{
|
||||
float m_flPitch = 0.f;
|
||||
float m_flYaw = 0.f;
|
||||
float m_flTime = 0.f;
|
||||
int m_iCalculated = CalculatedEnum::Pending;
|
||||
};
|
||||
struct Point_t
|
||||
{
|
||||
Vec3 m_vPoint = {};
|
||||
Solution_t m_tSolution = {};
|
||||
};
|
||||
|
||||
struct History_t
|
||||
{
|
||||
Vec3 m_vOrigin;
|
||||
int m_iSimtime;
|
||||
};
|
||||
struct Direct_t : History_t
|
||||
{
|
||||
float m_flPitch;
|
||||
float m_flYaw;
|
||||
float m_flTime;
|
||||
Vec3 m_vPoint;
|
||||
int m_iPriority;
|
||||
};
|
||||
struct Splash_t : History_t
|
||||
{
|
||||
float m_flTimeTo;
|
||||
};
|
||||
|
||||
class CAimbotProjectile
|
||||
{
|
||||
private:
|
||||
std::unordered_map<int, Vec3> GetDirectPoints(Target_t& tTarget, CBaseEntity* pProjectile = nullptr);
|
||||
std::vector<Point_t> GetSplashPoints(Target_t& tTarget, std::vector<std::pair<Vec3, int>>& vSpherePoints, int iSimTime);
|
||||
void SetupSplashPoints(Target_t& tTarget, std::vector<std::pair<Vec3, int>>& vSpherePoints, std::vector<Vec3>& vSimplePoints);
|
||||
std::vector<Point_t> GetSplashPointsSimple(Target_t& tTarget, std::vector<Vec3>& vSpherePoints, int iSimTime);
|
||||
std::unordered_map<int, Vec3> GetDirectPoints();
|
||||
std::vector<Point_t> GetSplashPoints(Vec3 vOrigin, std::vector<std::pair<Vec3, int>>& vSpherePoints, int iSimTime);
|
||||
void SetupSplashPoints(Vec3& vPos, std::vector<std::pair<Vec3, int>>& vSpherePoints, std::vector<Vec3>& vSimplePoints);
|
||||
std::vector<Point_t> GetSplashPointsSimple(Vec3 vOrigin, std::vector<Vec3>& vSpherePoints, int iSimTime);
|
||||
|
||||
void CalculateAngle(const Vec3& vLocalPos, const Vec3& vTargetPos, int iSimTime, Solution_t& tOut, bool bAccuracy = true);
|
||||
bool TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, Target_t& tTarget, Vec3& vPoint, Vec3& vAngles, int iSimTime, bool bSplash, bool* pHitSolid = nullptr, std::vector<Vec3>* pProjectilePath = nullptr);
|
||||
void CalculateAngle(const Vec3& vLocalPos, const Vec3& vTargetPos, int iSimTime, Solution_t& tOut, bool bAccuracy = true, int iTolerance = -1);
|
||||
bool TestAngle(const Vec3& vPoint, const Vec3& vAngles, int iSimTime, bool bSplash, bool bSecondTest = false);
|
||||
|
||||
bool HandlePoint(const Vec3& vOrigin, int iSimTime, float flPitch, float flYaw, float flTime, const Vec3& vPoint, bool bSplash = false);
|
||||
bool HandleDirect(std::vector<Direct_t>& vDirectHistory);
|
||||
bool HandleSplash(std::vector<Splash_t>& vSplashHistory);
|
||||
|
||||
int CanHit(Target_t& tTarget, CTFPlayer* pLocal, CTFWeaponBase* pWeapon, bool bVisuals = true);
|
||||
bool RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
|
||||
|
||||
bool CanHit(Target_t& tTarget, CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pProjectile);
|
||||
bool TestAngle(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pProjectile, Target_t& tTarget, Vec3& vPoint, Vec3& vAngles, int iSimTime, bool bSplash, std::vector<Vec3>* pProjectilePath = nullptr);
|
||||
bool TestAngle(CBaseEntity* pProjectile, const Vec3& vPoint, Vec3& vAngles, int iSimTime, bool bSplash);
|
||||
|
||||
bool Aim(Vec3 vCurAngle, Vec3 vToAngle, Vec3& vOut, int iMethod = Vars::Aimbot::General::AimType.Value);
|
||||
bool Aim(const Vec3& vCurAngle, const Vec3& vToAngle, Vec3& vOut, int iMethod = Vars::Aimbot::General::AimType.Value);
|
||||
void Aim(CUserCmd* pCmd, Vec3& vAngle, int iMethod = Vars::Aimbot::General::AimType.Value);
|
||||
|
||||
Info_t m_tInfo = {};
|
||||
MoveStorage m_tMoveStorage = {};
|
||||
ProjectileInfo m_tProjInfo = {};
|
||||
|
||||
bool m_bLastTickHeld = false;
|
||||
|
||||
@@ -72,6 +100,13 @@ private:
|
||||
std::vector<Vec3> m_vProjectilePath = {};
|
||||
std::vector<DrawBox_t> m_vBoxes = {};
|
||||
|
||||
Vec3 m_vAngleTo = {};
|
||||
Vec3 m_vPredicted = {};
|
||||
Vec3 m_vTarget = {};
|
||||
|
||||
int m_iResult = false;
|
||||
bool m_bVisuals = true;
|
||||
|
||||
public:
|
||||
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
|
||||
float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pPlayer);
|
||||
|
||||
@@ -25,7 +25,7 @@ static inline bool ShouldTarget(CBaseEntity* pProjectile, CTFPlayer* pLocal)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CAutoAirblast::CanAirblastEntity(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pEntity, Vec3& vAngle)
|
||||
bool CAutoAirblast::CanAirblastEntity(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pEntity, const Vec3& vAngle)
|
||||
{
|
||||
auto flRadius = SDK::AttribHookValue(1, "deflection_size_multiplier", pWeapon) * 128.f;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ class CAutoAirblast
|
||||
{
|
||||
public:
|
||||
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
|
||||
bool CanAirblastEntity(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pEntity, Vec3& vAngle);
|
||||
bool CanAirblastEntity(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pEntity, const Vec3& vAngle);
|
||||
};
|
||||
|
||||
ADD_FEATURE(CAutoAirblast, AutoAirblast);
|
||||
@@ -39,22 +39,22 @@ bool CAutoRocketJump::SetAngles(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
|
||||
//float flOffset = pLocal->m_vecMaxs().x;
|
||||
float flOffset = sqrtf(2 * powf(vOffset.y, 2.f) + powf(vOffset.z, 2.f));
|
||||
bool bShouldReturn = true;
|
||||
MoveStorage tStorage;
|
||||
if (F::MoveSim.Initialize(pLocal, tStorage, false))
|
||||
MoveStorage tMoveStorage;
|
||||
if (F::MoveSim.Initialize(pLocal, tMoveStorage, false))
|
||||
{
|
||||
for (int n = 1; n < 10; n++)
|
||||
{
|
||||
F::MoveSim.RunTick(tStorage);
|
||||
F::MoveSim.RunTick(tMoveStorage);
|
||||
if (!pLocal->IsOnGround() || pLocal->IsSwimming())
|
||||
continue;
|
||||
|
||||
Vec3 vForward = tStorage.m_MoveData.m_vecVelocity.Normalized2D();
|
||||
vPoint = tStorage.m_MoveData.m_vecAbsOrigin - vForward * flOffset; //- Vec3(0, 0, 20);
|
||||
Vec3 vForward = tMoveStorage.m_MoveData.m_vecVelocity.Normalized2D();
|
||||
vPoint = tMoveStorage.m_MoveData.m_vecAbsOrigin - vForward * flOffset; //- Vec3(0, 0, 20);
|
||||
bShouldReturn = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
F::MoveSim.Restore(tStorage);
|
||||
F::MoveSim.Restore(tMoveStorage);
|
||||
if (bShouldReturn)
|
||||
return false;
|
||||
}
|
||||
@@ -132,8 +132,6 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
m_iFrame = -1;
|
||||
return;
|
||||
}
|
||||
else if (Vars::Misc::Movement::AutoRocketJump.Value || Vars::Misc::Movement::AutoCTap.Value)
|
||||
pCmd->buttons &= ~IN_ATTACK2; // fix for retarded issue
|
||||
|
||||
if (m_iFrame == -1 && (bCurrGrounded && bBeggars ? G::Attacking == 1 : G::CanPrimaryAttack || G::Reloading)
|
||||
&& SetAngles(pLocal, pWeapon, pCmd))
|
||||
@@ -141,18 +139,18 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
bool bWillHit = false;
|
||||
if (Vars::Misc::Movement::AutoRocketJump.Value || Vars::Misc::Movement::AutoCTap.Value)
|
||||
{
|
||||
MoveStorage tStorage;
|
||||
MoveStorage tMoveStorage;
|
||||
ProjectileInfo tProjInfo = {};
|
||||
|
||||
bool bProjSimSetup = F::ProjSim.GetInfo(pLocal, pWeapon, m_vAngles, tProjInfo, ProjSimEnum::Trace | ProjSimEnum::InitCheck | ProjSimEnum::NoRandomAngles) && F::ProjSim.Initialize(tProjInfo);
|
||||
bool bMoveSimSetup = F::MoveSim.Initialize(pLocal, tStorage, false); // do move sim after to not mess with proj sim
|
||||
bool bMoveSimSetup = F::MoveSim.Initialize(pLocal, tMoveStorage, false); // do move sim after to not mess with proj sim
|
||||
if (bMoveSimSetup && bProjSimSetup)
|
||||
{
|
||||
Vec3 vOriginal = F::ProjSim.GetOrigin();
|
||||
int iSkip = bCurrGrounded ? Vars::Misc::Movement::AutoRocketJumpSkipGround.Value : Vars::Misc::Movement::AutoRocketJumpSkipAir.Value;
|
||||
for (int n = 1; n < 10; n++)
|
||||
{
|
||||
F::MoveSim.RunTick(tStorage);
|
||||
F::MoveSim.RunTick(tMoveStorage);
|
||||
if (n <= iSkip)
|
||||
continue;
|
||||
|
||||
@@ -179,7 +177,7 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
return vPoint.DistTo(vPos) < TF_ROCKET_RADIUS_FOR_RJS && SDK::VisPosWorld(pLocal, pLocal, vPoint, vOrigin + pLocal->m_vecViewOffset(), MASK_SHOT);
|
||||
};
|
||||
|
||||
bWillHit = WillHit(pLocal, tStorage.m_MoveData.m_vecAbsOrigin, trace.endpos + trace.plane.normal);
|
||||
bWillHit = WillHit(pLocal, tMoveStorage.m_MoveData.m_vecAbsOrigin, trace.endpos + trace.plane.normal);
|
||||
if (bWillHit)
|
||||
{
|
||||
m_iDelay = n;
|
||||
@@ -194,7 +192,7 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
//G::LineStorage.clear(); G::BoxStorage.clear();
|
||||
Vec3 vAngles = Math::VectorAngles(trace.plane.normal);
|
||||
G::BoxStorage.emplace_back(trace.endpos + trace.plane.normal, Vec3(-1.f, -1.f, -1.f), Vec3(1.f, 1.f, 1.f), vAngles, I::GlobalVars->curtime + 5.f, Color_t(), Color_t(0, 0, 0, 0), true);
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(tStorage.m_MoveData.m_vecAbsOrigin + pLocal->m_vecViewOffset(), trace.endpos + trace.plane.normal), I::GlobalVars->curtime + 5.f, Color_t(), true);
|
||||
G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(tMoveStorage.m_MoveData.m_vecAbsOrigin + pLocal->m_vecViewOffset(), trace.endpos + trace.plane.normal), I::GlobalVars->curtime + 5.f, Color_t(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,7 +205,7 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
// break;
|
||||
}
|
||||
}
|
||||
F::MoveSim.Restore(tStorage);
|
||||
F::MoveSim.Restore(tMoveStorage);
|
||||
}
|
||||
|
||||
if (bWillHit)
|
||||
@@ -232,9 +230,6 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_iFrame == -1 && pWeapon->GetWeaponID() == TF_WEAPON_PARTICLE_CANNON && G::OriginalCmd.buttons & IN_ATTACK2)
|
||||
pCmd->buttons |= IN_ATTACK2;
|
||||
}
|
||||
|
||||
if (m_iFrame != -1)
|
||||
@@ -245,7 +240,7 @@ void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* p
|
||||
if (m_iFrame == 1)
|
||||
{
|
||||
if (!bBeggars)
|
||||
pCmd->buttons |= IN_ATTACK;
|
||||
pCmd->buttons |= IN_ATTACK, pCmd->buttons &= ~IN_ATTACK2;
|
||||
|
||||
if (m_bFull)
|
||||
{
|
||||
|
||||
@@ -267,6 +267,7 @@ void CMenu::MenuAimbot(int iTab)
|
||||
if (Section("##Debug Projectile"))
|
||||
{
|
||||
FText("Ground");
|
||||
Divider();
|
||||
FSlider(Vars::Aimbot::Projectile::GroundSamples, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::GroundStraightFuzzyValue, FSliderEnum::Right);
|
||||
FSlider(Vars::Aimbot::Projectile::GroundLowMinimumSamples, FSliderEnum::Left);
|
||||
@@ -276,7 +277,9 @@ void CMenu::MenuAimbot(int iTab)
|
||||
FSlider(Vars::Aimbot::Projectile::GroundMaxChanges, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::GroundMaxChangeTime, FSliderEnum::Right);
|
||||
|
||||
FText("\nAir");
|
||||
Divider();
|
||||
FText("Air");
|
||||
Divider();
|
||||
FSlider(Vars::Aimbot::Projectile::AirSamples, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::AirStraightFuzzyValue, FSliderEnum::Right);
|
||||
FSlider(Vars::Aimbot::Projectile::AirLowMinimumSamples, FSliderEnum::Left);
|
||||
@@ -286,7 +289,9 @@ void CMenu::MenuAimbot(int iTab)
|
||||
FSlider(Vars::Aimbot::Projectile::AirMaxChanges, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::AirMaxChangeTime, FSliderEnum::Right);
|
||||
|
||||
FText("");
|
||||
Divider();
|
||||
FText("General");
|
||||
Divider();
|
||||
FSlider(Vars::Aimbot::Projectile::VelocityAverageCount, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::VerticalShift, FSliderEnum::Right);
|
||||
|
||||
@@ -297,9 +302,12 @@ void CMenu::MenuAimbot(int iTab)
|
||||
FSlider(Vars::Aimbot::Projectile::HuntsmanAdd, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::HuntsmanAddLow, FSliderEnum::Right);
|
||||
FSlider(Vars::Aimbot::Projectile::HuntsmanClamp, FSliderEnum::Left);
|
||||
FToggle(Vars::Aimbot::Projectile::HuntsmanPullPoint, FToggleEnum::Right);
|
||||
SetCursorPosY(GetCursorPosY() + 8);
|
||||
FToggle(Vars::Aimbot::Projectile::HuntsmanPullPoint, FSliderEnum::Left);
|
||||
FToggle(Vars::Aimbot::Projectile::HuntsmanPullNoZ, FToggleEnum::Right);
|
||||
|
||||
Divider();
|
||||
FText("Splash");
|
||||
Divider();
|
||||
FSlider(Vars::Aimbot::Projectile::SplashPointsDirect, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::SplashPointsArc, FSliderEnum::Right);
|
||||
FSlider(Vars::Aimbot::Projectile::SplashCountDirect, FSliderEnum::Left);
|
||||
@@ -310,9 +318,12 @@ void CMenu::MenuAimbot(int iTab)
|
||||
FSlider(Vars::Aimbot::Projectile::SplashNormalSkip, FSliderEnum::Right);
|
||||
FDropdown(Vars::Aimbot::Projectile::SplashMode, FDropdownEnum::Left);
|
||||
FDropdown(Vars::Aimbot::Projectile::RocketSplashMode, FDropdownEnum::Right, 0, &Hovered); FTooltip("Special splash type for rockets, more expensive", Hovered);
|
||||
FToggle(Vars::Aimbot::Projectile::SplashGrates);
|
||||
SetCursorPosY(GetCursorPosY() + 8);
|
||||
FToggle(Vars::Aimbot::Projectile::SplashGrates, FSliderEnum::Left);
|
||||
FSlider(Vars::Aimbot::Projectile::Out2NormalCheck, FSliderEnum::Right);
|
||||
|
||||
Divider();
|
||||
FText("Misc");
|
||||
Divider();
|
||||
FSlider(Vars::Aimbot::Projectile::DeltaCount, FSliderEnum::Left);
|
||||
FDropdown(Vars::Aimbot::Projectile::DeltaMode, FDropdownEnum::Right);
|
||||
FDropdown(Vars::Aimbot::Projectile::MovesimFrictionFlags);
|
||||
|
||||
@@ -5,32 +5,32 @@
|
||||
|
||||
static CUserCmd s_tDummyCmd = {};
|
||||
|
||||
void CMovementSimulation::Store(MoveStorage& tStorage)
|
||||
void CMovementSimulation::Store(MoveStorage& tMoveStorage)
|
||||
{
|
||||
auto pMap = tStorage.m_pPlayer->GetPredDescMap();
|
||||
auto pMap = tMoveStorage.m_pPlayer->GetPredDescMap();
|
||||
if (!pMap)
|
||||
return;
|
||||
|
||||
size_t iSize = tStorage.m_pPlayer->GetIntermediateDataSize();
|
||||
tStorage.m_pData = reinterpret_cast<byte*>(I::MemAlloc->Alloc(iSize));
|
||||
size_t iSize = tMoveStorage.m_pPlayer->GetIntermediateDataSize();
|
||||
tMoveStorage.m_pData = reinterpret_cast<byte*>(I::MemAlloc->Alloc(iSize));
|
||||
|
||||
CPredictionCopy copy = { PC_NETWORKED_ONLY, tStorage.m_pData, PC_DATA_PACKED, tStorage.m_pPlayer, PC_DATA_NORMAL };
|
||||
copy.TransferData("MovementSimulationStore", tStorage.m_pPlayer->entindex(), pMap);
|
||||
CPredictionCopy copy = { PC_NETWORKED_ONLY, tMoveStorage.m_pData, PC_DATA_PACKED, tMoveStorage.m_pPlayer, PC_DATA_NORMAL };
|
||||
copy.TransferData("MovementSimulationStore", tMoveStorage.m_pPlayer->entindex(), pMap);
|
||||
}
|
||||
|
||||
void CMovementSimulation::Reset(MoveStorage& tStorage)
|
||||
void CMovementSimulation::Reset(MoveStorage& tMoveStorage)
|
||||
{
|
||||
if (tStorage.m_pData)
|
||||
if (tMoveStorage.m_pData)
|
||||
{
|
||||
auto pMap = tStorage.m_pPlayer->GetPredDescMap();
|
||||
auto pMap = tMoveStorage.m_pPlayer->GetPredDescMap();
|
||||
if (!pMap)
|
||||
return;
|
||||
|
||||
CPredictionCopy copy = { PC_NETWORKED_ONLY, tStorage.m_pPlayer, PC_DATA_NORMAL, tStorage.m_pData, PC_DATA_PACKED };
|
||||
copy.TransferData("MovementSimulationReset", tStorage.m_pPlayer->entindex(), pMap);
|
||||
CPredictionCopy copy = { PC_NETWORKED_ONLY, tMoveStorage.m_pPlayer, PC_DATA_NORMAL, tMoveStorage.m_pData, PC_DATA_PACKED };
|
||||
copy.TransferData("MovementSimulationReset", tMoveStorage.m_pPlayer->entindex(), pMap);
|
||||
|
||||
I::MemAlloc->Free(tStorage.m_pData);
|
||||
tStorage.m_pData = nullptr;
|
||||
I::MemAlloc->Free(tMoveStorage.m_pData);
|
||||
tMoveStorage.m_pData = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,16 +130,16 @@ void CMovementSimulation::Store()
|
||||
|
||||
|
||||
|
||||
bool CMovementSimulation::Initialize(CBaseEntity* pEntity, MoveStorage& tStorage, bool bHitchance, bool bStrafe)
|
||||
bool CMovementSimulation::Initialize(CBaseEntity* pEntity, MoveStorage& tMoveStorage, bool bHitchance, bool bStrafe)
|
||||
{
|
||||
if (!pEntity || !pEntity->IsPlayer() || !pEntity->As<CTFPlayer>()->IsAlive())
|
||||
{
|
||||
tStorage.m_bInitFailed = tStorage.m_bFailed = true;
|
||||
tMoveStorage.m_bInitFailed = tMoveStorage.m_bFailed = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
auto pPlayer = pEntity->As<CTFPlayer>();
|
||||
tStorage.m_pPlayer = pPlayer;
|
||||
tMoveStorage.m_pPlayer = pPlayer;
|
||||
|
||||
// store vars
|
||||
m_bOldInPrediction = I::Prediction->m_bInPrediction;
|
||||
@@ -147,7 +147,7 @@ bool CMovementSimulation::Initialize(CBaseEntity* pEntity, MoveStorage& tStorage
|
||||
m_flOldFrametime = I::GlobalVars->frametime;
|
||||
|
||||
// store restore data
|
||||
Store(tStorage);
|
||||
Store(tMoveStorage);
|
||||
|
||||
// the hacks that make it work
|
||||
I::MoveHelper->SetHost(pPlayer);
|
||||
@@ -174,21 +174,21 @@ bool CMovementSimulation::Initialize(CBaseEntity* pEntity, MoveStorage& tStorage
|
||||
pPlayer->m_hGroundEntity() = nullptr; // fix for velocity.z being set to 0 even if in air
|
||||
}
|
||||
else if (Vars::Misc::Movement::Bunnyhop.Value && G::OriginalCmd.buttons & IN_JUMP)
|
||||
tStorage.m_bBunnyHop = true;
|
||||
tMoveStorage.m_bBunnyHop = true;
|
||||
|
||||
// setup move data
|
||||
if (!SetupMoveData(tStorage))
|
||||
if (!SetupMoveData(tMoveStorage))
|
||||
{
|
||||
tStorage.m_bFailed = true;
|
||||
tMoveStorage.m_bFailed = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
const int iStrafeSamples = tStorage.m_bDirectMove
|
||||
const int iStrafeSamples = tMoveStorage.m_bDirectMove
|
||||
? Vars::Aimbot::Projectile::GroundSamples.Value
|
||||
: Vars::Aimbot::Projectile::AirSamples.Value;
|
||||
|
||||
// calculate strafe if desired
|
||||
bool bCalculated = bStrafe ? StrafePrediction(tStorage, iStrafeSamples) : false;
|
||||
bool bCalculated = bStrafe ? StrafePrediction(tMoveStorage, iStrafeSamples) : false;
|
||||
|
||||
// really hope this doesn't work like shit
|
||||
if (bHitchance && bCalculated && !pPlayer->m_vecVelocity().IsZero() && Vars::Aimbot::Projectile::HitChance.Value)
|
||||
@@ -209,13 +209,13 @@ bool CMovementSimulation::Initialize(CBaseEntity* pEntity, MoveStorage& tStorage
|
||||
|
||||
float flYaw = Math::NormalizeAngle(flYaw1 - flYaw2) / iTicks;
|
||||
flAverageYaw += flYaw;
|
||||
if (tStorage.m_MoveData.m_flMaxSpeed)
|
||||
flYaw *= std::clamp(pRecord1.m_vVelocity.Length2D() / tStorage.m_MoveData.m_flMaxSpeed, 0.f, 1.f);
|
||||
if (tMoveStorage.m_MoveData.m_flMaxSpeed)
|
||||
flYaw *= std::clamp(pRecord1.m_vVelocity.Length2D() / tMoveStorage.m_MoveData.m_flMaxSpeed, 0.f, 1.f);
|
||||
|
||||
if ((i + 1) % iStrafeSamples == 0 || i == iSamples - 1)
|
||||
{
|
||||
flAverageYaw /= i % iStrafeSamples + 1;
|
||||
if (fabsf(tStorage.m_flAverageYaw - flAverageYaw) > 0.5f)
|
||||
if (fabsf(tMoveStorage.m_flAverageYaw - flAverageYaw) > 0.5f)
|
||||
flCurrentChance -= 1.f / ((iSamples - 1) / float(iStrafeSamples) + 1);
|
||||
flAverageYaw = 0.f;
|
||||
}
|
||||
@@ -225,45 +225,45 @@ bool CMovementSimulation::Initialize(CBaseEntity* pEntity, MoveStorage& tStorage
|
||||
{
|
||||
SDK::Output("MovementSimulation", std::format("Hitchance ({}% < {}%)", flCurrentChance * 100, Vars::Aimbot::Projectile::HitChance.Value).c_str(), { 80, 200, 120 }, Vars::Debug::Logging.Value);
|
||||
|
||||
tStorage.m_bFailed = true;
|
||||
tMoveStorage.m_bFailed = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < H::Entities.GetChoke(pPlayer->entindex()); i++)
|
||||
RunTick(tStorage);
|
||||
RunTick(tMoveStorage);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMovementSimulation::SetupMoveData(MoveStorage& tStorage)
|
||||
bool CMovementSimulation::SetupMoveData(MoveStorage& tMoveStorage)
|
||||
{
|
||||
if (!tStorage.m_pPlayer)
|
||||
if (!tMoveStorage.m_pPlayer)
|
||||
return false;
|
||||
|
||||
tStorage.m_MoveData.m_bFirstRunOfFunctions = false;
|
||||
tStorage.m_MoveData.m_bGameCodeMovedPlayer = false;
|
||||
tStorage.m_MoveData.m_nPlayerHandle = reinterpret_cast<IHandleEntity*>(tStorage.m_pPlayer)->GetRefEHandle();
|
||||
tMoveStorage.m_MoveData.m_bFirstRunOfFunctions = false;
|
||||
tMoveStorage.m_MoveData.m_bGameCodeMovedPlayer = false;
|
||||
tMoveStorage.m_MoveData.m_nPlayerHandle = reinterpret_cast<IHandleEntity*>(tMoveStorage.m_pPlayer)->GetRefEHandle();
|
||||
|
||||
tStorage.m_MoveData.m_vecAbsOrigin = tStorage.m_pPlayer->m_vecOrigin();
|
||||
tStorage.m_MoveData.m_vecVelocity = tStorage.m_pPlayer->m_vecVelocity();
|
||||
tStorage.m_MoveData.m_flMaxSpeed = SDK::MaxSpeed(tStorage.m_pPlayer);
|
||||
tStorage.m_MoveData.m_flClientMaxSpeed = tStorage.m_MoveData.m_flMaxSpeed;
|
||||
tMoveStorage.m_MoveData.m_vecAbsOrigin = tMoveStorage.m_pPlayer->m_vecOrigin();
|
||||
tMoveStorage.m_MoveData.m_vecVelocity = tMoveStorage.m_pPlayer->m_vecVelocity();
|
||||
tMoveStorage.m_MoveData.m_flMaxSpeed = SDK::MaxSpeed(tMoveStorage.m_pPlayer);
|
||||
tMoveStorage.m_MoveData.m_flClientMaxSpeed = tMoveStorage.m_MoveData.m_flMaxSpeed;
|
||||
|
||||
if (!tStorage.m_MoveData.m_vecVelocity.To2D().IsZero())
|
||||
if (!tMoveStorage.m_MoveData.m_vecVelocity.To2D().IsZero())
|
||||
{
|
||||
int iIndex = tStorage.m_pPlayer->entindex();
|
||||
int iIndex = tMoveStorage.m_pPlayer->entindex();
|
||||
if (iIndex == I::EngineClient->GetLocalPlayer() && G::CurrentUserCmd)
|
||||
tStorage.m_MoveData.m_vecViewAngles = G::CurrentUserCmd->viewangles;
|
||||
tMoveStorage.m_MoveData.m_vecViewAngles = G::CurrentUserCmd->viewangles;
|
||||
else
|
||||
{
|
||||
if (!tStorage.m_pPlayer->InCond(TF_COND_SHIELD_CHARGE))
|
||||
tStorage.m_MoveData.m_vecViewAngles = { 0.f, Math::VectorAngles(tStorage.m_MoveData.m_vecVelocity).y, 0.f };
|
||||
if (!tMoveStorage.m_pPlayer->InCond(TF_COND_SHIELD_CHARGE))
|
||||
tMoveStorage.m_MoveData.m_vecViewAngles = { 0.f, Math::VectorAngles(tMoveStorage.m_MoveData.m_vecVelocity).y, 0.f };
|
||||
else
|
||||
tStorage.m_MoveData.m_vecViewAngles = H::Entities.GetEyeAngles(iIndex);
|
||||
tMoveStorage.m_MoveData.m_vecViewAngles = H::Entities.GetEyeAngles(iIndex);
|
||||
}
|
||||
|
||||
const auto& vRecords = m_mRecords[tStorage.m_pPlayer->entindex()];
|
||||
const auto& vRecords = m_mRecords[tMoveStorage.m_pPlayer->entindex()];
|
||||
if (!vRecords.empty())
|
||||
{
|
||||
auto& tRecord = vRecords.front();
|
||||
@@ -272,28 +272,28 @@ bool CMovementSimulation::SetupMoveData(MoveStorage& tStorage)
|
||||
s_tDummyCmd.forwardmove = tRecord.m_vDirection.x;
|
||||
s_tDummyCmd.sidemove = -tRecord.m_vDirection.y;
|
||||
s_tDummyCmd.upmove = tRecord.m_vDirection.z;
|
||||
SDK::FixMovement(&s_tDummyCmd, {}, tStorage.m_MoveData.m_vecViewAngles);
|
||||
tStorage.m_MoveData.m_flForwardMove = s_tDummyCmd.forwardmove;
|
||||
tStorage.m_MoveData.m_flSideMove = s_tDummyCmd.sidemove;
|
||||
tStorage.m_MoveData.m_flUpMove = s_tDummyCmd.upmove;
|
||||
SDK::FixMovement(&s_tDummyCmd, {}, tMoveStorage.m_MoveData.m_vecViewAngles);
|
||||
tMoveStorage.m_MoveData.m_flForwardMove = s_tDummyCmd.forwardmove;
|
||||
tMoveStorage.m_MoveData.m_flSideMove = s_tDummyCmd.sidemove;
|
||||
tMoveStorage.m_MoveData.m_flUpMove = s_tDummyCmd.upmove;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tStorage.m_MoveData.m_vecAngles = tStorage.m_MoveData.m_vecOldAngles = tStorage.m_MoveData.m_vecViewAngles;
|
||||
if (auto pConstraintEntity = tStorage.m_pPlayer->m_hConstraintEntity().Get())
|
||||
tStorage.m_MoveData.m_vecConstraintCenter = pConstraintEntity->GetAbsOrigin();
|
||||
tMoveStorage.m_MoveData.m_vecAngles = tMoveStorage.m_MoveData.m_vecOldAngles = tMoveStorage.m_MoveData.m_vecViewAngles;
|
||||
if (auto pConstraintEntity = tMoveStorage.m_pPlayer->m_hConstraintEntity().Get())
|
||||
tMoveStorage.m_MoveData.m_vecConstraintCenter = pConstraintEntity->GetAbsOrigin();
|
||||
else
|
||||
tStorage.m_MoveData.m_vecConstraintCenter = tStorage.m_pPlayer->m_vecConstraintCenter();
|
||||
tStorage.m_MoveData.m_flConstraintRadius = tStorage.m_pPlayer->m_flConstraintRadius();
|
||||
tStorage.m_MoveData.m_flConstraintWidth = tStorage.m_pPlayer->m_flConstraintWidth();
|
||||
tStorage.m_MoveData.m_flConstraintSpeedFactor = tStorage.m_pPlayer->m_flConstraintSpeedFactor();
|
||||
tMoveStorage.m_MoveData.m_vecConstraintCenter = tMoveStorage.m_pPlayer->m_vecConstraintCenter();
|
||||
tMoveStorage.m_MoveData.m_flConstraintRadius = tMoveStorage.m_pPlayer->m_flConstraintRadius();
|
||||
tMoveStorage.m_MoveData.m_flConstraintWidth = tMoveStorage.m_pPlayer->m_flConstraintWidth();
|
||||
tMoveStorage.m_MoveData.m_flConstraintSpeedFactor = tMoveStorage.m_pPlayer->m_flConstraintSpeedFactor();
|
||||
|
||||
tStorage.m_flPredictedDelta = GetPredictedDelta(tStorage.m_pPlayer);
|
||||
tStorage.m_flSimTime = tStorage.m_pPlayer->m_flSimulationTime();
|
||||
tStorage.m_flPredictedSimTime = tStorage.m_flSimTime + tStorage.m_flPredictedDelta;
|
||||
tStorage.m_vPredictedOrigin = tStorage.m_MoveData.m_vecAbsOrigin;
|
||||
tStorage.m_bDirectMove = tStorage.m_pPlayer->IsOnGround() || tStorage.m_pPlayer->IsSwimming();
|
||||
tMoveStorage.m_flPredictedDelta = GetPredictedDelta(tMoveStorage.m_pPlayer);
|
||||
tMoveStorage.m_flSimTime = tMoveStorage.m_pPlayer->m_flSimulationTime();
|
||||
tMoveStorage.m_flPredictedSimTime = tMoveStorage.m_flSimTime + tMoveStorage.m_flPredictedDelta;
|
||||
tMoveStorage.m_vPredictedOrigin = tMoveStorage.m_MoveData.m_vecAbsOrigin;
|
||||
tMoveStorage.m_bDirectMove = tMoveStorage.m_pPlayer->IsOnGround() || tMoveStorage.m_pPlayer->IsSwimming();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -390,15 +390,15 @@ static inline bool GetYawDifference(MoveData& tRecord1, MoveData& tRecord2, bool
|
||||
}
|
||||
}
|
||||
|
||||
void CMovementSimulation::GetAverageYaw(MoveStorage& tStorage, int iSamples)
|
||||
void CMovementSimulation::GetAverageYaw(MoveStorage& tMoveStorage, int iSamples)
|
||||
{
|
||||
auto pPlayer = tStorage.m_pPlayer;
|
||||
auto pPlayer = tMoveStorage.m_pPlayer;
|
||||
auto& vRecords = m_mRecords[pPlayer->entindex()];
|
||||
if (vRecords.empty())
|
||||
return;
|
||||
|
||||
bool bGround = tStorage.m_bDirectMove; int iMinimumStrafes = 4;
|
||||
float flMaxSpeed = SDK::MaxSpeed(tStorage.m_pPlayer, false, true);
|
||||
bool bGround = tMoveStorage.m_bDirectMove; int iMinimumStrafes = 4;
|
||||
float flMaxSpeed = SDK::MaxSpeed(tMoveStorage.m_pPlayer, false, true);
|
||||
float flLowMinimumDistance = bGround ? Vars::Aimbot::Projectile::GroundLowMinimumDistance.Value : Vars::Aimbot::Projectile::AirLowMinimumDistance.Value;
|
||||
float flLowMinimumSamples = bGround ? Vars::Aimbot::Projectile::GroundLowMinimumSamples.Value : Vars::Aimbot::Projectile::AirLowMinimumSamples.Value;
|
||||
float flHighMinimumDistance = bGround ? Vars::Aimbot::Projectile::GroundHighMinimumDistance.Value : Vars::Aimbot::Projectile::AirHighMinimumDistance.Value;
|
||||
@@ -462,7 +462,7 @@ void CMovementSimulation::GetAverageYaw(MoveStorage& tStorage, int iSamples)
|
||||
{
|
||||
float flDistance = 0.f;
|
||||
if (auto pLocal = H::Entities.GetLocal())
|
||||
flDistance = pLocal->m_vecOrigin().DistTo(tStorage.m_pPlayer->m_vecOrigin());
|
||||
flDistance = pLocal->m_vecOrigin().DistTo(tMoveStorage.m_pPlayer->m_vecOrigin());
|
||||
iMinimum = flDistance < flLowMinimumDistance ? flLowMinimumSamples : Math::RemapVal(flDistance, flLowMinimumDistance, flHighMinimumDistance, flLowMinimumSamples + 1, flHighMinimumSamples);
|
||||
}
|
||||
|
||||
@@ -470,31 +470,31 @@ void CMovementSimulation::GetAverageYaw(MoveStorage& tStorage, int iSamples)
|
||||
if (fabsf(flAverageYaw) < 0.36f)
|
||||
return;
|
||||
|
||||
tStorage.m_flAverageYaw = flAverageYaw;
|
||||
tMoveStorage.m_flAverageYaw = flAverageYaw;
|
||||
SDK::Output("MovementSimulation", std::format("flAverageYaw calculated to {} from {} ({}) {}", flAverageYaw, iTicks, iMinimum, pPlayer->entindex() == I::EngineClient->GetLocalPlayer() ? "(local)" : "").c_str(), { 100, 255, 150 }, Vars::Debug::Logging.Value);
|
||||
}
|
||||
|
||||
bool CMovementSimulation::StrafePrediction(MoveStorage& tStorage, int iSamples)
|
||||
bool CMovementSimulation::StrafePrediction(MoveStorage& tMoveStorage, int iSamples)
|
||||
{
|
||||
if (tStorage.m_bDirectMove
|
||||
if (tMoveStorage.m_bDirectMove
|
||||
? !(Vars::Aimbot::Projectile::StrafePrediction.Value & Vars::Aimbot::Projectile::StrafePredictionEnum::Ground)
|
||||
: !(Vars::Aimbot::Projectile::StrafePrediction.Value & Vars::Aimbot::Projectile::StrafePredictionEnum::Air))
|
||||
return false;
|
||||
|
||||
GetAverageYaw(tStorage, iSamples);
|
||||
GetAverageYaw(tMoveStorage, iSamples);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMovementSimulation::SetDuck(MoveStorage& tStorage, bool bDuck) // this only touches origin, bounds
|
||||
bool CMovementSimulation::SetDuck(MoveStorage& tMoveStorage, bool bDuck) // this only touches origin, bounds
|
||||
{
|
||||
if (bDuck == tStorage.m_pPlayer->m_bDucked())
|
||||
if (bDuck == tMoveStorage.m_pPlayer->m_bDucked())
|
||||
return true;
|
||||
|
||||
auto pGameRules = I::TFGameRules();
|
||||
auto pViewVectors = pGameRules ? pGameRules->GetViewVectors() : nullptr;
|
||||
float flScale = tStorage.m_pPlayer->m_flModelScale();
|
||||
float flScale = tMoveStorage.m_pPlayer->m_flModelScale();
|
||||
|
||||
if (!tStorage.m_pPlayer->IsOnGround())
|
||||
if (!tMoveStorage.m_pPlayer->IsOnGround())
|
||||
{
|
||||
Vec3 vHullMins = (pViewVectors ? pViewVectors->m_vHullMin : Vec3(-24, -24, 0)) * flScale;
|
||||
Vec3 vHullMaxs = (pViewVectors ? pViewVectors->m_vHullMax : Vec3(24, 24, 82)) * flScale;
|
||||
@@ -502,21 +502,21 @@ bool CMovementSimulation::SetDuck(MoveStorage& tStorage, bool bDuck) // this onl
|
||||
Vec3 vDuckHullMaxs = (pViewVectors ? pViewVectors->m_vDuckHullMax : Vec3(24, 24, 62)) * flScale;
|
||||
|
||||
if (bDuck)
|
||||
tStorage.m_MoveData.m_vecAbsOrigin += (vHullMaxs - vHullMins) - (vDuckHullMaxs - vDuckHullMins);
|
||||
tMoveStorage.m_MoveData.m_vecAbsOrigin += (vHullMaxs - vHullMins) - (vDuckHullMaxs - vDuckHullMins);
|
||||
else
|
||||
{
|
||||
Vec3 vOrigin = tStorage.m_MoveData.m_vecAbsOrigin - ((vHullMaxs - vHullMins) - (vDuckHullMaxs - vDuckHullMins));
|
||||
Vec3 vOrigin = tMoveStorage.m_MoveData.m_vecAbsOrigin - ((vHullMaxs - vHullMins) - (vDuckHullMaxs - vDuckHullMins));
|
||||
|
||||
CGameTrace trace = {};
|
||||
CTraceFilterWorldAndPropsOnly filter = {};
|
||||
SDK::TraceHull(vOrigin, vOrigin, vHullMins, vHullMaxs, tStorage.m_pPlayer->SolidMask(), &filter, &trace);
|
||||
SDK::TraceHull(vOrigin, vOrigin, vHullMins, vHullMaxs, tMoveStorage.m_pPlayer->SolidMask(), &filter, &trace);
|
||||
if (trace.DidHit())
|
||||
return false;
|
||||
|
||||
tStorage.m_MoveData.m_vecAbsOrigin = vOrigin;
|
||||
tMoveStorage.m_MoveData.m_vecAbsOrigin = vOrigin;
|
||||
}
|
||||
}
|
||||
tStorage.m_pPlayer->m_bDucked() = bDuck;
|
||||
tMoveStorage.m_pPlayer->m_bDucked() = bDuck;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -556,90 +556,90 @@ void CMovementSimulation::RestoreBounds(CTFPlayer* pPlayer)
|
||||
}
|
||||
}
|
||||
|
||||
void CMovementSimulation::RunTick(MoveStorage& tStorage, bool bPath, std::function<void(CMoveData&)>* pCallback)
|
||||
void CMovementSimulation::RunTick(MoveStorage& tMoveStorage, bool bPath, std::function<void(CMoveData&)>* pCallback)
|
||||
{
|
||||
if (tStorage.m_bFailed || !tStorage.m_pPlayer || !tStorage.m_pPlayer->IsPlayer())
|
||||
if (tMoveStorage.m_bFailed || !tMoveStorage.m_pPlayer || !tMoveStorage.m_pPlayer->IsPlayer())
|
||||
return;
|
||||
|
||||
if (bPath)
|
||||
tStorage.m_vPath.push_back(tStorage.m_MoveData.m_vecAbsOrigin);
|
||||
tMoveStorage.m_vPath.push_back(tMoveStorage.m_MoveData.m_vecAbsOrigin);
|
||||
|
||||
// make sure frametime and prediction vars are right
|
||||
I::Prediction->m_bInPrediction = true;
|
||||
I::Prediction->m_bFirstTimePredicted = false;
|
||||
I::GlobalVars->frametime = I::Prediction->m_bEnginePaused ? 0.f : TICK_INTERVAL;
|
||||
SetBounds(tStorage.m_pPlayer);
|
||||
SetBounds(tMoveStorage.m_pPlayer);
|
||||
|
||||
float flCorrection = 0.f;
|
||||
if (tStorage.m_flAverageYaw)
|
||||
if (tMoveStorage.m_flAverageYaw)
|
||||
{
|
||||
float flMult = 1.f;
|
||||
if (!tStorage.m_bDirectMove && !tStorage.m_pPlayer->InCond(TF_COND_SHIELD_CHARGE))
|
||||
if (!tMoveStorage.m_bDirectMove && !tMoveStorage.m_pPlayer->InCond(TF_COND_SHIELD_CHARGE))
|
||||
{
|
||||
flCorrection = 90.f * sign(tStorage.m_flAverageYaw);
|
||||
flCorrection = 90.f * sign(tMoveStorage.m_flAverageYaw);
|
||||
if (Vars::Aimbot::Projectile::MovesimFrictionFlags.Value & Vars::Aimbot::Projectile::MovesimFrictionFlagsEnum::RunReduce)
|
||||
flMult = GetFrictionScale(tStorage.m_MoveData.m_vecVelocity.Length2D(), tStorage.m_flAverageYaw, tStorage.m_MoveData.m_vecVelocity.z + GetGravity() * TICK_INTERVAL);
|
||||
flMult = GetFrictionScale(tMoveStorage.m_MoveData.m_vecVelocity.Length2D(), tMoveStorage.m_flAverageYaw, tMoveStorage.m_MoveData.m_vecVelocity.z + GetGravity() * TICK_INTERVAL);
|
||||
}
|
||||
tStorage.m_MoveData.m_vecViewAngles.y += tStorage.m_flAverageYaw * flMult + flCorrection;
|
||||
tMoveStorage.m_MoveData.m_vecViewAngles.y += tMoveStorage.m_flAverageYaw * flMult + flCorrection;
|
||||
}
|
||||
else if (!tStorage.m_bDirectMove)
|
||||
tStorage.m_MoveData.m_flForwardMove = tStorage.m_MoveData.m_flSideMove = 0.f;
|
||||
else if (!tMoveStorage.m_bDirectMove)
|
||||
tMoveStorage.m_MoveData.m_flForwardMove = tMoveStorage.m_MoveData.m_flSideMove = 0.f;
|
||||
|
||||
float flOldSpeed = tStorage.m_MoveData.m_flClientMaxSpeed;
|
||||
if (tStorage.m_pPlayer->m_bDucked() && tStorage.m_pPlayer->IsOnGround() && !tStorage.m_pPlayer->IsSwimming())
|
||||
tStorage.m_MoveData.m_flClientMaxSpeed /= 3;
|
||||
float flOldSpeed = tMoveStorage.m_MoveData.m_flClientMaxSpeed;
|
||||
if (tMoveStorage.m_pPlayer->m_bDucked() && tMoveStorage.m_pPlayer->IsOnGround() && !tMoveStorage.m_pPlayer->IsSwimming())
|
||||
tMoveStorage.m_MoveData.m_flClientMaxSpeed /= 3;
|
||||
|
||||
if (tStorage.m_bBunnyHop && tStorage.m_pPlayer->IsOnGround() && !tStorage.m_pPlayer->m_bDucked())
|
||||
if (tMoveStorage.m_bBunnyHop && tMoveStorage.m_pPlayer->IsOnGround() && !tMoveStorage.m_pPlayer->m_bDucked())
|
||||
{
|
||||
tStorage.m_MoveData.m_nOldButtons = 0;
|
||||
tStorage.m_MoveData.m_nButtons |= IN_JUMP;
|
||||
tMoveStorage.m_MoveData.m_nOldButtons = 0;
|
||||
tMoveStorage.m_MoveData.m_nButtons |= IN_JUMP;
|
||||
}
|
||||
|
||||
I::GameMovement->ProcessMovement(tStorage.m_pPlayer, &tStorage.m_MoveData);
|
||||
I::GameMovement->ProcessMovement(tMoveStorage.m_pPlayer, &tMoveStorage.m_MoveData);
|
||||
if (pCallback)
|
||||
(*pCallback)(tStorage.m_MoveData);
|
||||
(*pCallback)(tMoveStorage.m_MoveData);
|
||||
|
||||
tStorage.m_MoveData.m_flClientMaxSpeed = flOldSpeed;
|
||||
tMoveStorage.m_MoveData.m_flClientMaxSpeed = flOldSpeed;
|
||||
|
||||
tStorage.m_flSimTime += TICK_INTERVAL;
|
||||
tStorage.m_bPredictNetworked = tStorage.m_flSimTime >= tStorage.m_flPredictedSimTime;
|
||||
if (tStorage.m_bPredictNetworked)
|
||||
tMoveStorage.m_flSimTime += TICK_INTERVAL;
|
||||
tMoveStorage.m_bPredictNetworked = tMoveStorage.m_flSimTime >= tMoveStorage.m_flPredictedSimTime;
|
||||
if (tMoveStorage.m_bPredictNetworked)
|
||||
{
|
||||
tStorage.m_vPredictedOrigin = tStorage.m_MoveData.m_vecAbsOrigin;
|
||||
tStorage.m_flPredictedSimTime += tStorage.m_flPredictedDelta;
|
||||
tMoveStorage.m_vPredictedOrigin = tMoveStorage.m_MoveData.m_vecAbsOrigin;
|
||||
tMoveStorage.m_flPredictedSimTime += tMoveStorage.m_flPredictedDelta;
|
||||
}
|
||||
bool bLastbDirectMove = tStorage.m_bDirectMove;
|
||||
tStorage.m_bDirectMove = tStorage.m_pPlayer->IsOnGround() || tStorage.m_pPlayer->IsSwimming();
|
||||
bool bLastbDirectMove = tMoveStorage.m_bDirectMove;
|
||||
tMoveStorage.m_bDirectMove = tMoveStorage.m_pPlayer->IsOnGround() || tMoveStorage.m_pPlayer->IsSwimming();
|
||||
|
||||
if (tStorage.m_flAverageYaw)
|
||||
tStorage.m_MoveData.m_vecViewAngles.y -= flCorrection;
|
||||
else if (tStorage.m_bDirectMove && !bLastbDirectMove
|
||||
&& !tStorage.m_MoveData.m_flForwardMove && !tStorage.m_MoveData.m_flSideMove
|
||||
&& tStorage.m_MoveData.m_vecVelocity.Length2D() > tStorage.m_MoveData.m_flMaxSpeed * 0.015f)
|
||||
if (tMoveStorage.m_flAverageYaw)
|
||||
tMoveStorage.m_MoveData.m_vecViewAngles.y -= flCorrection;
|
||||
else if (tMoveStorage.m_bDirectMove && !bLastbDirectMove
|
||||
&& !tMoveStorage.m_MoveData.m_flForwardMove && !tMoveStorage.m_MoveData.m_flSideMove
|
||||
&& tMoveStorage.m_MoveData.m_vecVelocity.Length2D() > tMoveStorage.m_MoveData.m_flMaxSpeed * 0.015f)
|
||||
{
|
||||
Vec3 vDirection = tStorage.m_MoveData.m_vecVelocity.Normalized2D() * 450.f;
|
||||
Vec3 vDirection = tMoveStorage.m_MoveData.m_vecVelocity.Normalized2D() * 450.f;
|
||||
s_tDummyCmd.forwardmove = vDirection.x, s_tDummyCmd.sidemove = -vDirection.y;
|
||||
SDK::FixMovement(&s_tDummyCmd, {}, tStorage.m_MoveData.m_vecViewAngles);
|
||||
tStorage.m_MoveData.m_flForwardMove = s_tDummyCmd.forwardmove, tStorage.m_MoveData.m_flSideMove = s_tDummyCmd.sidemove;
|
||||
SDK::FixMovement(&s_tDummyCmd, {}, tMoveStorage.m_MoveData.m_vecViewAngles);
|
||||
tMoveStorage.m_MoveData.m_flForwardMove = s_tDummyCmd.forwardmove, tMoveStorage.m_MoveData.m_flSideMove = s_tDummyCmd.sidemove;
|
||||
}
|
||||
|
||||
RestoreBounds(tStorage.m_pPlayer);
|
||||
RestoreBounds(tMoveStorage.m_pPlayer);
|
||||
}
|
||||
|
||||
void CMovementSimulation::RunTick(MoveStorage& tStorage, bool bPath, std::function<void(CMoveData&)> fCallback)
|
||||
void CMovementSimulation::RunTick(MoveStorage& tMoveStorage, bool bPath, std::function<void(CMoveData&)> fCallback)
|
||||
{
|
||||
RunTick(tStorage, bPath, &fCallback);
|
||||
RunTick(tMoveStorage, bPath, &fCallback);
|
||||
}
|
||||
|
||||
void CMovementSimulation::Restore(MoveStorage& tStorage)
|
||||
void CMovementSimulation::Restore(MoveStorage& tMoveStorage)
|
||||
{
|
||||
if (tStorage.m_bInitFailed || !tStorage.m_pPlayer)
|
||||
if (tMoveStorage.m_bInitFailed || !tMoveStorage.m_pPlayer)
|
||||
return;
|
||||
|
||||
I::MoveHelper->SetHost(nullptr);
|
||||
tStorage.m_pPlayer->m_pCurrentCommand() = nullptr;
|
||||
tMoveStorage.m_pPlayer->m_pCurrentCommand() = nullptr;
|
||||
|
||||
Reset(tStorage);
|
||||
Reset(tMoveStorage);
|
||||
|
||||
I::Prediction->m_bInPrediction = m_bOldInPrediction;
|
||||
I::Prediction->m_bFirstTimePredicted = m_bOldFirstTimePredicted;
|
||||
|
||||
@@ -37,12 +37,12 @@ struct MoveData
|
||||
class CMovementSimulation
|
||||
{
|
||||
private:
|
||||
void Store(MoveStorage& tStorage);
|
||||
void Reset(MoveStorage& tStorage);
|
||||
void Store(MoveStorage& tMoveStorage);
|
||||
void Reset(MoveStorage& tMoveStorage);
|
||||
|
||||
bool SetupMoveData(MoveStorage& tStorage);
|
||||
void GetAverageYaw(MoveStorage& tStorage, int iSamples);
|
||||
bool StrafePrediction(MoveStorage& tStorage, int iSamples);
|
||||
bool SetupMoveData(MoveStorage& tMoveStorage);
|
||||
void GetAverageYaw(MoveStorage& tMoveStorage, int iSamples);
|
||||
bool StrafePrediction(MoveStorage& tMoveStorage, int iSamples);
|
||||
|
||||
void SetBounds(CTFPlayer* pPlayer);
|
||||
void RestoreBounds(CTFPlayer* pPlayer);
|
||||
@@ -57,11 +57,11 @@ private:
|
||||
public:
|
||||
void Store();
|
||||
|
||||
bool Initialize(CBaseEntity* pEntity, MoveStorage& tStorage, bool bHitchance = true, bool bStrafe = true);
|
||||
bool SetDuck(MoveStorage& tStorage, bool bDuck);
|
||||
void RunTick(MoveStorage& tStorage, bool bPath = true, std::function<void(CMoveData&)>* pCallback = nullptr);
|
||||
void RunTick(MoveStorage& tStorage, bool bPath, std::function<void(CMoveData&)> fCallback);
|
||||
void Restore(MoveStorage& tStorage);
|
||||
bool Initialize(CBaseEntity* pEntity, MoveStorage& tMoveStorage, bool bHitchance = true, bool bStrafe = true);
|
||||
bool SetDuck(MoveStorage& tMoveStorage, bool bDuck);
|
||||
void RunTick(MoveStorage& tMoveStorage, bool bPath = true, std::function<void(CMoveData&)>* pCallback = nullptr);
|
||||
void RunTick(MoveStorage& tMoveStorage, bool bPath, std::function<void(CMoveData&)> fCallback);
|
||||
void Restore(MoveStorage& tMoveStorage);
|
||||
|
||||
float GetPredictedDelta(CBaseEntity* pEntity);
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
bool bDucking = pPlayer->m_fFlags() & FL_DUCKING;
|
||||
|
||||
bool bTrace = iFlags & ProjSimEnum::Trace;
|
||||
bool bQuick = iFlags & ProjSimEnum::Quick;
|
||||
bool bInterp = iFlags & ProjSimEnum::Interp;
|
||||
bool bMaxSpeed = iFlags & ProjSimEnum::MaxSpeed;
|
||||
bool bPredictCmdNum = iFlags & ProjSimEnum::PredictCmdNum;
|
||||
bool bNoRandomAngles = iFlags & ProjSimEnum::NoRandomAngles;
|
||||
@@ -23,13 +23,13 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
|
||||
if (Vars::Visuals::Trajectory::Override.Value)
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { Vars::Visuals::Trajectory::OffsetX.Value, Vars::Visuals::Trajectory::OffsetY.Value, Vars::Visuals::Trajectory::OffsetZ.Value }, vPos, vAngle, !bTrace ? true : Vars::Visuals::Trajectory::Pipes.Value, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { Vars::Visuals::Trajectory::OffsetX.Value, Vars::Visuals::Trajectory::OffsetY.Value, Vars::Visuals::Trajectory::OffsetZ.Value }, vPos, vAngle, !bTrace ? true : Vars::Visuals::Trajectory::Pipes.Value, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("custom"), vPos, vAngle, { Vars::Visuals::Trajectory::Hull.Value, Vars::Visuals::Trajectory::Hull.Value, Vars::Visuals::Trajectory::Hull.Value }, Vars::Visuals::Trajectory::Speed.Value, Vars::Visuals::Trajectory::Gravity.Value, Vars::Visuals::Trajectory::LifeTime.Value };
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!bQuick && G::CurrentUserCmd)
|
||||
if (!bInterp && G::CurrentUserCmd)
|
||||
{
|
||||
switch (pWeapon->GetWeaponID())
|
||||
{
|
||||
@@ -77,7 +77,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
case TF_WEAPON_ROCKETLAUNCHER:
|
||||
case TF_WEAPON_ROCKETLAUNCHER_DIRECTHIT:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, int(SDK::AttribHookValue(0, "centerfire_projectile", pWeapon)) == 1 ? 0.f : 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, int(SDK::AttribHookValue(0, "centerfire_projectile", pWeapon)) == 1 ? 0.f : 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
float flSpeed = pPlayer->InCond(TF_COND_RUNE_PRECISION) ? 3000.f : SDK::AttribHookValue(1100.f, "mult_projectile_speed", pWeapon);
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_rocket.mdl"), vPos, vAngle, { 0.f, 0.f, 0.f }, flSpeed, 0.f };
|
||||
@@ -89,7 +89,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
{
|
||||
bool bCowMangler = pWeapon->GetWeaponID() == TF_WEAPON_PARTICLE_CANNON;
|
||||
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
if (pWeapon->GetWeaponID() == TF_WEAPON_DRG_POMSON)
|
||||
vPos.z -= 13.f;
|
||||
|
||||
@@ -103,7 +103,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
bool bCannon = pWeapon->GetWeaponID() == TF_WEAPON_CANNON;
|
||||
float flMortar = bCannon ? SDK::AttribHookValue(0.f, "grenade_launcher_mortar_mode", pWeapon) : 0.f;
|
||||
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
float flSpeed = SDK::AttribHookValue(pPlayer->InCond(TF_COND_RUNE_PRECISION) ? 3000.f : SDK::AttribHookValue(1200.f, "mult_projectile_speed", pWeapon), "mult_projectile_range", pWeapon);
|
||||
float flLifetime = flMortar
|
||||
@@ -115,7 +115,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
}
|
||||
case TF_WEAPON_PIPEBOMBLAUNCHER:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
float flCharge = flAutoCharge > 0.f && SDK::AttribHookValue(1, "mult_dmg", pWeapon)
|
||||
? SDK::AttribHookValue(4.f, "stickybomb_charge_rate", pWeapon) * flAutoCharge
|
||||
@@ -126,33 +126,33 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
}
|
||||
case TF_WEAPON_FLAREGUN:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_flaregun_shell.mdl"), vPos, vAngle, { 0.f, 0.f, 0.f }, SDK::AttribHookValue(2000.f, "mult_projectile_speed", pWeapon), 0.3f * flGravity };
|
||||
return true;
|
||||
}
|
||||
case TF_WEAPON_FLAREGUN_REVENGE:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_flaregun_shell.mdl"), vPos, vAngle, { 0.f, 0.f, 0.f }, 3000.f, 0.45f * flGravity };
|
||||
return true;
|
||||
}
|
||||
case TF_WEAPON_COMPOUND_BOW:
|
||||
{
|
||||
if (!bQuick && G::CurrentUserCmd &&
|
||||
I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() >= TF_ARROW_MAX_CHARGE_TIME)
|
||||
if (!bInterp && G::CurrentUserCmd && pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() > 0.f
|
||||
&& I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() >= TF_ARROW_MAX_CHARGE_TIME)
|
||||
{
|
||||
float flAddX = float(SDK::RandomInt()) / VALVE_RAND_MAX * 12.f - 6.f;
|
||||
float flAddY = float(SDK::RandomInt()) / VALVE_RAND_MAX * 12.f - 6.f;
|
||||
|
||||
if (bNoRandomAngles)
|
||||
vAngles -= { flAddX, flAddY };
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
vAngle += { flAddX, flAddY };
|
||||
}
|
||||
else
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
float flCharge = pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() > 0.f ? I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() : 0.f;
|
||||
float flSpeed = bMaxSpeed ? 2600.f : Math::RemapVal(flCharge, 0.f, 1.f, 1800.f, 2600.f);
|
||||
@@ -165,7 +165,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
{
|
||||
bool bCrossbow = pWeapon->GetWeaponID() == TF_WEAPON_CROSSBOW;
|
||||
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
auto uType = bCrossbow ? FNV1A::Hash32Const("models/weapons/w_models/w_syringe_proj.mdl") : FNV1A::Hash32Const("models/weapons/w_models/w_repair_claw.mdl");
|
||||
tProjInfo = { pPlayer, pWeapon, uType, vPos, vAngle, pWeapon->GetWeaponID() == TF_WEAPON_CROSSBOW ? Vec3(3.f, 3.f, 3.f) : Vec3(1.f, 1.f, 1.f), 2400.f, 0.2f * flGravity, 10.f /*arrows have some lifetime check for whatever reason*/ };
|
||||
@@ -173,7 +173,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
}
|
||||
case TF_WEAPON_SYRINGEGUN_MEDIC:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 6.f, -8.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 6.f, -8.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_syringe_proj.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, 1000.f, 0.3f * flGravity };
|
||||
return true;
|
||||
@@ -183,21 +183,21 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
static auto tf_flamethrower_boxsize = H::ConVars.FindVar("tf_flamethrower_boxsize");
|
||||
const float flHull = tf_flamethrower_boxsize->GetFloat();
|
||||
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 40.f, 5.f, 0.f }, vPos, vAngle, true, bQuick, false);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 40.f, 5.f, 0.f }, vPos, vAngle, true, bInterp, false);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("particles/flamethrower.pcf"), vPos, vAngle, { flHull, flHull, flHull }, 1000.f, 0.f, 0.285f };
|
||||
return true;
|
||||
}
|
||||
case TF_WEAPON_FLAME_BALL:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 3.f, 7.f, -9.f }, vPos, vAngle, true, bQuick, false);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 3.f, 7.f, -9.f }, vPos, vAngle, true, bInterp, false);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_flameball/c_flameball.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f /*damaging hull much bigger, shouldn't matter here*/ }, 3000.f, 0.f, 0.18f };
|
||||
return true;
|
||||
}
|
||||
case TF_WEAPON_CLEAVER:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/workshop_partner/weapons/c_models/c_sd_cleaver/c_sd_cleaver.mdl"), vPos, vAngle, { 1.f, 1.f, 10.f /*weird, probably still inaccurate*/ }, 3000.f, 1.f, 2.2f };
|
||||
return true;
|
||||
@@ -208,10 +208,10 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
static auto tf_scout_stunball_base_speed = H::ConVars.FindVar("tf_scout_stunball_base_speed");
|
||||
const bool bWrapAssassin = pWeapon->GetWeaponID() == TF_WEAPON_BAT_GIFTWRAP;
|
||||
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 0.f, 0.f, 0.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 0.f, 0.f, 0.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
Vec3 vForward; Math::AngleVectors(vAngle, &vForward);
|
||||
vPos = (bQuick ? pPlayer->GetAbsOrigin() : pPlayer->m_vecOrigin()) + (Vec3(0, 0, 50) + vForward * 32.f) * pPlayer->m_flModelScale(); // why?
|
||||
vPos = (bInterp ? pPlayer->GetAbsOrigin() : pPlayer->m_vecOrigin()) + (Vec3(0, 0, 50) + vForward * 32.f) * pPlayer->m_flModelScale(); // why?
|
||||
auto uHash = bWrapAssassin ? FNV1A::Hash32Const("models/weapons/c_models/c_xms_festive_ornament.mdl") : FNV1A::Hash32Const("models/weapons/w_models/w_baseball.mdl");
|
||||
tProjInfo = { pPlayer, pWeapon, uHash, vPos, vAngle, { 3.f, 3.f, 3.f }, tf_scout_stunball_base_speed->GetFloat(), 1.f, bWrapAssassin ? 2.3f : 100.f };
|
||||
return true;
|
||||
@@ -219,7 +219,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
case TF_WEAPON_JAR:
|
||||
case TF_WEAPON_JAR_MILK:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
uint32_t uType = uType = FNV1A::Hash32Const("models/weapons/c_models/urinejar.mdl");
|
||||
switch (pWeapon->m_iItemDefinitionIndex())
|
||||
@@ -233,7 +233,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
}
|
||||
case TF_WEAPON_JAR_GAS:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_gascan/c_gascan.mdl"), vPos, vAngle, { 3.f, 3.f, 3.f }, 2000.f, 1.f, 2.2f };
|
||||
return true;
|
||||
@@ -243,7 +243,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
static auto tf_grapplinghook_projectile_speed = H::ConVars.FindVar("tf_grapplinghook_projectile_speed");
|
||||
static auto tf_grapplinghook_max_distance = H::ConVars.FindVar("tf_grapplinghook_max_distance");
|
||||
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, -8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, -8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bInterp);
|
||||
|
||||
float flSpeed = tf_grapplinghook_projectile_speed->GetFloat();
|
||||
if (pPlayer->InCond(TF_COND_RUNE_AGILITY))
|
||||
@@ -270,7 +270,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
case Heavy_s_TheDalokohsBar:
|
||||
case Heavy_s_SecondBanana:
|
||||
{
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 0.f, 0.f, -8.f }, vPos, vAngle, true, bQuick);
|
||||
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 0.f, 0.f, -8.f }, vPos, vAngle, true, bInterp);
|
||||
|
||||
tProjInfo = { pPlayer, pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_sandwich/c_sandwich.mdl"), vPos, vAngle, { 17.f, 17.f, 7.f }, 500.f, 1.f * flGravity };
|
||||
return true;
|
||||
@@ -286,7 +286,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
|
||||
bool CProjectileSimulation::GetInfo(CTFPlayer* pPlayer, CTFWeaponBase* pWeapon, Vec3 vAngles, ProjectileInfo& tProjInfo, int iFlags, float flAutoCharge)
|
||||
{
|
||||
bool bInitCheck = iFlags & ProjSimEnum::InitCheck;
|
||||
bool bQuick = iFlags & ProjSimEnum::Quick;
|
||||
bool bInterp = iFlags & ProjSimEnum::Interp;
|
||||
|
||||
const float flOldCurrentTime = I::GlobalVars->curtime;
|
||||
I::GlobalVars->curtime = TICKS_TO_TIME(pPlayer->m_nTickBase());
|
||||
@@ -301,7 +301,7 @@ bool CProjectileSimulation::GetInfo(CTFPlayer* pPlayer, CTFWeaponBase* pWeapon,
|
||||
CTraceFilterWorldAndPropsOnly filter = {};
|
||||
filter.pSkip = pPlayer;
|
||||
|
||||
Vec3 vStart = bQuick ? pPlayer->GetEyePosition() : pPlayer->GetShootPos();
|
||||
Vec3 vStart = bInterp ? pPlayer->GetEyePosition() : pPlayer->GetShootPos();
|
||||
Vec3 vEnd = tProjInfo.m_vPos;
|
||||
|
||||
SDK::TraceHull(vStart, vEnd, tProjInfo.m_vHull * -1.f, tProjInfo.m_vHull, MASK_SOLID, &filter, &trace);
|
||||
@@ -456,7 +456,7 @@ bool CProjectileSimulation::Initialize(ProjectileInfo& tProjInfo, bool bSimulate
|
||||
case FNV1A::Hash32Const("models/weapons/w_models/w_stickybomb2.mdl"):
|
||||
case FNV1A::Hash32Const("models/weapons/w_models/w_cannonball.mdl"):
|
||||
vVelocity += vUp * 200.f;
|
||||
if (!(tProjInfo.m_iFlags & ProjSimEnum::Quick) && G::CurrentUserCmd)
|
||||
if (!(tProjInfo.m_iFlags & ProjSimEnum::Interp) && G::CurrentUserCmd)
|
||||
{
|
||||
Vec3 vNewVelocity = vVelocity + vUp * SDK::RandomFloat(-10.f, 10.f) + vRight * SDK::RandomFloat(-10.f, 10.f);
|
||||
if (!(tProjInfo.m_iFlags & ProjSimEnum::NoRandomAngles))
|
||||
@@ -630,7 +630,7 @@ float CProjectileSimulation::GetDesync()
|
||||
return I::GlobalVars->curtime - TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick) - F::Backtrack.GetReal();
|
||||
}
|
||||
|
||||
void CProjectileSimulation::SetupTrace(CTraceFilterCollideable& filter, int& nMask, CTFWeaponBase* pWeapon, int nTick, bool bQuick)
|
||||
void CProjectileSimulation::SetupTrace(CTraceFilterCollideable& filter, int& nMask, CTFWeaponBase* pWeapon, int nTick, bool bInterp)
|
||||
{
|
||||
switch (nTick)
|
||||
{
|
||||
@@ -647,12 +647,12 @@ void CProjectileSimulation::SetupTrace(CTraceFilterCollideable& filter, int& nMa
|
||||
case TF_WEAPON_DRG_POMSON:
|
||||
case TF_WEAPON_SYRINGEGUN_MEDIC:
|
||||
case TF_WEAPON_BAT_GIFTWRAP:
|
||||
if (bQuick)
|
||||
if (bInterp)
|
||||
filter.iPlayer = PLAYER_ALL;
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
if (bQuick)
|
||||
if (bInterp)
|
||||
{
|
||||
switch (pWeapon->GetWeaponID())
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ Enum(ProjSim,
|
||||
None = 0,
|
||||
Trace = 1 << 0, // trace when doing GetProjectileFireSetup
|
||||
InitCheck = 1 << 1, // validate starting position
|
||||
Quick = 1 << 2, // use interpolation
|
||||
Interp = 1 << 2, // use interpolation
|
||||
NoRandomAngles = 1 << 3, // don't do angle stuff for aimbot, nospread will pick that up
|
||||
PredictCmdNum = 1 << 4, // use crithack to predict command number
|
||||
MaxSpeed = 1 << 5 // default projectile speeds to their maximum
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
|
||||
public:
|
||||
bool GetInfo(CTFPlayer* pPlayer, CTFWeaponBase* pWeapon, Vec3 vAngles, ProjectileInfo& tProjInfo, int iFlags = ProjSimEnum::Trace | ProjSimEnum::InitCheck, float flAutoCharge = -1.f);
|
||||
void SetupTrace(CTraceFilterCollideable& filter, int& nMask, CTFWeaponBase* pWeapon, int nTick = 0, bool bQuick = false);
|
||||
void SetupTrace(CTraceFilterCollideable& filter, int& nMask, CTFWeaponBase* pWeapon, int nTick = 0, bool bInterp = false);
|
||||
|
||||
void GetInfo(CBaseEntity* pProjectile, ProjectileInfo& tProjInfo);
|
||||
void SetupTrace(CTraceFilterCollideable& filter, int& nMask, CBaseEntity* pProjectile);
|
||||
|
||||
@@ -275,6 +275,11 @@ public:
|
||||
return x * v.x + y * v.y;
|
||||
}
|
||||
|
||||
inline float DotNormalized(const Vec2& v) const
|
||||
{
|
||||
return (x * v.x + y * v.y) / (Length() * v.Length());
|
||||
}
|
||||
|
||||
inline bool IsZero(float flEpsilon = 0.001f) const
|
||||
{
|
||||
return fabsf(x) < flEpsilon &&
|
||||
@@ -617,6 +622,11 @@ public:
|
||||
return x * v.x + y * v.y + z * v.z;
|
||||
}
|
||||
|
||||
inline float DotNormalized(const Vec3& v) const
|
||||
{
|
||||
return (x * v.x + y * v.y + z * v.z) / (Length() * v.Length());
|
||||
}
|
||||
|
||||
inline Vec3 Cross(const Vec3& v) const
|
||||
{
|
||||
return Vec3(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x);
|
||||
|
||||
@@ -325,8 +325,8 @@ namespace Vars
|
||||
VA_LIST("Auto", "##Divider", "Head", "Body", "Feet", "##Divider", "Bodyaim if lethal", "Prioritize feet"),
|
||||
Auto = 1 << 0, Head = 1 << 1, Body = 1 << 2, Feet = 1 << 3, BodyaimIfLethal = 1 << 4, PrioritizeFeet = 1 << 5);
|
||||
CVarEnum(Modifiers, VA_LIST("Modifiers", "Projectile modifiers"), 0b1010, DROPDOWN_MULTI, nullptr,
|
||||
VA_LIST("Charge weapon", "Cancel charge", "Use prime time"),
|
||||
ChargeWeapon = 1 << 0, CancelCharge = 1 << 1, UsePrimeTime = 1 << 2);
|
||||
VA_LIST("Charge weapon", "Cancel charge", "Use arm time"),
|
||||
ChargeWeapon = 1 << 0, CancelCharge = 1 << 1, UseArmTime = 1 << 2);
|
||||
CVar(MaxSimulationTime, "Max simulation time", 2.f, SLIDER_MIN | SLIDER_PRECISION, 0.1f, 2.5f, 0.25f, "%gs");
|
||||
CVar(HitChance, "Hit chance", 0.f, SLIDER_CLAMP | SLIDER_PRECISION, 0.f, 100.f, 10.f, "%g%%");
|
||||
CVar(AutodetRadius, "Autodet radius", 90.f, SLIDER_CLAMP | SLIDER_PRECISION, 0.f, 100.f, 10.f, "%g%%");
|
||||
@@ -361,6 +361,7 @@ namespace Vars
|
||||
CVar(HuntsmanAddLow, "Huntsman add low", 0.f, NOSAVE | DEBUGVAR | SLIDER_CLAMP | SLIDER_PRECISION, 0.f, 20.f);
|
||||
CVar(HuntsmanClamp, "Huntsman clamp", 5.f, NOSAVE | DEBUGVAR | SLIDER_CLAMP | SLIDER_PRECISION, 0.f, 10.f, 0.5f);
|
||||
CVar(HuntsmanPullPoint, "Huntsman pull point", false, NOSAVE | DEBUGVAR);
|
||||
CVar(HuntsmanPullNoZ, "Pull no Z", false, NOSAVE | DEBUGVAR);
|
||||
|
||||
CVar(SplashPointsDirect, "Splash points direct", 100, NOSAVE | DEBUGVAR | SLIDER_MIN | SLIDER_PRECISION, 0, 400, 5);
|
||||
CVar(SplashPointsArc, "Splash points arc", 100, NOSAVE | DEBUGVAR | SLIDER_MIN | SLIDER_PRECISION, 0, 400, 5);
|
||||
@@ -377,6 +378,7 @@ namespace Vars
|
||||
VA_LIST("Regular", "Special light", "Special heavy"),
|
||||
Regular, SpecialLight, SpecialHeavy);
|
||||
CVar(SplashGrates, "Splash grates", true, NOSAVE | DEBUGVAR);
|
||||
CVar(Out2NormalCheck, "Out2 normal check", 0.7f, NOSAVE | DEBUGVAR | SLIDER_CLAMP | SLIDER_PRECISION, -1.f, 1.f, 0.1f);
|
||||
|
||||
CVar(DeltaCount, "Delta count", 5, NOSAVE | DEBUGVAR, 1, 5);
|
||||
CVarEnum(DeltaMode, "Delta mode", 0, NOSAVE | DEBUGVAR, nullptr,
|
||||
|
||||
Reference in New Issue
Block a user