From 2745a8e984cce8273ef82c339e10679fc13a637a Mon Sep 17 00:00:00 2001 From: rei-2 <174158077+rei-2@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:10:53 -0400 Subject: [PATCH] improve medigun functionality --- Amalgam/Amalgam.vcxproj | 1 + Amalgam/Amalgam.vcxproj.filters | 1 + Amalgam/src/DllMain.cpp | 1 - .../src/Features/Aimbot/AutoHeal/AutoHeal.cpp | 30 +++++++++ .../src/Features/Aimbot/AutoHeal/AutoHeal.h | 1 + Amalgam/src/Features/Binds/Binds.cpp | 14 ++--- Amalgam/src/Features/Configs/Configs.cpp | 15 ++--- Amalgam/src/Features/CritHack/CritHack.cpp | 8 +-- Amalgam/src/Features/ImGui/Menu/Menu.cpp | 39 ++++++------ .../src/Hooks/CHLClient_FrameStageNotify.cpp | 3 +- .../Hooks/CSoundEmitterSystem_EmitSound.cpp | 2 +- .../CTFRocketLauncher_CheckReloadMisfire.cpp | 4 +- .../Hooks/CWeaponMedigun_PrimaryAttack.cpp | 62 +++++++++++++++++++ .../SDK/Definitions/Main/CTFWeaponBase.cpp | 6 -- 14 files changed, 133 insertions(+), 54 deletions(-) create mode 100644 Amalgam/src/Hooks/CWeaponMedigun_PrimaryAttack.cpp diff --git a/Amalgam/Amalgam.vcxproj b/Amalgam/Amalgam.vcxproj index 54a93d69..0681e00b 100644 --- a/Amalgam/Amalgam.vcxproj +++ b/Amalgam/Amalgam.vcxproj @@ -992,6 +992,7 @@ + diff --git a/Amalgam/Amalgam.vcxproj.filters b/Amalgam/Amalgam.vcxproj.filters index 8dd1612a..cd8c1cf9 100644 --- a/Amalgam/Amalgam.vcxproj.filters +++ b/Amalgam/Amalgam.vcxproj.filters @@ -197,6 +197,7 @@ + diff --git a/Amalgam/src/DllMain.cpp b/Amalgam/src/DllMain.cpp index c2285167..e9e8bd1f 100644 --- a/Amalgam/src/DllMain.cpp +++ b/Amalgam/src/DllMain.cpp @@ -1,7 +1,6 @@ #include #include "Core/Core.h" #include "Utils/CrashLog/CrashLog.h" -#include DWORD WINAPI MainThread(LPVOID lpParam) { diff --git a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp index ba895453..cdc6f573 100644 --- a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp +++ b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp @@ -6,6 +6,34 @@ #include "../../Simulation/ProjectileSimulation/ProjectileSimulation.h" #include "../AimbotProjectile/AimbotProjectile.h" +void CAutoHeal::AutoHeal(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd) +{ // manage lagcomp + if (!Vars::Aimbot::Healing::AutoHeal.Value) + return; + + auto pTarget = pWeapon->m_hHealingTarget().Get()->As(); + if (!pTarget || pCmd->buttons & IN_ATTACK && !(G::LastUserCmd->buttons & IN_ATTACK)) + return; + + std::vector vRecords = {}; + if (!F::Backtrack.GetRecords(pTarget, vRecords)) + return; + vRecords = F::Backtrack.GetValidRecords(vRecords, pLocal, true); + if (!vRecords.size()) + return; + + Vec3 vEyePos = pLocal->GetShootPos(); + for (auto pRecord : vRecords) + { + Vec3 vCenter = pRecord->m_vOrigin + (pRecord->m_vMins + pRecord->m_vMaxs) / 2; + if (SDK::VisPosWorld(pLocal, pTarget, vEyePos, vCenter)) + { + pCmd->tick_count = TIME_TO_TICKS(pRecord->m_flSimTime) + TIME_TO_TICKS(F::Backtrack.GetFakeInterp()); + break; + } + } +} + void CAutoHeal::ActivateOnVoice(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd) { if (!Vars::Aimbot::Healing::ActivateOnVoice.Value) @@ -603,6 +631,8 @@ void CAutoHeal::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd) return; } + AutoHeal(pLocal, pWeapon->As(), pCmd); + ActivateOnVoice(pLocal, pWeapon->As(), pCmd); m_mMedicCallers.clear(); diff --git a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h index a49d6176..3adb923a 100644 --- a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h +++ b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h @@ -6,6 +6,7 @@ class CAutoHeal { private: + void AutoHeal(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd); void ActivateOnVoice(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd); void AutoVaccinator(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd); void GetDangers(CTFPlayer* pTarget, bool bVaccinator, float& flBulletDanger, float& flBlastDanger, float& flFireDanger); diff --git a/Amalgam/src/Features/Binds/Binds.cpp b/Amalgam/src/Features/Binds/Binds.cpp index 6475de53..573f8d0b 100644 --- a/Amalgam/src/Features/Binds/Binds.cpp +++ b/Amalgam/src/Features/Binds/Binds.cpp @@ -139,9 +139,8 @@ void CBinds::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon) if (G::Unload) return; - for (auto it = m_vBinds.begin(); it < m_vBinds.end(); it++) + for (auto& tBind : m_vBinds) { // don't delay inputs for binds - auto& tBind = *it; if (tBind.m_iType != BindEnum::Key) continue; @@ -162,9 +161,8 @@ void CBinds::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon) SetVars(pLocal, pWeapon); - for (auto it = m_vBinds.begin(); it < m_vBinds.end(); it++) + for (auto& tBind : m_vBinds) { // clear inputs for binds - auto& tBind = *it; if (tBind.m_iType != BindEnum::Key) continue; @@ -247,11 +245,11 @@ void CBinds::RemoveBind(int iBind, bool bForce) std::vector vErases = {}; std::function searchBinds = [&](int iIndex) { - for (auto it = m_vBinds.begin(); it < m_vBinds.end(); it++) + for (int iBind = 0; iBind < m_vBinds.size(); iBind++) { - int iIndex2 = std::distance(m_vBinds.begin(), it); - if (iIndex == it->m_iParent && iIndex != iIndex2) - searchBinds(iIndex2); + auto& tBind = m_vBinds[iBind]; + if (iIndex == tBind.m_iParent && iIndex != iBind) + searchBinds(iBind); } vErases.push_back(iIndex); }; diff --git a/Amalgam/src/Features/Configs/Configs.cpp b/Amalgam/src/Features/Configs/Configs.cpp index 4e261778..6f1b00f3 100644 --- a/Amalgam/src/Features/Configs/Configs.cpp +++ b/Amalgam/src/Features/Configs/Configs.cpp @@ -335,10 +335,9 @@ bool CConfigs::SaveConfig(const std::string& sConfigName, bool bNotify) { boost::property_tree::ptree tSub; - for (auto it = F::Binds.m_vBinds.begin(); it != F::Binds.m_vBinds.end(); it++) + for (int iID = 0; iID < F::Binds.m_vBinds.size(); iID++) { - int iID = std::distance(F::Binds.m_vBinds.begin(), it); - auto& tBind = *it; + auto& tBind = F::Binds.m_vBinds[iID]; boost::property_tree::ptree tChild; SaveJson(tChild, "Name", tBind.m_sName); @@ -381,10 +380,9 @@ bool CConfigs::SaveConfig(const std::string& sConfigName, bool bNotify) { boost::property_tree::ptree tSub; - for (auto it = F::Groups.m_vGroups.begin(); it != F::Groups.m_vGroups.end(); it++) + for (int iID = 0; iID < F::Groups.m_vGroups.size(); iID++) { - int iID = std::distance(F::Groups.m_vGroups.begin(), it); - auto& tGroup = *it; + auto& tGroup = F::Groups.m_vGroups[iID]; boost::property_tree::ptree tChild; SaveJson(tChild, "Name", tGroup.m_sName); @@ -588,10 +586,9 @@ bool CConfigs::SaveVisual(const std::string& sConfigName, bool bNotify) { boost::property_tree::ptree tSub; - for (auto it = F::Groups.m_vGroups.begin(); it != F::Groups.m_vGroups.end(); it++) + for (int iID = 0; iID < F::Groups.m_vGroups.size(); iID++) { - int iID = std::distance(F::Groups.m_vGroups.begin(), it); - auto& tGroup = *it; + auto& tGroup = F::Groups.m_vGroups[iID]; boost::property_tree::ptree tChild; SaveJson(tChild, "Name", tGroup.m_sName); diff --git a/Amalgam/src/Features/CritHack/CritHack.cpp b/Amalgam/src/Features/CritHack/CritHack.cpp index 559001bf..06c23543 100644 --- a/Amalgam/src/Features/CritHack/CritHack.cpp +++ b/Amalgam/src/Features/CritHack/CritHack.cpp @@ -544,11 +544,11 @@ void CCritHack::StoreHealthHistory(int iIndex, int iHealth, bool bDamage) MAKE_SIGNATURE(CTFGameStats_FindPlayerStats, "server.dll", "4C 8B C1 48 85 D2 75", 0x0); MAKE_SIGNATURE(UTIL_PlayerByIndex, "server.dll", "48 83 EC ? 8B D1 85 C9 7E ? 48 8B 05", 0x0); -static void* pCTFGameStats = nullptr; +static void* s_pCTFGameStats = nullptr; MAKE_HOOK(CTFGameStats_FindPlayerStats, S::CTFGameStats_FindPlayerStats(), void*, void* rcx, CBasePlayer* pPlayer) { - pCTFGameStats = rcx; + s_pCTFGameStats = rcx; return CALL_ORIGINAL(rcx, pPlayer); } #endif @@ -659,11 +659,11 @@ void CCritHack::Draw(CTFPlayer* pLocal) #ifdef SERVER_CRIT_DATA H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("AllDamage: {} ({})", m_iRangedDamage + m_iMeleeDamage, m_iMeleeDamage).c_str()); - if (pCTFGameStats) + if (s_pCTFGameStats) { if (auto pPlayer2 = S::UTIL_PlayerByIndex.Call(I::EngineClient->GetLocalPlayer())) { - if (auto pPlayerStats = S::CTFGameStats_FindPlayerStats.Call(pCTFGameStats, pPlayer2)) + if (auto pPlayerStats = S::CTFGameStats_FindPlayerStats.Call(s_pCTFGameStats, pPlayer2)) { int iRangedDamage = pPlayerStats->statsCurrentRound.m_iStat[TFSTAT_DAMAGE_RANGED] /*= m_iRangedDamage*/; int iCritDamage = pPlayerStats->statsCurrentRound.m_iStat[TFSTAT_DAMAGE_RANGED_CRIT_RANDOM] /*= m_iCritDamage = 0*/; diff --git a/Amalgam/src/Features/ImGui/Menu/Menu.cpp b/Amalgam/src/Features/ImGui/Menu/Menu.cpp index 14f4c428..6c4fe683 100644 --- a/Amalgam/src/Features/ImGui/Menu/Menu.cpp +++ b/Amalgam/src/Features/ImGui/Menu/Menu.cpp @@ -2520,10 +2520,9 @@ void CMenu::MenuSettings(int iTab) std::unordered_map mBinds = {}; std::function getBinds = [&](int iParent) { - for (auto it = F::Binds.m_vBinds.begin(); it < F::Binds.m_vBinds.end(); it++) + for (int _iBind = 0; _iBind < F::Binds.m_vBinds.size(); _iBind++) { - int _iBind = std::distance(F::Binds.m_vBinds.begin(), it); - auto& _tBind = *it; + auto& _tBind = F::Binds.m_vBinds[_iBind]; if (iParent != _tBind.m_iParent || mBinds.contains(_iBind)) continue; @@ -2565,10 +2564,9 @@ void CMenu::MenuSettings(int iTab) std::unordered_map mBinds = {}; std::function getBinds = [&](int iParent, int x) { - for (auto it = F::Binds.m_vBinds.begin(); it < F::Binds.m_vBinds.end(); it++) + for (int _iBind = 0; _iBind < F::Binds.m_vBinds.size(); _iBind++) { - int _iBind = std::distance(F::Binds.m_vBinds.begin(), it); - auto& _tBind = *it; + auto& _tBind = F::Binds.m_vBinds[_iBind]; if (iParent != DEFAULT_BIND - 1 && iParent != _tBind.m_iParent || mBinds.contains(_iBind)) continue; @@ -3325,7 +3323,7 @@ struct DragBoxStorage_t DragBox_t m_tDragBox; float m_flScale; }; -static std::unordered_map mDragBoxStorage = {}; +static std::unordered_map s_mDragBoxStorage = {}; void CMenu::AddDraggable(const char* sLabel, ConfigVar& var, bool bShouldDraw, ImVec2 vSize) { using namespace ImGui; @@ -3336,8 +3334,8 @@ void CMenu::AddDraggable(const char* sLabel, ConfigVar& var, bool bSh auto tDragBox = FGet(var, true); auto uHash = FNV1A::Hash32(sLabel); - bool bContains = mDragBoxStorage.contains(uHash); - auto& tStorage = mDragBoxStorage[uHash]; + bool bContains = s_mDragBoxStorage.contains(uHash); + auto& tStorage = s_mDragBoxStorage[uHash]; SetNextWindowSize(vSize, ImGuiCond_Always); if (!bContains || tDragBox != tStorage.m_tDragBox || H::Draw.Scale() != tStorage.m_flScale) @@ -3373,7 +3371,7 @@ struct WindowBoxStorage_t WindowBox_t m_tWindowBox; float m_flScale; }; -static std::unordered_map mWindowBoxStorage = {}; +static std::unordered_map s_mWindowBoxStorage = {}; void CMenu::AddResizableDraggable(const char* sLabel, ConfigVar& var, bool bShouldDraw, ImVec2 vMinSize, ImVec2 vMaxSize, ImGuiSizeCallback fCustomCallback) { using namespace ImGui; @@ -3384,8 +3382,8 @@ void CMenu::AddResizableDraggable(const char* sLabel, ConfigVar& va auto tWindowBox = FGet(var, true); auto uHash = FNV1A::Hash32(sLabel); - bool bContains = mWindowBoxStorage.contains(uHash); - auto& tStorage = mWindowBoxStorage[uHash]; + bool bContains = s_mWindowBoxStorage.contains(uHash); + auto& tStorage = s_mWindowBoxStorage[uHash]; SetNextWindowSizeConstraints(vMinSize, vMaxSize, fCustomCallback); if (!bContains || tWindowBox != tStorage.m_tWindowBox || H::Draw.Scale() != tStorage.m_flScale) @@ -3439,10 +3437,9 @@ void CMenu::DrawBinds() std::vector vInfo; std::function getBinds = [&](int iParent) { - for (auto it = F::Binds.m_vBinds.begin(); it < F::Binds.m_vBinds.end(); it++) + for (int iBind = 0; iBind < F::Binds.m_vBinds.size(); iBind++) { - int iBind = std::distance(F::Binds.m_vBinds.begin(), it); - auto& tBind = *it; + auto& tBind = F::Binds.m_vBinds[iBind]; if (iParent != tBind.m_iParent || !tBind.m_bEnabled && !m_bIsOpen) continue; @@ -3504,10 +3501,10 @@ void CMenu::DrawBinds() if (vInfo.empty()) return; - static DragBox_t old = { -2147483648, -2147483648 }; - DragBox_t info = m_bIsOpen ? FGet(Vars::Menu::BindsDisplay, true) : Vars::Menu::BindsDisplay.Value; - if (info != old) - SetNextWindowPos({ float(info.x), float(info.y) }, ImGuiCond_Always); + static DragBox_t tOld = { -2147483648, -2147483648 }; + DragBox_t tDragBox = m_bIsOpen ? FGet(Vars::Menu::BindsDisplay, true) : Vars::Menu::BindsDisplay.Value; + if (tDragBox != tOld) + SetNextWindowPos({ float(tDragBox.x), float(tDragBox.y) }, ImGuiCond_Always); float flNameWidth = 0, flInfoWidth = 0, flStateWidth = 0; PushFont(F::Render.FontSmall); @@ -3533,9 +3530,9 @@ void CMenu::DrawBinds() else RenderBackground(F::Render.Background0p5, F::Render.Background2); - info.x = vWindowPos.x; info.y = vWindowPos.y; old = info; + tDragBox.x = vWindowPos.x; tDragBox.y = vWindowPos.y; tOld = tDragBox; if (m_bIsOpen) - FSet(Vars::Menu::BindsDisplay, info); + FSet(Vars::Menu::BindsDisplay, tDragBox); int iListStart = 8; if (Vars::Menu::BindWindowTitle.Value) diff --git a/Amalgam/src/Hooks/CHLClient_FrameStageNotify.cpp b/Amalgam/src/Hooks/CHLClient_FrameStageNotify.cpp index 32a226fa..196520d6 100644 --- a/Amalgam/src/Hooks/CHLClient_FrameStageNotify.cpp +++ b/Amalgam/src/Hooks/CHLClient_FrameStageNotify.cpp @@ -64,9 +64,8 @@ MAKE_HOOK(CHLClient_FrameStageNotify, U::Memory.GetVirtual(I::Client, 35), void, break; } case FRAME_RENDER_START: - for (auto it = F::Binds.m_vBinds.begin(); it < F::Binds.m_vBinds.end(); it++) + for (auto& tBind : F::Binds.m_vBinds) { // don't drop inputs for binds - auto& tBind = *it; if (tBind.m_iType != BindEnum::Key) continue; diff --git a/Amalgam/src/Hooks/CSoundEmitterSystem_EmitSound.cpp b/Amalgam/src/Hooks/CSoundEmitterSystem_EmitSound.cpp index 2b8e1414..740026d1 100644 --- a/Amalgam/src/Hooks/CSoundEmitterSystem_EmitSound.cpp +++ b/Amalgam/src/Hooks/CSoundEmitterSystem_EmitSound.cpp @@ -94,7 +94,7 @@ const static std::vector s_vNoisemaker = { "items\\halloween", "ite const static std::vector s_vFryingPan = { "pan_" }; const static std::vector s_vWater = { "ambient_mp3\\water\\water_splash", "slosh", "wade" }; -static bool ShouldBlockSound(const char* pSound) +static inline bool ShouldBlockSound(const char* pSound) { if (!Vars::Misc::Sound::Block.Value || !pSound) return false; diff --git a/Amalgam/src/Hooks/CTFRocketLauncher_CheckReloadMisfire.cpp b/Amalgam/src/Hooks/CTFRocketLauncher_CheckReloadMisfire.cpp index 88649781..e81bef0b 100644 --- a/Amalgam/src/Hooks/CTFRocketLauncher_CheckReloadMisfire.cpp +++ b/Amalgam/src/Hooks/CTFRocketLauncher_CheckReloadMisfire.cpp @@ -10,7 +10,7 @@ MAKE_HOOK(CTFRocketLauncher_CheckReloadMisfire, S::CTFRocketLauncher_CheckReload if (!SDK::AttribHookValue(0, "can_overload", pWeapon)) return false; - auto pPlayer = pWeapon->m_hOwner()->As(); + auto pOwner = pWeapon->m_hOwner()->As(); int iClip1 = pWeapon->m_iClip1(); if (pWeapon->m_bRemoveable()) // just using this var since it's in the datamap and doesn't seem to be used on the client { @@ -22,7 +22,7 @@ MAKE_HOOK(CTFRocketLauncher_CheckReloadMisfire, S::CTFRocketLauncher_CheckReload else pWeapon->m_bRemoveable() = false; } - else if (iClip1 >= pWeapon->GetMaxClip1() || iClip1 > 0 && pPlayer && pPlayer->GetAmmoCount(pWeapon->m_iPrimaryAmmoType()) == 0) + else if (iClip1 >= pWeapon->GetMaxClip1() || iClip1 > 0 && pOwner && pOwner->GetAmmoCount(pWeapon->m_iPrimaryAmmoType()) == 0) { pWeapon->CalcIsAttackCritical(); pWeapon->m_bRemoveable() = true; diff --git a/Amalgam/src/Hooks/CWeaponMedigun_PrimaryAttack.cpp b/Amalgam/src/Hooks/CWeaponMedigun_PrimaryAttack.cpp new file mode 100644 index 00000000..87a0036c --- /dev/null +++ b/Amalgam/src/Hooks/CWeaponMedigun_PrimaryAttack.cpp @@ -0,0 +1,62 @@ +#include "../SDK/SDK.h" + +#include "../Features/Backtrack/Backtrack.h" + +MAKE_SIGNATURE(CWeaponMedigun_PrimaryAttack, "client.dll", "40 53 48 83 EC ? 8B 91 ? ? ? ? 48 8B D9 85 D2 0F 84 ? ? ? ? 48 89 7C 24 ? B8 ? ? ? ? 83 FA ? 74 ? 0F B7 C2 48 8B 3D ? ? ? ? 8B C8 48 83 C7 ? 48 C1 E1 ? 48 03 F9 0F 84 ? ? ? ? C1 EA ? 39 57 ? 0F 85 ? ? ? ? 48 8B 3F 48 85 FF 74", 0x0); + +struct Restore_t +{ + Vec3 m_vOrigin; + Vec3 m_vMins; + Vec3 m_vMaxs; +}; + +MAKE_HOOK(CWeaponMedigun_PrimaryAttack, S::CWeaponMedigun_PrimaryAttack(), void, + void* rcx) +{ + auto pWeapon = reinterpret_cast(rcx); + auto pOwner = pWeapon->m_hOwner()->As(); + if (!pOwner || !pOwner->m_pCurrentCommand()) + return CALL_ORIGINAL(rcx); + + // do pseudo lagcomp for the client + std::unordered_map mRestore = {}; + + auto pCmd = pOwner->m_pCurrentCommand(); + float flTargetTime = TICKS_TO_TIME(pCmd->tick_count - TIME_TO_TICKS(F::Backtrack.GetFakeInterp())); + for (auto pEntity : H::Entities.GetGroup(EGroupType::PLAYERS_TEAMMATES)) + { + auto pPlayer = pEntity->As(); + if (pPlayer == pOwner || !pPlayer->IsAlive() || pPlayer->IsAGhost()) + continue; + + std::vector vRecords = {}; + if (!F::Backtrack.GetRecords(pEntity, vRecords)) + continue; + vRecords = F::Backtrack.GetValidRecords(vRecords); + if (!vRecords.size()) + continue; + + for (auto pRecord : vRecords) + { + if (pRecord->m_flSimTime <= flTargetTime) + { + mRestore[pEntity] = { pEntity->GetAbsOrigin(), pEntity->m_vecMins(), pEntity->m_vecMaxs() }; + pEntity->SetAbsOrigin(pRecord->m_vOrigin); + pEntity->m_vecMins() = pRecord->m_vMins; + pEntity->m_vecMaxs() = pRecord->m_vMaxs; + break; + } + } + } + + CALL_ORIGINAL(rcx); + + for (auto& [pEntity, tRestore] : mRestore) + { + pEntity->SetAbsOrigin(tRestore.m_vOrigin); + pEntity->m_vecMins() = tRestore.m_vMins; + pEntity->m_vecMaxs() = tRestore.m_vMaxs; + } + mRestore.clear(); +} \ No newline at end of file diff --git a/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.cpp b/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.cpp index 47b12dd7..87e3447b 100644 --- a/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.cpp +++ b/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.cpp @@ -154,12 +154,6 @@ float CTFWeaponBase::GetSmackDelay() float CTFWeaponBase::GetRange() { - switch (GetWeaponID()) - { - case TF_WEAPON_MEDIGUN: return 450.f; - case TF_WEAPON_MECHANICAL_ARM: return 256.f; - } - if (auto pWeaponInfo = GetWeaponInfo()) #ifdef WEAPONDATA_USES_WEAPONMODE return pWeaponInfo->GetWeaponData(m_iWeaponMode()).m_flRange;