mirror of
https://github.com/rei-2/Amalgam.git
synced 2026-10-11 17:58:15 +08:00
fix backtrack window with network fix disabled
update boost version
This commit is contained in:
1 parent
7637e395f2
commit
c1c6bf64d7
16 files changed
+62
-68
No files matched your search
@@ -1480,12 +1480,12 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\packages\boost.1.86.0\build\boost.targets" Condition="Exists('..\packages\boost.1.86.0\build\boost.targets')" />
|
||||
<Import Project="..\packages\boost.1.87.0\build\boost.targets" Condition="Exists('..\packages\boost.1.87.0\build\boost.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\boost.1.86.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\boost.1.86.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\boost.1.87.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\boost.1.87.0\build\boost.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="boost" version="1.86.0" targetFramework="native" />
|
||||
<package id="boost" version="1.87.0" targetFramework="native" />
|
||||
</packages>
|
||||
@@ -44,25 +44,25 @@ static inline bool CheckDXLevel()
|
||||
|
||||
void CCore::AppendFailText(const char* sMessage)
|
||||
{
|
||||
ssFailStream << std::format("{}\n", sMessage);
|
||||
m_ssFailStream << std::format("{}\n", sMessage);
|
||||
OutputDebugStringA(std::format("{}\n", sMessage).c_str());
|
||||
}
|
||||
|
||||
void CCore::LogFailText()
|
||||
{
|
||||
ssFailStream << "\nBuilt @ " __DATE__ ", " __TIME__ ", " __CONFIGURATION__ "\n";
|
||||
ssFailStream << "Ctrl + C to copy. \n";
|
||||
m_ssFailStream << "\nBuilt @ " __DATE__ ", " __TIME__ ", " __CONFIGURATION__ "\n";
|
||||
m_ssFailStream << "Ctrl + C to copy. \n";
|
||||
try
|
||||
{
|
||||
std::ofstream file;
|
||||
file.open(F::Configs.m_sConfigPath + "fail_log.txt", std::ios_base::app);
|
||||
file << ssFailStream.str() + "\n\n\n";
|
||||
file << m_ssFailStream.str() + "\n\n\n";
|
||||
file.close();
|
||||
ssFailStream << "Logged to Amalgam\\fail_log.txt. ";
|
||||
m_ssFailStream << "Logged to Amalgam\\fail_log.txt. ";
|
||||
}
|
||||
catch (...) {}
|
||||
|
||||
SDK::Output("Failed to load", ssFailStream.str().c_str(), {}, false, true, false, false, false, false, MB_OK | MB_ICONERROR);
|
||||
SDK::Output("Failed to load", m_ssFailStream.str().c_str(), {}, false, true, false, false, false, false, MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
void CCore::Load()
|
||||
|
||||
@@ -16,11 +16,11 @@ public:
|
||||
|
||||
bool m_bUnload = false;
|
||||
|
||||
private:
|
||||
bool m_bFailed = false;
|
||||
bool m_bFailed2 = false;
|
||||
std::stringstream m_ssFailStream;
|
||||
|
||||
std::stringstream ssFailStream;
|
||||
private:
|
||||
};
|
||||
|
||||
ADD_FEATURE_CUSTOM(CCore, Core, U);
|
||||
@@ -1202,7 +1202,11 @@ void CMenu::MenuVisuals(int iTab)
|
||||
if (Section("Removals", 8))
|
||||
{
|
||||
FToggle(Vars::Visuals::Removals::Interpolation, FToggleEnum::Left);
|
||||
FToggle(Vars::Visuals::Removals::NoLerp, FToggleEnum::Right);
|
||||
PushTransparent(Vars::Visuals::Removals::Interpolation.Value);
|
||||
{
|
||||
FToggle(Vars::Visuals::Removals::NoLerp, FToggleEnum::Right);
|
||||
}
|
||||
PopTransparent();
|
||||
FToggle(Vars::Visuals::Removals::Disguises, FToggleEnum::Left);
|
||||
FToggle(Vars::Visuals::Removals::Taunts, FToggleEnum::Right);
|
||||
FToggle(Vars::Visuals::Removals::Scope, FToggleEnum::Left);
|
||||
|
||||
@@ -19,11 +19,7 @@ void CReadPacketState::Restore()
|
||||
void CNetworkFix::FixInputDelay(bool bFinalTick)
|
||||
{
|
||||
static auto CL_ReadPackets = U::Hooks.m_mHooks["CL_ReadPackets"];
|
||||
if (!I::EngineClient->IsInGame() || !Vars::Misc::Game::NetworkFix.Value || !CL_ReadPackets)
|
||||
return;
|
||||
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
if (pNetChan && pNetChan->IsLoopback())
|
||||
if (!Vars::Misc::Game::NetworkFix.Value || !I::EngineClient->IsInGame() || SDK::IsLoopback() || !CL_ReadPackets)
|
||||
return;
|
||||
|
||||
CReadPacketState Backup = {};
|
||||
@@ -37,11 +33,7 @@ void CNetworkFix::FixInputDelay(bool bFinalTick)
|
||||
|
||||
bool CNetworkFix::ShouldReadPackets()
|
||||
{
|
||||
if (!I::EngineClient->IsInGame() || !Vars::Misc::Game::NetworkFix.Value)
|
||||
return true;
|
||||
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
if (pNetChan && pNetChan->IsLoopback())
|
||||
if (!Vars::Misc::Game::NetworkFix.Value || !I::EngineClient->IsInGame() || SDK::IsLoopback())
|
||||
return true;
|
||||
|
||||
m_State.Restore();
|
||||
|
||||
@@ -93,9 +93,7 @@ bool CNoSpreadHitscan::ParsePlayerPerf(std::string sMsg)
|
||||
if (flNewServerTime < m_flServerTime)
|
||||
return true;
|
||||
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
bool bLoopback = pNetChan && pNetChan->IsLoopback();
|
||||
|
||||
bool bLoopback = SDK::IsLoopback();
|
||||
m_flServerTime = flNewServerTime;
|
||||
|
||||
if (bLoopback)
|
||||
|
||||
@@ -199,13 +199,9 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
|
||||
|
||||
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Ping && pResource && !bLocal)
|
||||
{
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
if (pNetChan && !pNetChan->IsLoopback())
|
||||
{
|
||||
int iPing = pResource->m_iPing(iIndex);
|
||||
if (iPing && (iPing >= 200 || iPing <= 5))
|
||||
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("{}MS", iPing), Vars::Colors::IndicatorTextBad.Value, Vars::Menu::Theme::Background.Value);
|
||||
}
|
||||
int iPing = pResource->m_iPing(iIndex);
|
||||
if (iPing && (iPing >= 200 || iPing <= 5))
|
||||
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("{}MS", iPing), Vars::Colors::IndicatorTextBad.Value, Vars::Menu::Theme::Background.Value);
|
||||
}
|
||||
|
||||
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::KDR && pResource && !bLocal)
|
||||
|
||||
@@ -570,9 +570,7 @@ void CVisuals::DrawHitboxes(int iStore)
|
||||
{
|
||||
vHitboxes.clear();
|
||||
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
bool bLocalhost = pNetChan && pNetChan->IsLoopback();
|
||||
|
||||
bool bLocalhost = SDK::IsLoopback();
|
||||
for (auto& pEntity : H::Entities.GetGroup(EGroupType::PLAYERS_ALL))
|
||||
{
|
||||
auto pPlayer = pEntity->As<CTFPlayer>();
|
||||
|
||||
@@ -57,10 +57,14 @@ MAKE_HOOK(CClientModeShared_CreateMove, U::Memory.GetVirtual(I::ClientModeShared
|
||||
|
||||
I::Prediction->Update(I::ClientState->m_nDeltaTick, I::ClientState->m_nDeltaTick > 0, I::ClientState->last_command_ack, I::ClientState->lastoutgoingcommand + I::ClientState->chokedcommands);
|
||||
|
||||
// correct tick_count for fakeinterp / nointerp
|
||||
pCmd->tick_count += TICKS_TO_TIME(F::Backtrack.GetFakeInterp()) - (Vars::Visuals::Removals::Interpolation.Value ? 0 : TICKS_TO_TIME(G::Lerp));
|
||||
if (G::OriginalMove.m_iButtons & IN_DUCK) // lol
|
||||
pCmd->buttons |= IN_DUCK;
|
||||
if (!Vars::Misc::Game::AntiCheatCompatibility.Value)
|
||||
{ // correct tick_count for fakeinterp / nointerp
|
||||
pCmd->tick_count += TIME_TO_TICKS(F::Backtrack.GetFakeInterp());
|
||||
if (!Vars::Visuals::Removals::Interpolation.Value && Vars::Visuals::Removals::NoLerp.Value)
|
||||
pCmd->tick_count -= TIME_TO_TICKS(G::Lerp);
|
||||
}
|
||||
if (G::OriginalMove.m_iButtons & IN_DUCK)
|
||||
pCmd->buttons |= IN_DUCK; // lol
|
||||
|
||||
auto pLocal = H::Entities.GetLocal();
|
||||
auto pWeapon = H::Entities.GetWeapon();
|
||||
|
||||
@@ -21,12 +21,8 @@ MAKE_HOOK(CL_Move, S::CL_Move(), void,
|
||||
return CALL_ORIGINAL(accumulated_extra_samples, bFinalTick);
|
||||
|
||||
F::Backtrack.m_iTickCount = I::GlobalVars->tickcount + 1;
|
||||
if (!Vars::Misc::Game::NetworkFix.Value)
|
||||
{
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
if (pNetChan && !pNetChan->IsLoopback())
|
||||
F::Backtrack.m_iTickCount++;
|
||||
}
|
||||
if (!Vars::Misc::Game::NetworkFix.Value && !SDK::IsLoopback())
|
||||
F::Backtrack.m_iTickCount--;
|
||||
|
||||
auto pLocal = H::Entities.GetLocal();
|
||||
auto pWeapon = H::Entities.GetWeapon();
|
||||
|
||||
@@ -12,7 +12,7 @@ MAKE_HOOK(GetClientInterpAmount, S::GetClientInterpAmount(), float,
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
|
||||
if (Vars::Visuals::Removals::NoLerp.Value)
|
||||
if (Vars::Visuals::Removals::NoLerp.Value && !Vars::Visuals::Removals::Interpolation.Value)
|
||||
return CALL_ORIGINAL();
|
||||
|
||||
static const auto dwDesired1 = S::CNetGraphPanel_DrawTextFields_GetClientInterpAmount_Call1();
|
||||
|
||||
@@ -389,6 +389,12 @@ bool SDK::PredictOrigin(Vec3& vOut, Vec3& vOrigin, Vec3 vVelocity, float flLaten
|
||||
return !trace.DidHit();
|
||||
}
|
||||
|
||||
bool SDK::IsLoopback()
|
||||
{
|
||||
auto pNetChan = I::EngineClient->GetNetChannelInfo();
|
||||
return pNetChan && pNetChan->IsLoopback();
|
||||
}
|
||||
|
||||
int SDK::GetRoundState()
|
||||
{
|
||||
if (auto pGameRules = I::TFGameRules())
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace SDK
|
||||
void RandomSeed(int iSeed);
|
||||
int RandomInt(int iMinVal = 0, int iMaxVal = 0x7FFF);
|
||||
float RandomFloat(float flMinVal = 0.f, float flMaxVal = 1.f);
|
||||
|
||||
|
||||
bool W2S(const Vec3& vOrigin, Vec3& vScreen, bool bAlways = false);
|
||||
bool IsOnScreen(CBaseEntity* pEntity, const matrix3x4& mTransform, float* pLeft = nullptr, float* pRight = nullptr, float* pTop = nullptr, float* pBottom = nullptr);
|
||||
bool IsOnScreen(CBaseEntity* pEntity, Vec3 vOrigin);
|
||||
@@ -104,6 +104,7 @@ namespace SDK
|
||||
Vec3 PredictOrigin(Vec3& vOrigin, Vec3 vVelocity, float flLatency, bool bTrace = true, Vec3 vMins = {}, Vec3 vMaxs = {}, unsigned int nMask = MASK_SOLID, float flNormal = 0.f);
|
||||
bool PredictOrigin(Vec3& vOut, Vec3& vOrigin, Vec3 vVelocity, float flLatency, bool bTrace = true, Vec3 vMins = {}, Vec3 vMaxs = {}, unsigned int nMask = MASK_SOLID, float flNormal = 0.f);
|
||||
|
||||
bool IsLoopback();
|
||||
int GetRoundState();
|
||||
int GetWinningTeam();
|
||||
EWeaponType GetWeaponType(CTFWeaponBase* pWeapon, EWeaponType* pSecondaryType = nullptr);
|
||||
|
||||
@@ -20,7 +20,7 @@ struct Frame
|
||||
std::string m_sName = "";
|
||||
};
|
||||
|
||||
static std::deque<Frame> StackTrace(PCONTEXT context)
|
||||
static std::deque<Frame> StackTrace(PCONTEXT pContext)
|
||||
{
|
||||
HANDLE hProcess = GetCurrentProcess();
|
||||
HANDLE hThread = GetCurrentThread();
|
||||
@@ -30,22 +30,21 @@ static std::deque<Frame> StackTrace(PCONTEXT context)
|
||||
|
||||
SymSetOptions(SYMOPT_LOAD_LINES);
|
||||
|
||||
STACKFRAME64 frame = {};
|
||||
frame.AddrPC.Offset = context->Rip;
|
||||
frame.AddrFrame.Offset = context->Rbp;
|
||||
frame.AddrStack.Offset = context->Rsp;
|
||||
frame.AddrPC.Mode = AddrModeFlat;
|
||||
frame.AddrFrame.Mode = AddrModeFlat;
|
||||
frame.AddrStack.Mode = AddrModeFlat;
|
||||
STACKFRAME64 tStackFrame = {};
|
||||
tStackFrame.AddrPC.Offset = pContext->Rip;
|
||||
tStackFrame.AddrFrame.Offset = pContext->Rbp;
|
||||
tStackFrame.AddrStack.Offset = pContext->Rsp;
|
||||
tStackFrame.AddrPC.Mode = AddrModeFlat;
|
||||
tStackFrame.AddrFrame.Mode = AddrModeFlat;
|
||||
tStackFrame.AddrStack.Mode = AddrModeFlat;
|
||||
|
||||
std::deque<Frame> vTrace = {};
|
||||
while (StackWalk64(IMAGE_FILE_MACHINE_AMD64, hProcess, hThread, &frame, context, nullptr, SymFunctionTableAccess64, SymGetModuleBase64, nullptr))
|
||||
while (StackWalk64(IMAGE_FILE_MACHINE_AMD64, hProcess, hThread, &tStackFrame, pContext, nullptr, SymFunctionTableAccess64, SymGetModuleBase64, nullptr))
|
||||
{
|
||||
Frame tFrame = {};
|
||||
tFrame.m_uAddress = tStackFrame.AddrPC.Offset;
|
||||
|
||||
tFrame.m_uAddress = frame.AddrPC.Offset;
|
||||
|
||||
if (auto hBase = HINSTANCE(SymGetModuleBase64(hProcess, frame.AddrPC.Offset)))
|
||||
if (auto hBase = HINSTANCE(SymGetModuleBase64(hProcess, tStackFrame.AddrPC.Offset)))
|
||||
{
|
||||
tFrame.m_uBase = uintptr_t(hBase);
|
||||
|
||||
@@ -60,13 +59,13 @@ static std::deque<Frame> StackTrace(PCONTEXT context)
|
||||
DWORD dwOffset = 0;
|
||||
IMAGEHLP_LINE64 line = {};
|
||||
line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
|
||||
if (SymGetLineFromAddr64(hProcess, frame.AddrPC.Offset, &dwOffset, &line))
|
||||
if (SymGetLineFromAddr64(hProcess, tStackFrame.AddrPC.Offset, &dwOffset, &line))
|
||||
{
|
||||
tFrame.m_sFile = line.FileName;
|
||||
tFrame.m_uLine = line.LineNumber;
|
||||
auto find = tFrame.m_sFile.rfind("\\");
|
||||
if (find != std::string::npos)
|
||||
tFrame.m_sFile.replace(0, find + 1, "");
|
||||
auto iFind = tFrame.m_sFile.rfind("\\");
|
||||
if (iFind != std::string::npos)
|
||||
tFrame.m_sFile.replace(0, iFind + 1, "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +75,7 @@ static std::deque<Frame> StackTrace(PCONTEXT context)
|
||||
auto symbol = PIMAGEHLP_SYMBOL64(buf);
|
||||
symbol->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64) + 255;
|
||||
symbol->MaxNameLength = 254;
|
||||
if (SymGetSymFromAddr64(hProcess, frame.AddrPC.Offset, &dwOffset, symbol))
|
||||
if (SymGetSymFromAddr64(hProcess, tStackFrame.AddrPC.Offset, &dwOffset, symbol))
|
||||
tFrame.m_sName = symbol->Name;
|
||||
}
|
||||
|
||||
@@ -104,8 +103,8 @@ static LONG APIENTRY ExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo)
|
||||
mAddresses[ExceptionInfo->ExceptionRecord->ExceptionAddress] = true;
|
||||
|
||||
std::stringstream ssErrorStream;
|
||||
ssErrorStream << std::format("Error: {:#X}\n", ExceptionInfo->ExceptionRecord->ExceptionCode);
|
||||
ssErrorStream << std::format("Address: {:#X}\n\n", uintptr_t(ExceptionInfo->ExceptionRecord->ExceptionAddress));
|
||||
ssErrorStream << std::format("Error: {:#x}\n\n", ExceptionInfo->ExceptionRecord->ExceptionCode);
|
||||
|
||||
ssErrorStream << std::format("RIP: {:#x}\n", ExceptionInfo->ContextRecord->Rip);
|
||||
ssErrorStream << std::format("RAX: {:#x}\n", ExceptionInfo->ContextRecord->Rax);
|
||||
ssErrorStream << std::format("RCX: {:#x}\n", ExceptionInfo->ContextRecord->Rcx);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</p>
|
||||
|
||||
###### AVX2 may be faster than SSE2 though not all CPUs support it (`Steam > Help > System Information > Processor Information > AVX2`). Freetype uses freetype as the text rasterizer and includes some custom fonts, which results in better looking text but larger DLL sizes. PDBs are for developer use.
|
||||
###### If nightly.link is down, you can still download through [github](https://github.com/rei-2/Amalgam/actions) with an account.
|
||||
###### If nightly.link is down or can't be accessed, you can still download through [GitHub](https://github.com/rei-2/Amalgam/actions) with an account.
|
||||
|
||||
# Amalgam
|
||||
|
||||
@@ -36,4 +36,4 @@
|
||||
[](/../../actions)
|
||||
[](/../../commits/)
|
||||
|
||||
[VAC bypass](https://github.com/danielkrupinski/VAC-Bypass-Loader) and [Xenos](https://github.com/DarthTon/Xenos/releases) recommended
|
||||
[VAC bypass](https://github.com/danielkrupinski/VAC-Bypass-Loader) and [Xenos](https://github.com/DarthTon/Xenos/releases) recommended.
|
||||
Reference in new issue
Block a user