Repository: Wando1423/Antario Branch: master Commit: 732db743749f Files: 153 Total size: 1.4 MB Directory structure: gitextract_s_lvljwb/ ├── .gitignore ├── Antario/ │ ├── EventListener.h │ ├── Features/ │ │ ├── ESP.cpp │ │ ├── ESP.h │ │ ├── EnginePrediction.cpp │ │ ├── EnginePrediction.h │ │ ├── Features.h │ │ └── Misc.h │ ├── GUI/ │ │ ├── GUI.cpp │ │ └── GUI.h │ ├── Hooks.cpp │ ├── Hooks.h │ ├── LIB/ │ │ └── freetype/ │ │ ├── freetype/ │ │ │ ├── config/ │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ ├── freetype.h │ │ │ ├── ftadvanc.h │ │ │ ├── ftbbox.h │ │ │ ├── ftbdf.h │ │ │ ├── ftbitmap.h │ │ │ ├── ftbzip2.h │ │ │ ├── ftcache.h │ │ │ ├── ftchapters.h │ │ │ ├── ftcid.h │ │ │ ├── ftcolor.h │ │ │ ├── ftdriver.h │ │ │ ├── fterrdef.h │ │ │ ├── fterrors.h │ │ │ ├── ftfntfmt.h │ │ │ ├── ftgasp.h │ │ │ ├── ftglyph.h │ │ │ ├── ftgxval.h │ │ │ ├── ftgzip.h │ │ │ ├── ftimage.h │ │ │ ├── ftincrem.h │ │ │ ├── ftlcdfil.h │ │ │ ├── ftlist.h │ │ │ ├── ftlzw.h │ │ │ ├── ftmac.h │ │ │ ├── ftmm.h │ │ │ ├── ftmodapi.h │ │ │ ├── ftmoderr.h │ │ │ ├── ftotval.h │ │ │ ├── ftoutln.h │ │ │ ├── ftparams.h │ │ │ ├── ftpfr.h │ │ │ ├── ftrender.h │ │ │ ├── ftsizes.h │ │ │ ├── ftsnames.h │ │ │ ├── ftstroke.h │ │ │ ├── ftsynth.h │ │ │ ├── ftsystem.h │ │ │ ├── fttrigon.h │ │ │ ├── fttypes.h │ │ │ ├── ftwinfnt.h │ │ │ ├── internal/ │ │ │ │ ├── autohint.h │ │ │ │ ├── cffotypes.h │ │ │ │ ├── cfftypes.h │ │ │ │ ├── ftcalc.h │ │ │ │ ├── ftdebug.h │ │ │ │ ├── ftdrv.h │ │ │ │ ├── ftgloadr.h │ │ │ │ ├── fthash.h │ │ │ │ ├── ftmemory.h │ │ │ │ ├── ftobjs.h │ │ │ │ ├── ftpsprop.h │ │ │ │ ├── ftrfork.h │ │ │ │ ├── ftserv.h │ │ │ │ ├── ftstream.h │ │ │ │ ├── fttrace.h │ │ │ │ ├── ftvalid.h │ │ │ │ ├── internal.h │ │ │ │ ├── psaux.h │ │ │ │ ├── pshints.h │ │ │ │ ├── services/ │ │ │ │ │ ├── svbdf.h │ │ │ │ │ ├── svcfftl.h │ │ │ │ │ ├── svcid.h │ │ │ │ │ ├── svfntfmt.h │ │ │ │ │ ├── svgldict.h │ │ │ │ │ ├── svgxval.h │ │ │ │ │ ├── svkern.h │ │ │ │ │ ├── svmetric.h │ │ │ │ │ ├── svmm.h │ │ │ │ │ ├── svotval.h │ │ │ │ │ ├── svpfr.h │ │ │ │ │ ├── svpostnm.h │ │ │ │ │ ├── svprop.h │ │ │ │ │ ├── svpscmap.h │ │ │ │ │ ├── svpsinfo.h │ │ │ │ │ ├── svsfnt.h │ │ │ │ │ ├── svttcmap.h │ │ │ │ │ ├── svtteng.h │ │ │ │ │ ├── svttglyf.h │ │ │ │ │ └── svwinfnt.h │ │ │ │ ├── sfnt.h │ │ │ │ ├── t1types.h │ │ │ │ └── tttypes.h │ │ │ ├── t1tables.h │ │ │ ├── ttnameid.h │ │ │ ├── tttables.h │ │ │ └── tttags.h │ │ ├── freetype.lib │ │ └── ft2build.h │ ├── Menu.cpp │ ├── SDK/ │ │ ├── CEntity.h │ │ ├── CGlobalVarsBase.h │ │ ├── CHandle.h │ │ ├── CInput.h │ │ ├── CPrediction.h │ │ ├── ClientClass.h │ │ ├── Definitions.h │ │ ├── IBaseClientDll.h │ │ ├── IClientEntity.h │ │ ├── IClientEntityList.h │ │ ├── IClientMode.h │ │ ├── IClientNetworkable.h │ │ ├── IClientRenderable.h │ │ ├── IClientThinkable.h │ │ ├── IClientUnknown.h │ │ ├── IGameEvent.h │ │ ├── ISurface.h │ │ ├── IVEngineClient.h │ │ ├── KeyValues.h │ │ ├── PlayerInfo.h │ │ ├── Recv.h │ │ ├── VMatrix.h │ │ └── Vector.h │ ├── Settings.cpp │ ├── Settings.h │ ├── Utils/ │ │ ├── Color.h │ │ ├── DrawManager.cpp │ │ ├── DrawManager.h │ │ ├── Font.cpp │ │ ├── Font.h │ │ ├── GlobalVars.cpp │ │ ├── GlobalVars.h │ │ ├── Interfaces.cpp │ │ ├── Interfaces.h │ │ ├── NetvarManager.cpp │ │ ├── NetvarManager.h │ │ ├── SPoint.h │ │ ├── SRect.h │ │ └── Utils.h │ └── dllmain.cpp ├── Antario.sln ├── Antario.sln.DotSettings.user ├── Antario.vcxproj ├── Antario.vcxproj.filters ├── Antario.vcxproj.user ├── LICENSE └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Prerequisites *.d # Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Fortran module files *.mod *.smod # Compiled Static libraries *.lai *.la *.a *.lib !freetype.lib # Executables *.dll !freetype.dll *.exe *.out *.app *.enc # MSVC binary files *.db *.ipch *.suo *.tlog *.idb *.pdb *.ilk *.bsc *.sbr *.log *.opendb *.iobj *.ipdb *.xml *.lastcodeanalysissucceeded *.sqlite-journal *.sqlite *.json ================================================ FILE: Antario/EventListener.h ================================================ #pragma once #include #include "SDK\IGameEvent.h" class EventListener : public IGameEventListener2 { public: EventListener(std::vector events) { for (auto& it : events) g_pEventManager->AddListener(this, it, false); } ~EventListener() { g_pEventManager->RemoveListener(this); } void FireGameEvent(IGameEvent* event) override { // call functions here } int GetEventDebugID() override { return EVENT_DEBUG_ID_INIT; } }; ================================================ FILE: Antario/Features/ESP.cpp ================================================ #include "ESP.h" #include "..\Settings.h" #include "..\Utils\Utils.h" #include "..\SDK\IVEngineClient.h" #include "..\SDK\PlayerInfo.h" ESP g_ESP; void ESP::RenderBox(C_BaseEntity* pEnt) { Vector vecScreenOrigin, vecOrigin = pEnt->GetRenderOrigin(); if (!Utils::WorldToScreen(vecOrigin, vecScreenOrigin)) return; Vector vecScreenBottom, vecBottom = vecOrigin; vecBottom.z += (pEnt->GetFlags() & FL_DUCKING) ? 54.f : 72.f; if (!Utils::WorldToScreen(vecBottom, vecScreenBottom)) return; const auto sx = int(std::roundf(vecScreenOrigin.x)), sy = int(std::roundf(vecScreenOrigin.y)), h = int(std::roundf(vecScreenBottom.y - vecScreenOrigin.y)), w = int(std::roundf(h * 0.25f)); /* Draw rect around the entity */ g_Render.Rect(sx - w, sy, sx + w, sy + h, (pEnt->GetTeam() == localTeam) ? teamColor : enemyColor); /* Draw rect outline */ g_Render.Rect(sx - w - 1, sy - 1, sx + w + 1, sy + h + 1, Color::Black()); g_Render.Rect(sx - w + 1, sy + 1, sx + w - 1, sy + h - 1, Color::Black()); } void ESP::RenderName(C_BaseEntity* pEnt, int iterator) { Vector vecScreenOrigin, vecOrigin = pEnt->GetRenderOrigin(); if (!Utils::WorldToScreen(vecOrigin, vecScreenOrigin)) return; Vector vecScreenBottom, vecBottom = vecOrigin; vecBottom.z += (pEnt->GetFlags() & FL_DUCKING) ? 54.f : 72.f; if (!Utils::WorldToScreen(vecBottom, vecScreenBottom)) return; PlayerInfo_t pInfo; g_pEngine->GetPlayerInfo(iterator, &pInfo); const auto sx = int(std::roundf(vecScreenOrigin.x)), sy = int(std::roundf(vecScreenOrigin.y)), h = int(std::roundf(vecScreenBottom.y - vecScreenOrigin.y)); g_Render.String(sx, sy + h - 16, FONT_CENTERED_X | FONT_DROPSHADOW, (localTeam == pEnt->GetTeam()) ? teamColor : enemyColor, g_Fonts.vecFonts[FONT_TAHOMA_10], pInfo.szName); } void ESP::RenderWeaponName(C_BaseEntity* pEnt) { Vector vecScreenOrigin, vecOrigin = pEnt->GetRenderOrigin(); if (!Utils::WorldToScreen(vecOrigin, vecScreenOrigin)) return; auto weapon = pEnt->GetActiveWeapon(); if (!weapon) return; auto strWeaponName = weapon->GetName(); /* Remove "weapon_" prefix */ strWeaponName.erase(0, 7); /* All uppercase */ std::transform(strWeaponName.begin(), strWeaponName.end(), strWeaponName.begin(), ::toupper); g_Render.String(int(vecScreenOrigin.x), int(vecScreenOrigin.y), FONT_CENTERED_X | FONT_DROPSHADOW, (localTeam == pEnt->GetTeam()) ? teamColor : enemyColor, g_Fonts.vecFonts[FONT_TAHOMA_10], strWeaponName.c_str()); } void ESP::Render() { if (!g::pLocalEntity || !g_pEngine->IsInGame()) return; localTeam = g::pLocalEntity->GetTeam(); for (int it = 1; it <= g_pEngine->GetMaxClients(); ++it) { C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(it); if (!pPlayerEntity || pPlayerEntity == g::pLocalEntity || pPlayerEntity->IsDormant() || !pPlayerEntity->IsAlive()) continue; if (g_Settings.bShowBoxes) this->RenderBox(pPlayerEntity); if (g_Settings.bShowNames) this->RenderName(pPlayerEntity, it); if (g_Settings.bShowWeapons) this->RenderWeaponName(pPlayerEntity); } } ================================================ FILE: Antario/Features/ESP.h ================================================ #pragma once #include "..\Utils\GlobalVars.h" #include "..\Utils\DrawManager.h" class ESP { public: void Render(); private: void RenderBox(C_BaseEntity* pEnt); void RenderName(C_BaseEntity* pEnt, int iterator); void RenderWeaponName(C_BaseEntity* pEnt); int localTeam{}; Color teamColor{ 195, 240, 100, 255 }; Color enemyColor{ 250, 165, 110, 255 }; }; extern ESP g_ESP; ================================================ FILE: Antario/Features/EnginePrediction.cpp ================================================ #include "EnginePrediction.h" #include "..\SDK\CInput.h" #include "..\SDK\CEntity.h" #include "..\Utils\GlobalVars.h" #include "..\SDK\CPrediction.h" #include "..\SDK\CGlobalVarsBase.h" float flOldCurtime; float flOldFrametime; void engine_prediction::RunEnginePred() { static int nTickBase; static CUserCmd* pLastCmd; // fix tickbase if game didnt render previous tick if (pLastCmd) { if (pLastCmd->hasbeenpredicted) nTickBase = g::pLocalEntity->GetTickBase(); else ++nTickBase; } // get random_seed as its 0 in clientmode->createmove const auto getRandomSeed = []() { using MD5_PseudoRandomFn = unsigned long(__cdecl*)(std::uintptr_t); static auto offset = Utils::FindSignature("client_panorama.dll", "55 8B EC 83 E4 F8 83 EC 70 6A 58"); static auto MD5_PseudoRandom = reinterpret_cast(offset); return MD5_PseudoRandom(g::pCmd->command_number) & 0x7FFFFFFF; }; pLastCmd = g::pCmd; flOldCurtime = g_pGlobalVars->curtime; flOldFrametime = g_pGlobalVars->frametime; g::uRandomSeed = getRandomSeed(); g_pGlobalVars->curtime = nTickBase * g_pGlobalVars->intervalPerTick; g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick; g_pMovement->StartTrackPredictionErrors(g::pLocalEntity); CMoveData data; memset(&data, 0, sizeof(CMoveData)); g_pMoveHelper->SetHost(g::pLocalEntity); g_pPrediction->SetupMove(g::pLocalEntity, g::pCmd, g_pMoveHelper, &data); g_pMovement->ProcessMovement(g::pLocalEntity, &data); g_pPrediction->FinishMove(g::pLocalEntity, g::pCmd, &data); } void engine_prediction::EndEnginePred() { g_pMovement->FinishTrackPredictionErrors(g::pLocalEntity); g_pMoveHelper->SetHost(nullptr); g_pGlobalVars->curtime = flOldCurtime; g_pGlobalVars->frametime = flOldFrametime; } ================================================ FILE: Antario/Features/EnginePrediction.h ================================================ #pragma once namespace engine_prediction { void RunEnginePred(); void EndEnginePred(); } ================================================ FILE: Antario/Features/Features.h ================================================ #pragma once /* * Header with all "features" directory headers included * Used to make hooks look clean with its "include" files * I try to keep them in alphabetical order to look clean */ #include "EnginePrediction.h" #include "ESP.h" #include "Misc.h" ================================================ FILE: Antario/Features/Misc.h ================================================ #pragma once #include "..\Utils\GlobalVars.h" #include "..\Settings.h" class Misc { public: void OnCreateMove() { this->pCmd = g::pCmd; this->pLocal = g::pLocalEntity; if (g_Settings.bBhopEnabled) this->DoBhop(); // sum future shit }; private: CUserCmd* pCmd; C_BaseEntity* pLocal; void DoBhop() const { if (this->pLocal->GetMoveType() == MoveType_t::MOVETYPE_LADDER) return; static bool bLastJumped = false; static bool bShouldFake = false; if (!bLastJumped && bShouldFake) { bShouldFake = false; pCmd->buttons |= IN_JUMP; } else if (pCmd->buttons & IN_JUMP) { if (pLocal->GetFlags() & FL_ONGROUND) bShouldFake = bLastJumped = true; else { pCmd->buttons &= ~IN_JUMP; bLastJumped = false; } } else bShouldFake = bLastJumped = false; } }; extern Misc g_Misc; ================================================ FILE: Antario/GUI/GUI.cpp ================================================ #include "GUI.h" #include "..\Settings.h" #include #include using namespace ui; // Defined to avoid including windowsx.h #define GET_X_LPARAM(lp) (int(short(LOWORD(lp)))) #define GET_Y_LPARAM(lp) (int(short(HIWORD(lp)))) /* No inline vars for shared pointers I guess */ MenuStyle MenuMain::style; /* Struct containing all colors / paddings in our menu. */ Control* MenuMain::pFocusedObject; /* Pointer to the focused object */ std::shared_ptr MenuMain::pFont; /* Pointer to the font used in the menu. */ std::unique_ptr MenuMain::mouseCursor; /* Pointer to our mouse cursor */ void MouseCursor::Render() { const auto x = this->vecPointPos.x; const auto y = this->vecPointPos.y; ///TODO: render this fucker to texture first and stop wasting time rendering that // Draw inner fill color SPoint ptPos1 = { x + 1, y + 1 }; SPoint ptPos2 = { x + 25, y + 12 }; SPoint ptPos3 = { x + 12, y + 25 }; g_Render.TriangleFilled(ptPos1, ptPos2, ptPos3, MenuMain::style.colCursor); // Draw second smaller inner fill color ptPos1 = { x + 6, y + 6 }; ptPos2 = { x + 19, y + 12 }; ptPos3 = { x + 12, y + 19 }; g_Render.TriangleFilled(ptPos1, ptPos2, ptPos3, MenuMain::style.colCursor); // Draw border g_Render.Triangle({ x, y }, { x + 25, y + 12 }, { x + 12, y + 25 }, Color::Black(200)); } void MouseCursor::RunThink(const UINT uMsg, const LPARAM lParam) { switch (uMsg) { case WM_MOUSEMOVE: case WM_NCMOUSEMOVE: this->SetPosition(SPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; case WM_LBUTTONDOWN: this->bLMBPressed = true; break; case WM_LBUTTONUP: this->bLMBHeld = false; this->bLMBPressed = false; break; case WM_RBUTTONDOWN: this->bRMBPressed = true; break; case WM_RBUTTONUP: this->bRMBHeld = false; this->bRMBPressed = false; break; } if (this->bLMBPressed) { if (this->bLMBHeld) this->bLMBPressed = false; this->bLMBHeld = true; } if (this->bRMBPressed) { if (this->bRMBHeld) this->bRMBPressed = false; this->bRMBHeld = true; } } bool MouseCursor::IsInBounds(const SPoint& vecDst1, const SPoint& vecDst2) { return this->IsInBounds({ vecDst1, vecDst2 }); } bool MouseCursor::IsInBounds(const SRect& rcRect) { return rcRect.ContainsPoint(this->GetPos()); } void UIObject::SetupBaseSize() { this->rcBoundingBox.right = rcBoundingBox.left + szSizeObject.x; this->rcBoundingBox.bottom = rcBoundingBox.top + szSizeObject.y; } void Control::RequestFocus() { if (pFocusedObject == this) return; if (!this->CanHaveFocus()) return; if (pFocusedObject) pFocusedObject->OnFocusOut(); pFocusedObject = dynamic_cast(this); pFocusedObject->OnFocusIn(); } void MenuMain::Render() { /* Render all children */ for (auto& it : this->vecChildren) if (it.get() != pFocusedObject) it->Render(); /* Render focused object as the last one */ if (pFocusedObject) pFocusedObject->Render(); } bool MenuMain::MsgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { mouseCursor->RunThink(uMsg, lParam); /* Loop through all of the child objects and capture the input */ if (!this->vecChildren.empty() && g_Settings.bMenuOpened) { for (auto& it : this->vecChildren) if (it->MsgProc(uMsg, wParam, lParam)) return true; } return false; } void Section::AddDummy() { this->AddChild(std::make_shared(SPoint(this->GetMaxChildWidth(), pFont->iHeight + style.iPaddingY))); } void Section::AddCheckBox(const std::string& strSelectableLabel, bool* bValue) { this->AddChild(std::make_shared(strSelectableLabel, bValue, GetThis())); } void Section::AddButton(const std::string& strSelectableLabel, void(&fnPointer)(), SPoint vecButtonSize) { this->AddChild(std::make_shared