@@ -139,18 +139,18 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
139139
140140 if ((Vars::Aimbot::Melee::SwingPrediction.Value && iSimTicks || m_iDoubletapTicks) && G::CanPrimaryAttack && pWeapon->m_flSmackTime () < 0 .f )
141141 {
142- std::unordered_map<int , MoveStorage> mStorage ;
142+ std::unordered_map<int , MoveStorage> mMoveStorage ;
143143
144- F::MoveSim.Initialize (pLocal, mStorage [I::EngineClient->GetLocalPlayer ()], false , !m_iDoubletapTicks);
144+ F::MoveSim.Initialize (pLocal, mMoveStorage [I::EngineClient->GetLocalPlayer ()], false , !m_iDoubletapTicks);
145145 for (auto & tTarget : vTargets)
146- F::MoveSim.Initialize (tTarget.m_pEntity , mStorage [tTarget.m_pEntity ->entindex ()], false );
146+ F::MoveSim.Initialize (tTarget.m_pEntity , mMoveStorage [tTarget.m_pEntity ->entindex ()], false );
147147
148148 int iMax = std::max (iSimTicks, m_iDoubletapTicks);
149149 int iTicks = iMax; bool bSwung = false ;
150150 for (int i = 0 ; i < iTicks; i++) // intended for plocal to collide with targets
151151 {
152152 {
153- auto & tStorage = mStorage [I::EngineClient->GetLocalPlayer ()];
153+ auto & tMoveStorage = mMoveStorage [I::EngineClient->GetLocalPlayer ()];
154154
155155 if (!bSwung && (!m_iDoubletapTicks || Vars::Doubletap::AntiWarp.Value && pLocal->m_hGroundEntity () || iMax - i <= iSwingTicks))
156156 {
@@ -160,18 +160,18 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
160160
161161 if (pLocal->InCond (TF_COND_SHIELD_CHARGE))
162162 { // demo charge fix for swing pred
163- tStorage .m_MoveData .m_flMaxSpeed = tStorage .m_MoveData .m_flClientMaxSpeed = SDK::MaxSpeed (pLocal, false , true );
164- pLocal->m_flMaxspeed () = tStorage .m_MoveData .m_flMaxSpeed ;
163+ tMoveStorage .m_MoveData .m_flMaxSpeed = tMoveStorage .m_MoveData .m_flClientMaxSpeed = SDK::MaxSpeed (pLocal, false , true );
164+ pLocal->m_flMaxspeed () = tMoveStorage .m_MoveData .m_flMaxSpeed ;
165165 pLocal->RemoveCond (TF_COND_SHIELD_CHARGE);
166166 }
167167 }
168168 if (m_iDoubletapTicks && Vars::Doubletap::AntiWarp.Value && pLocal->m_hGroundEntity ())
169- F::Ticks.AntiWarp (pLocal, pCmd->viewangles .y , tStorage .m_MoveData .m_flForwardMove , tStorage .m_MoveData .m_flSideMove , iMax - i - 1 );
169+ F::Ticks.AntiWarp (pLocal, pCmd->viewangles .y , tMoveStorage .m_MoveData .m_flForwardMove , tMoveStorage .m_MoveData .m_flSideMove , iMax - i - 1 );
170170
171- F::MoveSim.RunTick (tStorage );
171+ F::MoveSim.RunTick (tMoveStorage );
172172 m_mRecordMap[I::EngineClient->GetLocalPlayer ()].emplace_front (
173173 pLocal->m_flSimulationTime () + TICKS_TO_TIME (i + 1 ),
174- tStorage .m_MoveData .m_vecAbsOrigin ,
174+ tMoveStorage .m_MoveData .m_vecAbsOrigin ,
175175 pLocal->m_vecMins (), pLocal->m_vecMaxs ()
176176 );
177177 }
@@ -180,26 +180,26 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
180180 {
181181 for (auto & tTarget : vTargets)
182182 {
183- auto & tStorage = mStorage [tTarget.m_pEntity ->entindex ()];
184- if (tStorage .m_bFailed )
183+ auto & tMoveStorage = mMoveStorage [tTarget.m_pEntity ->entindex ()];
184+ if (tMoveStorage .m_bFailed )
185185 continue ;
186186
187- F::MoveSim.RunTick (tStorage );
187+ F::MoveSim.RunTick (tMoveStorage );
188188 m_mRecordMap[tTarget.m_pEntity ->entindex ()].emplace_front (
189- !Vars::Aimbot::Melee::SwingPredictLag.Value || tStorage .m_bPredictNetworked ? tTarget.m_pEntity ->m_flSimulationTime () + TICKS_TO_TIME (i + 1 ) : 0 .f ,
190- Vars::Aimbot::Melee::SwingPredictLag.Value ? tStorage .m_vPredictedOrigin : tStorage .m_MoveData .m_vecAbsOrigin ,
189+ !Vars::Aimbot::Melee::SwingPredictLag.Value || tMoveStorage .m_bPredictNetworked ? tTarget.m_pEntity ->m_flSimulationTime () + TICKS_TO_TIME (i + 1 ) : 0 .f ,
190+ Vars::Aimbot::Melee::SwingPredictLag.Value ? tMoveStorage .m_vPredictedOrigin : tMoveStorage .m_MoveData .m_vecAbsOrigin ,
191191 tTarget.m_pEntity ->m_vecMins (), tTarget.m_pEntity ->m_vecMaxs ()
192192 );
193193 }
194194 }
195195 }
196- m_vEyePos = mStorage [I::EngineClient->GetLocalPlayer ()].m_MoveData .m_vecAbsOrigin + pLocal->m_vecViewOffset ();
196+ m_vEyePos = mMoveStorage [I::EngineClient->GetLocalPlayer ()].m_MoveData .m_vecAbsOrigin + pLocal->m_vecViewOffset ();
197197 m_flRange = pWeapon->GetSwingRange ();
198198
199199 if (Vars::Visuals::Simulation::SwingLines.Value && Vars::Visuals::Simulation::PlayerPath.Value )
200200 {
201- for (auto & [iIndex, tStorage ] : mStorage )
202- m_mPaths[iIndex] = tStorage .m_vPath ;
201+ for (auto & [iIndex, tMoveStorage ] : mMoveStorage )
202+ m_mPaths[iIndex] = tMoveStorage .m_vPath ;
203203
204204 const bool bAlwaysDraw = !Vars::Aimbot::General::AutoShoot.Value || Vars::Debug::Info.Value ;
205205 if (bAlwaysDraw)
@@ -218,8 +218,8 @@ void CAimbotMelee::UpdateInfo(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCm
218218 }
219219 }
220220
221- for (auto & [_, tStorage ] : mStorage )
222- F::MoveSim.Restore (tStorage );
221+ for (auto & [_, tMoveStorage ] : mMoveStorage )
222+ F::MoveSim.Restore (tMoveStorage );
223223 }
224224
225225 m_bShouldSwing = m_iDoubletapTicks <= iSwingTicks || Vars::Doubletap::AntiWarp.Value && pLocal->m_hGroundEntity ();
@@ -243,7 +243,7 @@ bool CAimbotMelee::CanBackstab(CBaseEntity* pTarget, CTFPlayer* pLocal, Vec3 vEy
243243 }
244244
245245 Vec3 vEyePos = m_vEyePos;
246- const float flCompDist = 0 . 0625f ;
246+ const float flCompDist = PLAYER_ORIGIN_COMPRESSION / 2 ;
247247 const float flSqCompDist = 0 .0884f ;
248248
249249 if (auto pCmd = G::CurrentUserCmd;
@@ -364,8 +364,8 @@ int CAimbotMelee::CanHit(Target_t& tTarget, CTFPlayer* pLocal, CTFWeaponBase* pW
364364 Vec3 vRestoreMaxs = tTarget.m_pEntity ->m_vecMaxs ();
365365
366366 tTarget.m_pEntity ->SetAbsOrigin (pRecord->m_vOrigin );
367- tTarget.m_pEntity ->m_vecMins () = pRecord->m_vMins + 0 . 125f ; // account for origin compression
368- tTarget.m_pEntity ->m_vecMaxs () = pRecord->m_vMaxs - 0 . 125f ;
367+ tTarget.m_pEntity ->m_vecMins () = pRecord->m_vMins + PLAYER_ORIGIN_COMPRESSION ; // account for origin compression
368+ tTarget.m_pEntity ->m_vecMaxs () = pRecord->m_vMaxs - PLAYER_ORIGIN_COMPRESSION ;
369369
370370 Vec3 vDiff = { 0 , 0 , std::clamp (m_vEyePos.z - pRecord->m_vOrigin .z , pRecord->m_vMins .z , pRecord->m_vMaxs .z ) };
371371 tTarget.m_vPos = pRecord->m_vOrigin + vDiff;
@@ -685,7 +685,7 @@ bool CAimbotMelee::RunSapper(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd
685685 else
686686 bShouldAim = pCmd->buttons & IN_ATTACK;
687687 if (Vars::Aimbot::General::AimType.Value == Vars::Aimbot::General::AimTypeEnum::Silent)
688- bShouldAim = bShouldAim && !I::ClientState->chokedcommands && F::Ticks.CanChoke (true );
688+ bShouldAim &= !I::ClientState->chokedcommands && F::Ticks.CanChoke (true );
689689
690690 if (bShouldAim)
691691 {
0 commit comments