diff --git a/Amalgam/src/Core/Core.cpp b/Amalgam/src/Core/Core.cpp index 6ae37b1b..2c29b98d 100644 --- a/Amalgam/src/Core/Core.cpp +++ b/Amalgam/src/Core/Core.cpp @@ -112,7 +112,7 @@ void CCore::Load() if (m_bUnload = m_bFailed2 = !U::Hooks.Initialize() || !U::BytePatches.Initialize() || !H::Events.Initialize()) return; F::Materials.LoadMaterials(); - + H::Fonts.Reload(Vars::Menu::Scale[DEFAULT_BIND]); F::Configs.LoadConfig(F::Configs.m_sCurrentConfig, false); SDK::Output("Amalgam", "Loaded", DEFAULT_COLOR, OUTPUT_CONSOLE | OUTPUT_TOAST | OUTPUT_MENU | OUTPUT_DEBUG); @@ -145,7 +145,6 @@ void CCore::Unload() if (F::Menu.m_bIsOpen) I::MatSystemSurface->SetCursorAlwaysVisible(false); - F::Visuals.RestoreWorldModulation(); if (I::Input->CAM_IsThirdPerson()) { if (auto pLocal = H::Entities.GetLocal()) @@ -154,6 +153,7 @@ void CCore::Unload() pLocal->ThirdPersonSwitch(); } } + F::Visuals.RestoreWorldModulation(); H::ConVars.FindVar("cl_wpn_sway_interp")->SetValue(0.f); H::ConVars.FindVar("cl_wpn_sway_scale")->SetValue(0.f); diff --git a/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp b/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp index a6fab038..516dc67f 100644 --- a/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp +++ b/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp @@ -685,7 +685,7 @@ bool CAimbotMelee::RunSapper(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd else bShouldAim = pCmd->buttons & IN_ATTACK; if (Vars::Aimbot::General::AimType.Value == Vars::Aimbot::General::AimTypeEnum::Silent) - bShouldAim = bShouldAim && !I::ClientState->chokedcommands && F::Ticks.CanChoke(true); + bShouldAim &= !I::ClientState->chokedcommands && F::Ticks.CanChoke(true); if (bShouldAim) { diff --git a/Amalgam/src/Features/Binds/Binds.cpp b/Amalgam/src/Features/Binds/Binds.cpp index 6d040384..c992f825 100644 --- a/Amalgam/src/Features/Binds/Binds.cpp +++ b/Amalgam/src/Features/Binds/Binds.cpp @@ -67,7 +67,7 @@ static inline void GetBinds(int iParent, CTFPlayer* pLocal, CTFWeaponBase* pWeap case BindEnum::KeyEnum::Toggle: bKey = U::KeyHandler.Pressed(tBind.m_iKey, false, &tBind.m_tKeyStorage); break; case BindEnum::KeyEnum::DoubleClick: bKey = U::KeyHandler.Double(tBind.m_iKey, false, &tBind.m_tKeyStorage); break; } - bKey = bKey && (!s_bUI || s_bMenu && (!F::Menu.m_bWindowHovered || tBind.m_iKey != VK_LBUTTON && tBind.m_iKey != VK_RBUTTON)); // allow in menu + bKey &= !s_bUI || s_bMenu && (!F::Menu.m_bWindowHovered || tBind.m_iKey != VK_LBUTTON && tBind.m_iKey != VK_RBUTTON); // allow in menu switch (tBind.m_iInfo) { diff --git a/Amalgam/src/Features/ImGui/Menu/Components.h b/Amalgam/src/Features/ImGui/Menu/Components.h index d8b662e0..44285580 100644 --- a/Amalgam/src/Features/ImGui/Menu/Components.h +++ b/Amalgam/src/Features/ImGui/Menu/Components.h @@ -2536,17 +2536,17 @@ namespace ImGui if (IconButton(tBind.m_iVisibility == BindVisibilityEnum::Always ? ICON_MD_VISIBILITY : ICON_MD_VISIBILITY_OFF, H::Draw.Scale(24), { 1, 1, 1, -1 }, &bHovered)) tBind.m_iVisibility = (tBind.m_iVisibility + 1) % 3; PopTransparent(1, 1); - bLastHovered = bLastHovered || bHovered; + bLastHovered |= bHovered; SetCursorPos({ GetWindowWidth() - H::Draw.Scale(iOffset += 25), H::Draw.Scale(36) }); if (IconButton(!tBind.m_bNot ? ICON_MD_CODE : ICON_MD_CODE_OFF, H::Draw.Scale(24), { 1, 1, 1, -1 }, &bHovered)) tBind.m_bNot = !tBind.m_bNot; - bLastHovered = bLastHovered || bHovered; + bLastHovered |= bHovered; SetCursorPos({ GetWindowWidth() - H::Draw.Scale(iOffset += 25), H::Draw.Scale(36) }); if (IconButton(!tBind.m_bEnabled ? ICON_MD_TOGGLE_OFF : ICON_MD_TOGGLE_ON, H::Draw.Scale(24), { 1, 1, 1, -1 }, &bHovered)) tBind.m_bEnabled = !tBind.m_bEnabled; - bLastHovered = bLastHovered || bHovered; + bLastHovered |= bHovered; PopTransparent(1, 1); @@ -2554,7 +2554,7 @@ namespace ImGui } FDropdown("Type", &tBind.m_iType, { "Key", "Class", "Weapon type", "Item slot", "Misc" }, {}, FDropdownEnum::Left, 0, "None", &bHovered); - bLastHovered = bLastHovered || bHovered; + bLastHovered |= bHovered; switch (tBind.m_iType) { case BindEnum::Key: FDropdown("Behavior", &tBind.m_iInfo, { "Hold", "Toggle", "Double click" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; @@ -2563,12 +2563,12 @@ namespace ImGui case BindEnum::ItemSlot: FDropdown("Item slot", &tBind.m_iInfo, { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; case BindEnum::Misc: FDropdown("Misc", &tBind.m_iInfo, { "Spectated", "Spectated 1st", "Spectated 3rd", "##Divider", "Zoomed", "Aiming" }, {}, FDropdownEnum::Right); break; } - bLastHovered = bLastHovered || bHovered; + bLastHovered |= bHovered; if (tBind.m_iType == BindEnum::Key) { FKeybind("Key", tBind.m_iKey, FKeybindEnum::None, { Vars::Menu::PrimaryKey[DEFAULT_BIND], Vars::Menu::SecondaryKey[DEFAULT_BIND] }, { 0, 30 }, 0, &bHovered); - bLastHovered = bLastHovered || bHovered; + bLastHovered |= bHovered; } if (!Disabled && iBind != DEFAULT_BIND && iBind < F::Binds.m_vBinds.size()) @@ -2623,7 +2623,7 @@ namespace ImGui DrawBindInfo(var, staticVal, StripDoubleHash(sBind.c_str()), bNewPopup, bLastHovered); \ val = staticVal; \ function(std::format("{}## Bind", var.m_vNames.front()).c_str(), arguments, &bHovered); \ - bLastHovered = bLastHovered || bHovered; \ + bLastHovered |= bHovered; \ staticVal = val; \ PopTransparent(2); \ EndPopup(); \ diff --git a/Amalgam/src/Features/ImGui/Menu/Menu.cpp b/Amalgam/src/Features/ImGui/Menu/Menu.cpp index 1716a1b5..e3c056b6 100644 --- a/Amalgam/src/Features/ImGui/Menu/Menu.cpp +++ b/Amalgam/src/Features/ImGui/Menu/Menu.cpp @@ -1395,7 +1395,7 @@ void CMenu::MenuLogs(int iTab) } SetCursorPos(vOriginalPos); Button(std::format("##{}", tPlayer.m_iUserID).c_str(), { flWidth, flHeight }); - bPopup = bPopup || IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right); + bPopup |= IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right); // popups if (bPopup) @@ -2112,12 +2112,12 @@ void CMenu::MenuLogs(int iTab) try { int iBackupCount = 0; - for (auto& entry : std::filesystem::directory_iterator(F::Configs.m_sCorePath)) + for (auto& tEntry : std::filesystem::directory_iterator(F::Configs.m_sCorePath)) { - if (!entry.is_regular_file() || entry.path().extension() != F::Configs.m_sConfigExtension) + if (!tEntry.is_regular_file() || tEntry.path().extension() != F::Configs.m_sConfigExtension) continue; - std::string sConfigName = entry.path().filename().string(); + std::string sConfigName = tEntry.path().filename().string(); sConfigName.erase(sConfigName.end() - F::Configs.m_sConfigExtension.size(), sConfigName.end()); if (sConfigName.find("Backup") != std::string::npos) iBackupCount++; @@ -3138,7 +3138,6 @@ void CMenu::MenuSettings(int iTab) EndPopup(); } } - } EndSection(); if (Vars::Debug::Options.Value && I::EngineClient->IsConnected()) { diff --git a/Amalgam/src/Features/NoSpread/NoSpreadHitscan/NoSpreadHitscan.cpp b/Amalgam/src/Features/NoSpread/NoSpreadHitscan/NoSpreadHitscan.cpp index 87f8320e..3c4d899e 100644 --- a/Amalgam/src/Features/NoSpread/NoSpreadHitscan/NoSpreadHitscan.cpp +++ b/Amalgam/src/Features/NoSpread/NoSpreadHitscan/NoSpreadHitscan.cpp @@ -86,14 +86,14 @@ bool CNoSpreadHitscan::ParsePlayerPerf(const std::string& sMsg) if (!Vars::Aimbot::General::NoSpread.Value) return false; - std::smatch match; std::regex_match(sMsg, match, std::regex(R"((\d+.\d+)\s\d+\s\d+\s\d+.\d+\s\d+.\d+\svel\s\d+.\d+)")); + std::smatch tMatch; std::regex_match(sMsg, tMatch, std::regex(R"((\d+.\d+)\s\d+\s\d+\s\d+.\d+\s\d+.\d+\svel\s\d+.\d+)")); - if (match.size() == 2) + if (tMatch.size() == 2) { m_bWaitingForPlayerPerf = false; // credits to kgb for idea - float flNewServerTime = std::stof(match[1].str()); + float flNewServerTime = std::stof(tMatch[1].str()); if (flNewServerTime < m_flServerTime) return true; diff --git a/Amalgam/src/Features/Resolver/Resolver.cpp b/Amalgam/src/Features/Resolver/Resolver.cpp index ed2242f3..9867fcab 100644 --- a/Amalgam/src/Features/Resolver/Resolver.cpp +++ b/Amalgam/src/Features/Resolver/Resolver.cpp @@ -82,7 +82,7 @@ void CResolver::FrameStageNotify() } } -void CResolver::CreateMove(CTFPlayer* pLocal) +void CResolver::CreateMove() { if (m_iWaitingForTarget != -1 && m_flWaitingForDamage < I::GlobalVars->curtime) { diff --git a/Amalgam/src/Features/Resolver/Resolver.h b/Amalgam/src/Features/Resolver/Resolver.h index f7a2d76e..47db7fee 100644 --- a/Amalgam/src/Features/Resolver/Resolver.h +++ b/Amalgam/src/Features/Resolver/Resolver.h @@ -38,7 +38,7 @@ private: public: void FrameStageNotify(); - void CreateMove(CTFPlayer* pLocal); + void CreateMove(); void HitscanRan(CTFPlayer* pLocal, CTFPlayer* pTarget, CTFWeaponBase* pWeapon, int nHitbox = HITBOX_MAX); void PlayerHurt(IGameEvent* pEvent); void SetYaw(int iUserID, float flValue, bool bAuto = false); diff --git a/Amalgam/src/Features/Ticks/Ticks.cpp b/Amalgam/src/Features/Ticks/Ticks.cpp index f3ab5bb2..090d3e2a 100644 --- a/Amalgam/src/Features/Ticks/Ticks.cpp +++ b/Amalgam/src/Features/Ticks/Ticks.cpp @@ -189,7 +189,7 @@ void CTicks::Move(float accumulated_extra_samples, bool bFinalTick) while (m_iShiftedTicks > m_iShiftedGoal) { - m_bShifting = m_bShifted = m_bShifted || m_iShiftedTicks - 1 != m_iShiftedGoal; + m_bShifting = m_bShifted |= m_iShiftedTicks - 1 != m_iShiftedGoal; MoveFunc(accumulated_extra_samples, m_iShiftedTicks - 1 == m_iShiftedGoal); } diff --git a/Amalgam/src/Features/Visuals/Materials/Materials.cpp b/Amalgam/src/Features/Visuals/Materials/Materials.cpp index b003780a..2eaedcf3 100644 --- a/Amalgam/src/Features/Visuals/Materials/Materials.cpp +++ b/Amalgam/src/Features/Visuals/Materials/Materials.cpp @@ -158,17 +158,17 @@ void CMaterials::LoadMaterials() "\n}", true); // user materials - for (auto& entry : std::filesystem::directory_iterator(F::Configs.m_sMaterialsPath)) + for (auto& tEntry : std::filesystem::directory_iterator(F::Configs.m_sMaterialsPath)) { // Ignore all non-material files - if (!entry.is_regular_file() || entry.path().extension() != std::string(".vmt")) + if (!tEntry.is_regular_file() || tEntry.path().extension() != std::string(".vmt")) continue; - std::ifstream fStream(entry.path()); + std::ifstream fStream(tEntry.path()); if (!fStream.good()) continue; - std::string sName = entry.path().filename().string(); + std::string sName = tEntry.path().filename().string(); sName.erase(sName.end() - 4, sName.end()); std::string sVMT((std::istreambuf_iterator(fStream)), std::istreambuf_iterator()); diff --git a/Amalgam/src/Hooks/CBasePlayer_CalcViewModelView.cpp b/Amalgam/src/Hooks/CBasePlayer_CalcViewModelView.cpp index cfd24ac4..71672c02 100644 --- a/Amalgam/src/Hooks/CBasePlayer_CalcViewModelView.cpp +++ b/Amalgam/src/Hooks/CBasePlayer_CalcViewModelView.cpp @@ -17,8 +17,7 @@ MAKE_HOOK(CBaseViewModel_CalcViewModelView, S::CBaseViewModel_CalcViewModelView( if (Vars::Visuals::Viewmodel::ViewmodelAim.Value) { - auto pLocal = H::Entities.GetLocal(); - if (pLocal && pLocal->IsAlive() && G::AimPoint.m_iTickCount) + if (auto pLocal = H::Entities.GetLocal(); pLocal && pLocal->IsAlive() && G::AimPoint.m_iTickCount) { Vec3 vDiff = I::EngineClient->GetViewAngles() - Math::CalcAngle(eyePosition, G::AimPoint.m_vOrigin); if (bFlip) diff --git a/Amalgam/src/Hooks/CClientModeShared_OverrideView.cpp b/Amalgam/src/Hooks/CClientModeShared_OverrideView.cpp index 3c6b5310..d2851ab4 100644 --- a/Amalgam/src/Hooks/CClientModeShared_OverrideView.cpp +++ b/Amalgam/src/Hooks/CClientModeShared_OverrideView.cpp @@ -9,8 +9,7 @@ MAKE_HOOK(CClientModeShared_OverrideView, U::Memory.GetVirtual(I::ClientModeShar CALL_ORIGINAL(rcx, pView); - auto pLocal = H::Entities.GetLocal(); - if (pLocal && pView) + if (auto pLocal = H::Entities.GetLocal(); pLocal && pView) { F::Visuals.FOV(pLocal, pView); F::Visuals.ThirdPerson(pLocal, pView); diff --git a/Amalgam/src/Hooks/CHLClient_CreateMove.cpp b/Amalgam/src/Hooks/CHLClient_CreateMove.cpp index cac54555..bead961f 100644 --- a/Amalgam/src/Hooks/CHLClient_CreateMove.cpp +++ b/Amalgam/src/Hooks/CHLClient_CreateMove.cpp @@ -254,7 +254,7 @@ MAKE_HOOK(CHLClient_CreateMove, U::Memory.GetVirtual(I::Client, 21), void, F::Ticks.End(pLocal, pCmd); F::CritHack.Run(pLocal, pWeapon, pCmd); F::NoSpread.Run(pLocal, pWeapon, pCmd); - F::Resolver.CreateMove(pLocal); + F::Resolver.CreateMove(); F::Misc.RunPost(pLocal, pCmd); F::PacketManip.Run(pLocal, pWeapon, pCmd, pSendPacket); F::Visuals.CreateMove(pLocal, pWeapon); diff --git a/Amalgam/src/Hooks/CL_ProcessPacketEntities.cpp b/Amalgam/src/Hooks/CL_ProcessPacketEntities.cpp index 8c3583b4..30e90671 100644 --- a/Amalgam/src/Hooks/CL_ProcessPacketEntities.cpp +++ b/Amalgam/src/Hooks/CL_ProcessPacketEntities.cpp @@ -17,7 +17,7 @@ MAKE_HOOK(CL_ProcessPacketEntities, S::CL_ProcessPacketEntities(), bool, if (entmsg->m_bIsDelta) // we won't need to restore return CALL_ORIGINAL(entmsg); - CTFPlayer* pLocal = H::Entities.GetLocal(); + auto pLocal = H::Entities.GetLocal(); if (!pLocal || !pLocal->m_hMyWeapons()) { SDK::Output("ProcessPacketEntities", "Failed to restore weapon crit data! (1)", { 255, 100, 100 }); diff --git a/Amalgam/src/Hooks/Cbuf_ExecuteCommand.cpp b/Amalgam/src/Hooks/Cbuf_ExecuteCommand.cpp index 5de3aace..6f7989fa 100644 --- a/Amalgam/src/Hooks/Cbuf_ExecuteCommand.cpp +++ b/Amalgam/src/Hooks/Cbuf_ExecuteCommand.cpp @@ -121,16 +121,16 @@ static std::vector> s_vDynamic = { while (true) { - std::smatch match; std::regex_search(s_sCmdString, match, std::regex(sRegex)); - if (match.size() != 4) + std::smatch tMatch; std::regex_search(s_sCmdString, tMatch, std::regex(sRegex)); + if (tMatch.size() != 4) break; - int r = !match[1].str().empty() ? std::stoi(match[1]) : 255; - int g = !match[2].str().empty() ? std::stoi(match[2]) : 255; - int b = !match[3].str().empty() ? std::stoi(match[3]) : 255; + int r = !tMatch[1].str().empty() ? std::stoi(tMatch[1]) : 255; + int g = !tMatch[2].str().empty() ? std::stoi(tMatch[2]) : 255; + int b = !tMatch[3].str().empty() ? std::stoi(tMatch[3]) : 255; Color_t tColor; tColor.SetRGB(r, g, b); - s_sCmdString = s_sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHex())); + s_sCmdString = s_sCmdString.replace(tMatch.position(), tMatch.length(), std::format(PRE_STR"{}", tColor.ToHex())); } }, [&]() @@ -139,17 +139,17 @@ static std::vector> s_vDynamic = { while (true) { - std::smatch match; std::regex_search(s_sCmdString, match, std::regex(sRegex)); - if (match.size() != 5) + std::smatch tMatch; std::regex_search(s_sCmdString, tMatch, std::regex(sRegex)); + if (tMatch.size() != 5) break; - int r = !match[1].str().empty() ? std::stoi(match[1]) : 255; - int g = !match[2].str().empty() ? std::stoi(match[2]) : 255; - int b = !match[3].str().empty() ? std::stoi(match[3]) : 255; - int a = !match[4].str().empty() ? std::stoi(match[4]) : 255; + int r = !tMatch[1].str().empty() ? std::stoi(tMatch[1]) : 255; + int g = !tMatch[2].str().empty() ? std::stoi(tMatch[2]) : 255; + int b = !tMatch[3].str().empty() ? std::stoi(tMatch[3]) : 255; + int a = !tMatch[4].str().empty() ? std::stoi(tMatch[4]) : 255; Color_t tColor; tColor.SetRGB(r, g, b, a); - s_sCmdString = s_sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHexA())); + s_sCmdString = s_sCmdString.replace(tMatch.position(), tMatch.length(), std::format(PRE_STR"{}", tColor.ToHexA())); } }, [&]() @@ -158,16 +158,16 @@ static std::vector> s_vDynamic = { while (true) { - std::smatch match; std::regex_search(s_sCmdString, match, std::regex(sRegex)); - if (match.size() != 4) + std::smatch tMatch; std::regex_search(s_sCmdString, tMatch, std::regex(sRegex)); + if (tMatch.size() != 4) break; - int h = !match[1].str().empty() ? std::stoi(match[1]) : 0; - int s = !match[2].str().empty() ? std::stoi(match[2]) : 100; - int v = !match[3].str().empty() ? std::stoi(match[3]) : 100; + int h = !tMatch[1].str().empty() ? std::stoi(tMatch[1]) : 0; + int s = !tMatch[2].str().empty() ? std::stoi(tMatch[2]) : 100; + int v = !tMatch[3].str().empty() ? std::stoi(tMatch[3]) : 100; Color_t tColor; tColor.SetHSV(h, s, v); - s_sCmdString = s_sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHex())); + s_sCmdString = s_sCmdString.replace(tMatch.position(), tMatch.length(), std::format(PRE_STR"{}", tColor.ToHex())); } }, [&]() @@ -176,17 +176,17 @@ static std::vector> s_vDynamic = { while (true) { - std::smatch match; std::regex_search(s_sCmdString, match, std::regex(sRegex)); - if (match.size() != 5) + std::smatch tMatch; std::regex_search(s_sCmdString, tMatch, std::regex(sRegex)); + if (tMatch.size() != 5) break; - int h = !match[1].str().empty() ? std::stoi(match[1]) : 0; - int s = !match[2].str().empty() ? std::stoi(match[2]) : 100; - int v = !match[3].str().empty() ? std::stoi(match[3]) : 100; - int a = !match[4].str().empty() ? std::stoi(match[4]) : 255; + int h = !tMatch[1].str().empty() ? std::stoi(tMatch[1]) : 0; + int s = !tMatch[2].str().empty() ? std::stoi(tMatch[2]) : 100; + int v = !tMatch[3].str().empty() ? std::stoi(tMatch[3]) : 100; + int a = !tMatch[4].str().empty() ? std::stoi(tMatch[4]) : 255; Color_t tColor; tColor.SetHSV(h, s, v, a); - s_sCmdString = s_sCmdString.replace(match.position(), match.length(), std::format(PRE_STR"{}", tColor.ToHexA())); + s_sCmdString = s_sCmdString.replace(tMatch.position(), tMatch.length(), std::format(PRE_STR"{}", tColor.ToHexA())); } }, [&]() @@ -195,18 +195,18 @@ static std::vector> s_vDynamic = { while (true) { - std::smatch match; std::regex_search(s_sCmdString, match, std::regex(sRegex)); - if (match.size() != 3) + std::smatch tMatch; std::regex_search(s_sCmdString, tMatch, std::regex(sRegex)); + if (tMatch.size() != 3) break; - int n = std::stoi(match[1]); - auto str = match[2].str(); + int n = std::stoi(tMatch[1]); + auto str = tMatch[2].str(); std::stringstream ssStream; for (int i = 0; i < n; i++) ssStream << str; - s_sCmdString = s_sCmdString.replace(match.position(), match.length(), ssStream.str()); + s_sCmdString = s_sCmdString.replace(tMatch.position(), tMatch.length(), ssStream.str()); } }, }; diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h b/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h index 5f07fb1f..1954b19f 100644 --- a/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h +++ b/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h @@ -26,5 +26,6 @@ public: VIRTUAL(CanBeSelected, bool, 233, this); VIRTUAL(CheckReload, void, 278, this); VIRTUAL(GetMaxClip1, int, 322, this); + VIRTUAL(GetMaxClip2, int, 323, this); VIRTUAL(GetName, const char*, 334, this); }; \ No newline at end of file diff --git a/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h b/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h index 459bcb08..aae81aa6 100644 --- a/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h +++ b/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h @@ -6,6 +6,7 @@ MAKE_SIGNATURE(CTFPlayer_IsPlayerOnSteamFriendsList, "client.dll", "40 57 48 81 EC ? ? ? ? 48 8B FA E8", 0x0); MAKE_SIGNATURE(TeamFortress_CalculateMaxSpeed, "client.dll", "88 54 24 ? 53 55", 0x0); +MAKE_SIGNATURE(CTFPlayer_GetMaxAmmo, "client.dll", "48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 63 FA 48 8B F1", 0x0); MAKE_SIGNATURE(CTFPlayer_UpdateClientSideAnimation, "client.dll", "48 89 5C 24 ? 57 48 83 EC ? 48 8B D9 E8 ? ? ? ? 48 8B F8 48 85 C0 74 ? 48 8B 00 48 8B CF FF 90 ? ? ? ? 84 C0 75 ? 33 FF 48 3B DF", 0x0); MAKE_SIGNATURE(CTFPlayer_GetEffectiveInvisibilityLevel, "client.dll", "40 57 48 83 EC ? 0F 29 7C 24", 0x0); MAKE_SIGNATURE(CTFPlayer_UpdateWearables, "client.dll", "40 53 48 83 EC ? 48 8B D9 E8 ? ? ? ? 48 8B 03 48 8B CB FF 90 ? ? ? ? 4C 8D 0D ? ? ? ? C7 44 24 ? ? ? ? ? 48 8B C8 4C 8D 05 ? ? ? ? 33 D2 E8 ? ? ? ? 48 85 C0", 0x0); @@ -198,8 +199,9 @@ public: VIRTUAL(GetMaxHealth, int, 107, this); VIRTUAL(ThirdPersonSwitch, void, 256, this); - SIGNATURE_ARGS(CalculateMaxSpeed, float, TeamFortress, (bool bIgnoreSpecialAbility = false), this, bIgnoreSpecialAbility); SIGNATURE(IsPlayerOnSteamFriendsList, bool, CTFPlayer, this, this); + SIGNATURE_ARGS(CalculateMaxSpeed, float, TeamFortress, (bool bIgnoreSpecialAbility = false), this, bIgnoreSpecialAbility); + SIGNATURE_ARGS(GetMaxAmmo, int, CTFPlayer, (int iAmmoIndex, int iClassIndex = -1), this, iAmmoIndex, iClassIndex); SIGNATURE(UpdateClientSideAnimation, void, CTFPlayer, this); SIGNATURE(GetEffectiveInvisibilityLevel, float, CTFPlayer, this); SIGNATURE(UpdateWearables, void, CTFPlayer, this); diff --git a/Amalgam/src/SDK/Definitions/Main/KeyValues.cpp b/Amalgam/src/SDK/Definitions/Main/KeyValues.cpp index b6f2a503..47381f97 100644 --- a/Amalgam/src/SDK/Definitions/Main/KeyValues.cpp +++ b/Amalgam/src/SDK/Definitions/Main/KeyValues.cpp @@ -26,9 +26,9 @@ static int UTF8ToUnicode(const char* ansi, wchar_t* unicode, int unicodeBufferSi -bool KeyValues::LoadFromBuffer(char const* resource_name, const char* buffer, void* file_system, const char* path_id) +bool KeyValues::LoadFromBuffer(char const* resourceName, const char* pBuffer, void* pFileSystem, const char* pPathID) { - return S::KeyValues_LoadFromBuffer.Call(this, resource_name, buffer, file_system, path_id); + return S::KeyValues_LoadFromBuffer.Call(this, resourceName, pBuffer, pFileSystem, pPathID); } void KeyValues::Initialize(const char* name) diff --git a/Amalgam/src/SDK/Definitions/Main/KeyValues.h b/Amalgam/src/SDK/Definitions/Main/KeyValues.h index 20c90be0..1824387c 100644 --- a/Amalgam/src/SDK/Definitions/Main/KeyValues.h +++ b/Amalgam/src/SDK/Definitions/Main/KeyValues.h @@ -55,7 +55,7 @@ public: KeyValues* m_pKeyValues; }; - bool LoadFromBuffer(char const* resource_name, const char* buffer, void* file_system = 0, const char* path_id = 0); + bool LoadFromBuffer(char const* resourceName, const char* pBuffer, void* pFileSystem = 0, const char* pPathID = 0); void Initialize(const char* name); KeyValues(const char* name); diff --git a/Amalgam/src/Utils/ExceptionHandler/ExceptionHandler.cpp b/Amalgam/src/Utils/ExceptionHandler/ExceptionHandler.cpp index 9ac72bba..4e85f72f 100644 --- a/Amalgam/src/Utils/ExceptionHandler/ExceptionHandler.cpp +++ b/Amalgam/src/Utils/ExceptionHandler/ExceptionHandler.cpp @@ -89,8 +89,6 @@ static inline std::deque StackTrace(PCONTEXT pContext) tFrame.m_sName = symbol->Name; } } - //if (!vTrace.empty()) - // vTrace.pop_front(); SymCleanup(hProcess);