├── SourceEngine ├── SourceEngine │ ├── Features │ │ ├── Aimbot │ │ │ ├── Aimbot.cpp │ │ │ └── Aimbot.h │ │ ├── Visuals │ │ │ ├── Radar │ │ │ │ ├── Radar.cpp │ │ │ │ └── Radar.h │ │ │ └── ESP │ │ │ │ └── ESP.h │ │ ├── Movement │ │ │ ├── Movement.h │ │ │ └── Movement.cpp │ │ ├── Prediction │ │ │ ├── Prediction.h │ │ │ └── Prediction.cpp │ │ └── Menu │ │ │ ├── Input │ │ │ ├── Input.h │ │ │ └── Input.cpp │ │ │ └── Menu.h │ ├── Utils │ │ ├── UtlVector │ │ │ └── UtlVector.cpp │ │ ├── Hash │ │ │ ├── Hash.h │ │ │ └── Hash.cpp │ │ ├── Pattern │ │ │ ├── Pattern.h │ │ │ └── Pattern.cpp │ │ ├── Interface │ │ │ ├── Interface.h │ │ │ └── Interface.cpp │ │ ├── VFunc │ │ │ └── VFunc.h │ │ ├── Utils.h │ │ ├── Color │ │ │ └── Color.h │ │ └── VMT │ │ │ └── VMT.h │ ├── SDK │ │ ├── Interfaces │ │ │ ├── NetChannel │ │ │ │ └── NetChannel.cpp │ │ │ ├── MoveHelper │ │ │ │ └── MoveHelper.h │ │ │ ├── EngineVGui │ │ │ │ └── EngineVGui.h │ │ │ ├── GlobalVarsBase │ │ │ │ └── GlobalVarsBase.h │ │ │ ├── ClientDLLSharedAppSystems │ │ │ │ └── ClientDLLSharedAppSystems.h │ │ │ ├── ClientModeShared │ │ │ │ └── ClientModeShared.h │ │ │ ├── EngineTrace │ │ │ │ └── EngineTrace.h │ │ │ ├── BaseClientDLL │ │ │ │ └── BaseClientDLL.h │ │ │ ├── RenderView │ │ │ │ └── RenderView.h │ │ │ ├── ClientEntityList │ │ │ │ └── ClientEntityList.h │ │ │ ├── Panel │ │ │ │ └── Panel.h │ │ │ ├── GameMovement │ │ │ │ └── GameMovement.h │ │ │ ├── ModelInfo │ │ │ │ └── ModelInfo.h │ │ │ ├── Steam │ │ │ │ ├── OAuthCommon.h │ │ │ │ ├── SteamSalt.h │ │ │ │ ├── AppTicketCommon.h │ │ │ │ ├── TSteamOfflineStatus.h │ │ │ │ ├── ESteamBufferMethod.h │ │ │ │ ├── BridgeCommon.h │ │ │ │ ├── SteamAPI.h │ │ │ │ ├── TSteamUpdateStats.h │ │ │ │ ├── ESteamSeekMethod.h │ │ │ │ ├── SteamclientAPI.h │ │ │ │ ├── TSteamAppVersion.h │ │ │ │ ├── TSteamAppDependencyInfo.h │ │ │ │ ├── Steamworks.h │ │ │ │ ├── TSteamSubscriptionStats.h │ │ │ │ ├── TSteamDiscountQualifier.h │ │ │ │ ├── ESteamPaymentCardType.h │ │ │ │ ├── TSteamPrepurchaseReceiptInfo.h │ │ │ │ ├── TSteamSubscriptionDiscount.h │ │ │ │ ├── MusicCommon.h │ │ │ │ ├── TSteamExternalBillingInfo.h │ │ │ │ ├── TSteamProgress.h │ │ │ │ ├── FriendGameInfo.h │ │ │ │ ├── ISteamStreamLauncher001.h │ │ │ │ ├── IClientStreamLauncher.h │ │ │ │ ├── ESteamServerType.h │ │ │ │ ├── ESteamAppUpdateStatsQueryType.h │ │ │ │ ├── MasterServerUpdaterCommon.h │ │ │ │ ├── UnifiedMessagesCommon.h │ │ │ │ ├── ESteamFindFilter.h │ │ │ │ ├── TSteamAppLaunchOption.h │ │ │ │ ├── ISteamOAuth001.h │ │ │ │ ├── EVoiceResult.h │ │ │ │ ├── ISteamContentServer001.h │ │ │ │ ├── StreamLauncherCommon.h │ │ │ │ ├── TSteamError.h │ │ │ │ ├── TSteamSubscriptionBillingInfo.h │ │ │ │ ├── ESteamSubscriptionBillingInfoType.h │ │ │ │ ├── TSteamAppStats.h │ │ │ │ ├── TSteamGlobalUserID.h │ │ │ │ ├── IClientGameCoordinator.h │ │ │ │ ├── TSteamSubscriptionReceipt.h │ │ │ │ ├── TSteamPrepurchaseInfo.h │ │ │ │ ├── Win32Library.h │ │ │ │ ├── POSIXLibrary.h │ │ │ │ ├── ISteamMusic001.h │ │ │ │ ├── ISteamUnifiedMessages001.h │ │ │ │ ├── IClientUnifiedMessages.h │ │ │ │ ├── ISteamContentServer002.h │ │ │ │ ├── ESteamNotify.h │ │ │ │ ├── TSteamApp.h │ │ │ │ ├── IClientProductBuilder.h │ │ │ │ ├── ISteamApps001.h │ │ │ │ ├── ISteamAppList001.h │ │ │ │ ├── TSteamSplitLocalUserID.h │ │ │ │ ├── ISteamRemoteStorage001.h │ │ │ │ ├── IClientStreamClient.h │ │ │ │ ├── ISteamUtils001.h │ │ │ │ ├── ISteamApps002.h │ │ │ │ ├── ISteamAppTicket001.h │ │ │ │ ├── ESteamSubscriptionStatus.h │ │ │ │ ├── MatchMakingKeyValuePair.h │ │ │ │ ├── ContentServerCommon.h │ │ │ │ ├── TSteamPaymentCardReceiptInfo.h │ │ │ │ ├── ISteamApps003.h │ │ │ │ ├── IClientContentServer.h │ │ │ │ ├── TSteamSubscription.h │ │ │ │ ├── ECurrencyCode.h │ │ │ │ ├── IClientDeviceAuth.h │ │ │ │ ├── ISteamController001.h │ │ │ │ ├── IClientApps.h │ │ │ │ ├── ISteamGameCoordinator001.h │ │ │ │ ├── ISteamRemoteStorage002.h │ │ │ │ ├── ClientCommon.h │ │ │ │ ├── ISteam2Bridge001.h │ │ │ │ ├── TSteamPaymentCardInfo.h │ │ │ │ ├── TSteamElemInfo.h │ │ │ │ ├── GameStatsCommon.h │ │ │ │ ├── ISteamGameStats001.h │ │ │ │ ├── ISteamUGC001.h │ │ │ │ ├── GameServerStatsCommon.h │ │ │ │ ├── ISteamUtils002.h │ │ │ │ └── ISteamUGC002.h │ │ │ ├── GameEvent │ │ │ │ └── GameEvent.h │ │ │ └── Interfaces.h │ │ ├── Includes │ │ │ ├── Const.h │ │ │ ├── dt_recv.h │ │ │ ├── dt_common.h │ │ │ ├── Includes.h │ │ │ ├── icons.h │ │ │ └── MD5.h │ │ ├── Main │ │ │ ├── BaseObject │ │ │ │ ├── BaseObject.h │ │ │ │ └── BaseObject.cpp │ │ │ ├── ConVars │ │ │ │ ├── ConVars.h │ │ │ │ └── ConVars.cpp │ │ │ ├── GlobalInfo │ │ │ │ └── GlobalInfo.h │ │ │ ├── BaseCombatWeapon │ │ │ │ ├── BaseCombatWeapon.h │ │ │ │ └── BaseCombatWeapon.cpp │ │ │ ├── EntityCache │ │ │ │ ├── EntityCache.h │ │ │ │ └── EntityCache.cpp │ │ │ ├── VisCheck │ │ │ │ └── VisCheck.h │ │ │ └── BaseEntity │ │ │ │ ├── AnimState │ │ │ │ ├── TFPlayerAnimState.h │ │ │ │ └── BaseAnimatingOverlay.h │ │ │ │ └── BaseEntity.h │ │ ├── SDK.h │ │ └── NetVars │ │ │ ├── NetVars.cpp │ │ │ └── NetVars.h │ ├── Hooks │ │ ├── EngineClientHook │ │ │ ├── EngineClientHook.cpp │ │ │ └── EngineClientHook.h │ │ ├── WndProcHook │ │ │ ├── WndProcHook.h │ │ │ └── WndProcHook.cpp │ │ ├── PanelHook │ │ │ ├── PanelHook.cpp │ │ │ └── PanelHook.h │ │ ├── EngineVGuiHook │ │ │ └── EngineVGuiHook.h │ │ ├── PredictionHook │ │ │ ├── PredictionHook.h │ │ │ └── PredictionHook.cpp │ │ ├── SurfaceHook │ │ │ ├── SurfaceHook.h │ │ │ └── SurfaceHook.cpp │ │ ├── Hooks.h │ │ ├── ClientModeHook │ │ │ ├── ClientModeHook.h │ │ │ └── ClientModeHook.cpp │ │ └── ClientHook │ │ │ ├── ClientHook.h │ │ │ └── ClientHook.cpp │ └── DLLMain.cpp └── SourceEngine.vcxproj.user ├── README.md └── Base.sln /SourceEngine/SourceEngine/Features/Aimbot/Aimbot.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Visuals/Radar/Radar.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Visuals/Radar/Radar.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/UtlVector/UtlVector.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/NetChannel/NetChannel.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Aimbot/Aimbot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Source-Engine-2013-base 2 | Base for SE2013(and close relatives). For writing training software. 3 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Includes/Const.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lak3/Source-Engine-2013-base/HEAD/SourceEngine/SourceEngine/SDK/Includes/Const.h -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Includes/dt_recv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lak3/Source-Engine-2013-base/HEAD/SourceEngine/SourceEngine/SDK/Includes/dt_recv.h -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Includes/dt_common.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lak3/Source-Engine-2013-base/HEAD/SourceEngine/SourceEngine/SDK/Includes/dt_common.h -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Includes/Includes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Classes.h" 4 | #include "Const.h" 5 | #include "Enums.h" 6 | #include "Structs.h" 7 | #include "MD5.h" 8 | #include "icons.h" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Movement/Movement.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | class C_Movement 5 | { 6 | public: 7 | bool bBunnyhop = true; 8 | 9 | void DoBunnyhop(C_UserCmd* pCmd); 10 | }; 11 | 12 | extern C_Movement gMovement; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/EngineClientHook/EngineClientHook.cpp: -------------------------------------------------------------------------------- 1 | #include "EngineClientHook.h" 2 | 3 | bool __stdcall EngineClientHook::IsPlayingTimeDemo::Hook() 4 | { 5 | // ... 6 | 7 | return Table.Original(index)(gInts.Engine); 8 | } 9 | 10 | VMT::Table EngineClientHook::Table; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/WndProcHook/WndProcHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../SDK/SDK.h" 4 | 5 | typedef LONG(WINAPI* WNDPROC)(HWND, UINT, WPARAM, LPARAM); 6 | 7 | namespace WndProcHook 8 | { 9 | extern WNDPROC WndProc; 10 | LONG WINAPI Hook(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 11 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/MoveHelper/MoveHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_MoveHelper 5 | { 6 | public: 7 | void SetHost(C_BaseEntity *host) 8 | { 9 | typedef void(__thiscall *FN)(PVOID, C_BaseEntity *); 10 | GetVFunc(this, 0)(this, host); 11 | } 12 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Hash/Hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //Main hash function 4 | //And prehashed strings allowing for fast comparisong. 5 | namespace Hash 6 | { 7 | int String(const char* szOrg); 8 | 9 | //Panels 10 | constexpr int HudScope = 200208064; 11 | constexpr int FocusOverlayPanel = -861513321; 12 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/PanelHook/PanelHook.cpp: -------------------------------------------------------------------------------- 1 | #include "PanelHook.h" 2 | 3 | void __stdcall PanelHook::PaintTraverse::Hook(unsigned int vgui_panel, bool force_repaint, bool allow_force) 4 | { 5 | Table.Original(index)(gInts.Panel, vgui_panel, force_repaint, allow_force); 6 | 7 | //... 8 | } 9 | 10 | VMT::Table PanelHook::Table; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/EngineVGuiHook/EngineVGuiHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | namespace EngineVGuiHook 5 | { 6 | extern VMT::Table Table; 7 | 8 | namespace Paint 9 | { 10 | using fn = void(__thiscall *)(C_EngineVGui *, int); 11 | const int index = 13; 12 | void __stdcall Hook(int mode); 13 | } 14 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/EngineClientHook/EngineClientHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../SDK/SDK.h" 4 | 5 | namespace EngineClientHook 6 | { 7 | extern VMT::Table Table; 8 | 9 | namespace IsPlayingTimeDemo 10 | { 11 | const int index = 78; 12 | using fn = bool(__thiscall *)(C_EngineClient *); 13 | bool __stdcall Hook(); 14 | } 15 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Pattern/Pattern.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class CPattern 5 | { 6 | private: 7 | DWORD FindPattern(DWORD dwAddress, DWORD dwLength, PCCH szPattern); 8 | HMODULE GetModuleHandleSafe(PCCH szModuleName); 9 | public: 10 | DWORD Find(PCCH szModuleName, PCCH szPattern); 11 | }; 12 | 13 | extern CPattern gPattern; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/EngineVGui/EngineVGui.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_EngineVGui 5 | { 6 | public: 7 | virtual ~C_EngineVGui(void) { } 8 | virtual unsigned int GetPanel(VGuiPanel_t type) = 0; 9 | virtual bool IsGameUIVisible() = 0; 10 | }; 11 | 12 | #define VENGINE_VGUI_VERSION "VEngineVGui001" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Hash/Hash.cpp: -------------------------------------------------------------------------------- 1 | #include "Hash.h" 2 | 3 | //The magic of number 33, i.e. why it works better than many other constants, 4 | //prime or not, has never been adequately explained by anyone. 5 | int Hash::String(const char* szOrg) { 6 | int iHash = 5381; 7 | 8 | while (int iStr = *szOrg++) iHash = iHash * 33 + iStr; 9 | 10 | return iHash; 11 | } 12 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseObject/BaseObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../BaseEntity/BaseEntity.h" 3 | 4 | class C_BaseObject : public C_BaseEntity 5 | { 6 | public: 7 | C_BaseEntity *GetOwner(); 8 | int GetLevel(); 9 | bool IsSapped(); 10 | bool IsPlasmaDisabled(); 11 | bool IsDisabled(); 12 | int GetHealth(); 13 | int GetMaxHealth(); 14 | bool IsCarried(); 15 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/GlobalVarsBase/GlobalVarsBase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_GlobalVarsBase 5 | { 6 | public: 7 | float realtime; 8 | int framecount; 9 | float absoluteframetime; 10 | float curtime; 11 | float frametime; 12 | int maxclients; 13 | int tickcount; 14 | float interval_per_tick; 15 | float interpolation_amount; 16 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/PanelHook/PanelHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | namespace PanelHook 5 | { 6 | extern VMT::Table Table; 7 | 8 | namespace PaintTraverse 9 | { 10 | const int index = 41; 11 | using fn = void(__thiscall *)(C_Panel*, unsigned int, bool, bool); 12 | void __stdcall Hook(unsigned int vgui_panel, bool force_repaint, bool allow_force); 13 | } 14 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/ConVars/ConVars.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../BaseEntity/BaseEntity.h" 4 | 5 | struct ConVars_t 6 | { 7 | ConVar *cl_interp = nullptr; 8 | ConVar *cl_interp_ratio = nullptr; 9 | ConVar *cl_updaterate = nullptr; 10 | 11 | ConVar *sv_gravity = nullptr; 12 | ConVar *cl_flipviewmodels = nullptr; 13 | 14 | void Init(); 15 | }; 16 | 17 | extern ConVars_t gConVars; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/ClientDLLSharedAppSystems/ClientDLLSharedAppSystems.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_ClientDLLSharedAppSystems 5 | { 6 | public: 7 | virtual int Count() = 0; 8 | virtual char const *GetDllName(int idx) = 0; 9 | virtual char const *GetInterfaceName(int idx) = 0; 10 | }; 11 | 12 | #define CLIENT_DLL_SHARED_APPSYSTEMS "VClientDllSharedAppSystems001" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Interface/Interface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | class CInterface 5 | { 6 | private: 7 | typedef PVOID(*InstantiateInterface)(); 8 | 9 | struct Interface_t 10 | { 11 | InstantiateInterface Interface; 12 | PCHAR szInterfaceName; 13 | Interface_t *NextInterface; 14 | }; 15 | 16 | public: 17 | PVOID Get(PCCH szModule, PCCH szObject); 18 | }; 19 | 20 | extern CInterface gInterface; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/PredictionHook/PredictionHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | namespace PredictionHook 5 | { 6 | extern VMT::Table Table; 7 | 8 | namespace RunCommand 9 | { 10 | const int index = 17; 11 | using fn = void(__thiscall *)(C_Prediction *, C_BaseEntity *, C_UserCmd *, C_MoveHelper *); 12 | void __stdcall Hook(C_BaseEntity *pEntity, C_UserCmd *pCmd, C_MoveHelper *pMoveHelper); 13 | } 14 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/PredictionHook/PredictionHook.cpp: -------------------------------------------------------------------------------- 1 | #include "PredictionHook.h" 2 | 3 | void __stdcall PredictionHook::RunCommand::Hook(C_BaseEntity *pEntity, C_UserCmd *pCmd, C_MoveHelper *pMoveHelper) 4 | { 5 | Table.Original(index)(gInts.Prediction, pEntity, pCmd, pMoveHelper); 6 | 7 | if (pMoveHelper && !gInts.MoveHelper) 8 | gInts.MoveHelper = pMoveHelper; 9 | 10 | //... 11 | } 12 | 13 | VMT::Table PredictionHook::Table; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/ConVars/ConVars.cpp: -------------------------------------------------------------------------------- 1 | #include "ConVars.h" 2 | 3 | void ConVars_t::Init() 4 | { 5 | cl_interp = gInts.CVars->FindVar("cl_interp"); 6 | cl_interp_ratio = gInts.CVars->FindVar("cl_interp_ratio"); 7 | cl_updaterate = gInts.CVars->FindVar("cl_updaterate"); 8 | 9 | sv_gravity = gInts.CVars->FindVar("sv_gravity"); 10 | cl_flipviewmodels = gInts.CVars->FindVar("cl_flipviewmodels"); 11 | } 12 | 13 | ConVars_t gConVars; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/ClientModeShared/ClientModeShared.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_BaseHudChat 5 | { 6 | public: 7 | void ChatPrintf(int pIndex, const char *fmt, ...) 8 | { 9 | typedef void *(__thiscall *FN)(PVOID, int, const char *); 10 | GetVFunc(this, 19)(this, pIndex, fmt); 11 | } 12 | }; 13 | 14 | class C_ClientModeShared 15 | { 16 | public: 17 | char szPad[28]; 18 | C_BaseHudChat *m_pChatElement; 19 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/SurfaceHook/SurfaceHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | namespace SurfaceHook 5 | { 6 | extern VMT::Table Table; 7 | 8 | namespace OnScreenSizeChanged 9 | { 10 | const int index = 111; 11 | using fn = void(__thiscall *)(C_Surface *, int, int); 12 | void __stdcall Hook(int OldWidht, int OldHeight); 13 | } 14 | 15 | namespace LockCursor 16 | { 17 | const int index = 62; 18 | using fn = void(__thiscall*)(C_Surface*); 19 | void __stdcall Hook(); 20 | } 21 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/VFunc/VFunc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | inline void **&GetVTable(void *inst, size_t offset = 0) 4 | { 5 | return *reinterpret_cast((size_t)inst + offset); 6 | } 7 | 8 | inline const void **GetVTable(const void *inst, size_t offset = 0) 9 | { 10 | return *reinterpret_cast((size_t)inst + offset); 11 | } 12 | 13 | template 14 | inline T GetVFunc(const void *inst, size_t index, size_t offset = 0) 15 | { 16 | return reinterpret_cast(GetVTable(inst, offset)[index]); 17 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Prediction/Prediction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../SDK/SDK.h" 4 | 5 | class C_LocalPrediction 6 | { 7 | private: 8 | C_MoveData moveData = { }; 9 | float fOldCurrentTime = 0.0f; 10 | float fOldFrameTime = 0.0f; 11 | int nOldTickCount = 0; 12 | 13 | private: 14 | int GetTickbase(C_UserCmd *pCmd, C_BaseEntity *pLocal); 15 | 16 | public: 17 | void Start(C_UserCmd *pCmd); 18 | void End(C_UserCmd *pCmd); 19 | 20 | int nOldFlags = 0; 21 | }; 22 | 23 | extern C_LocalPrediction gPrediction; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/EngineTrace/EngineTrace.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_EngineTrace 5 | { 6 | public: 7 | void TraceRay(const Ray_t &Ray, unsigned int Mask, C_TraceFilter *TraceFilter, C_GameTrace *GameTrace) 8 | { 9 | typedef void(__thiscall *FN)(PVOID, const Ray_t &, unsigned int, C_TraceFilter *, C_GameTrace *); 10 | return GetVFunc(this, 4)(this, Ray, Mask, TraceFilter, GameTrace); 11 | } 12 | }; 13 | 14 | #define VENGINE_TRACE_CLIENT_INTERFACE_VERSION "EngineTraceClient003" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/SurfaceHook/SurfaceHook.cpp: -------------------------------------------------------------------------------- 1 | #include "SurfaceHook.h" 2 | 3 | #include "../../Features/Menu/Menu.h" 4 | 5 | void __stdcall SurfaceHook::OnScreenSizeChanged::Hook(int OldWidht, int OldHeight) 6 | { 7 | Table.Original(index)(gInts.Surface, OldWidht, OldHeight); 8 | 9 | gScreenSize.Update(); 10 | gDraw.ReloadFonts(); 11 | } 12 | 13 | void __stdcall SurfaceHook::LockCursor::Hook() 14 | { 15 | gMenu.m_Open ? gInts.Surface->UnlockCursor() : Table.Original(index)(gInts.Surface); 16 | } 17 | 18 | VMT::Table SurfaceHook::Table; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/Hooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ClientHook/ClientHook.h" 4 | #include "ClientModeHook/ClientModeHook.h" 5 | #include "PredictionHook/PredictionHook.h" 6 | #include "SurfaceHook/SurfaceHook.h" 7 | #include "PanelHook/PanelHook.h" 8 | #include "EngineVGuiHook/EngineVGuiHook.h" 9 | #include "EngineClientHook/EngineClientHook.h" 10 | #include "WndProcHook/WndProcHook.h" 11 | 12 | class C_Hooks 13 | { 14 | private: 15 | HWND Window = 0; 16 | 17 | public: 18 | void Init(); 19 | void Release(); 20 | }; 21 | 22 | extern C_Hooks gHooks; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/BaseClientDLL/BaseClientDLL.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_BaseClientDLL 5 | { 6 | public: 7 | C_ClientClass *GetAllClasses() 8 | { 9 | typedef C_ClientClass *(__thiscall *FN)(PVOID); 10 | return GetVFunc(this, 8)(this); 11 | } 12 | 13 | bool GetPlayerView(C_ViewSetup& playerView) 14 | { 15 | typedef bool(__thiscall* FN)(PVOID, C_ViewSetup&); 16 | return GetVFunc(this, 59)(this, playerView); 17 | } 18 | }; 19 | 20 | #define CLIENT_DLL_INTERFACE_VERSION "VClient017" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/RenderView/RenderView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class C_RenderView 4 | { 5 | public: 6 | void GetMatricesForView(const C_ViewSetup& view, VMatrix* pWorldToView, VMatrix* pViewToProjection, VMatrix* pWorldToProjection, VMatrix* pWorldToPixels) { 7 | typedef void(__thiscall* FN)(PVOID, const C_ViewSetup&, VMatrix*, VMatrix*, VMatrix*, VMatrix*); 8 | GetVFunc(this, 50)(this, view, pWorldToView, pViewToProjection, pWorldToProjection, pWorldToPixels); 9 | } 10 | }; 11 | 12 | #define VENGINE_RENDERVIEW_INTERFACE_VERSION "VEngineRenderView014" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Color/Color.h" //this includes math 4 | #include "Interface/Interface.h" 5 | #include "VFunc/VFunc.h" 6 | #include "VMT/VMT.h" 7 | #include "Pattern/Pattern.h" 8 | #include "Hash/Hash.h" 9 | #include "UtlVector/UtlVector.h" 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #undef min 24 | #undef max -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Movement/Movement.cpp: -------------------------------------------------------------------------------- 1 | #include "Movement.h" 2 | 3 | void C_Movement::DoBunnyhop(C_UserCmd* pCmd) 4 | { 5 | if (auto pLocal{ gEntCache.pLocal }) 6 | { 7 | if (!bBunnyhop || !pLocal->IsAlive()) 8 | return; 9 | 10 | static bool bJumpState = false; 11 | 12 | if (pCmd->buttons & IN_JUMP) 13 | { 14 | if (!bJumpState && !pLocal->IsOnGround()) 15 | pCmd->buttons &= ~IN_JUMP; 16 | 17 | else if (bJumpState) 18 | bJumpState = false; 19 | } 20 | 21 | else if (!bJumpState) 22 | bJumpState = true; 23 | } 24 | } 25 | 26 | C_Movement gMovement; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Color/Color.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../Math/Math.h" 3 | 4 | using byte = unsigned char; 5 | 6 | struct Color_t { byte r = 0, g = 0, b = 0, a = 0; }; 7 | 8 | namespace Color 9 | { 10 | inline float TOFLOAT(byte x) { 11 | return (static_cast(x) / 255.0f); 12 | } 13 | 14 | inline Vec3 TOVEC3(const Color_t &x) { 15 | return Vec3(TOFLOAT(x.r), TOFLOAT(x.g), TOFLOAT(x.b)); 16 | } 17 | 18 | inline unsigned long TODWORD(const Color_t &x) { 19 | return (static_cast(((x.r & 0xFF) << 24) | ((x.g & 0xFF) << 16) | ((x.b & 0xFF) << 8) | (x.a & 0xFF))); 20 | } 21 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Menu/Input/Input.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../../SDK/Includes/Includes.h" 3 | 4 | enum struct EKeyState { 5 | NONE, 6 | PRESSED, 7 | HELD 8 | }; 9 | 10 | enum struct EScrollWheelState { 11 | NONE, 12 | UP, 13 | DOWN 14 | }; 15 | 16 | class C_Input 17 | { 18 | public: 19 | std::map m_Keyboard = {}; 20 | EKeyState m_RMouse = {}; 21 | EKeyState m_LMouse = {}; 22 | EKeyState m_MMouse = {}; 23 | EScrollWheelState m_Wheel = {}; 24 | 25 | void Update(); 26 | 27 | EKeyState GetKey(int key); 28 | EKeyState GetMouse(int key); 29 | }; 30 | 31 | extern C_Input gInput; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/GlobalInfo/GlobalInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #pragma once 3 | #include "../BaseEntity/BaseEntity.h" 4 | 5 | struct GlobalInfo_t 6 | { 7 | //vars 8 | int nCurrentTargetIdx = 0; 9 | bool bWeaponCanHeadShot = false; 10 | bool bWeaponCanShoot = false; 11 | float fChargeTime = 0.0f; 12 | Vec3 vecUCMDAngles = Vec3(); 13 | 14 | //temporary place for some features I guess 15 | bool bNoInterpolation = true; 16 | Vec3 vecPredictedPos = Vec3(); 17 | 18 | //Fuck 19 | bool m_bDrawMenu = false; 20 | int m_nFocusOverlay = 0; 21 | 22 | VMatrix WorldToProjection = {}; 23 | }; 24 | 25 | inline GlobalInfo_t gGlobalInfo; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseCombatWeapon/BaseCombatWeapon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../BaseEntity/BaseEntity.h" 4 | 5 | class C_BaseCombatWeapon : public C_BaseEntity 6 | { 7 | public: 8 | int GetWeaponID(); 9 | int GetClip1(); 10 | int GetSlot(); 11 | float GetChargeTime(); 12 | int GetItemDefinitionIndex(); 13 | float GetSwingRange(C_BaseEntity* pLocal); 14 | bool DoSwingTrace(C_GameTrace& Trace); 15 | Vec3& GetBulletSpread(); 16 | int GetDamageType(); 17 | bool CanFireCriticalShot(bool bHeadShot = false); 18 | float GetNextPrimaryAttack(); 19 | float GetNextSecondaryAttack(); 20 | bool CanShoot(C_BaseEntity* pLocal); 21 | bool CanSecondaryAttack(C_BaseEntity* pLocal); 22 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/EntityCache/EntityCache.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../BaseEntity/BaseEntity.h" 4 | #include "../BaseCombatWeapon/BaseCombatWeapon.h" 5 | #include "../BaseObject/BaseObject.h" 6 | 7 | enum struct GroupType_t 8 | { 9 | PLAYERS_ALL, 10 | PLAYERS_ENEMIES, 11 | PLAYERS_TEAMMATES, 12 | 13 | WORLD_BOMB 14 | }; 15 | 16 | class C_EntityCache 17 | { 18 | private: 19 | std::map> Groups; 20 | 21 | public: 22 | C_BaseEntity *pLocal = nullptr; 23 | C_BaseCombatWeapon *pLocalWeapon = nullptr; 24 | 25 | void Fill(); 26 | void Clear(); 27 | const std::vector &GetGroup(const GroupType_t &group); 28 | }; 29 | 30 | extern C_EntityCache gEntCache; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/ClientEntityList/ClientEntityList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_ClientEntityList 5 | { 6 | public: 7 | C_BaseEntity *GetClientEntity(int nEntityIndex) 8 | { 9 | typedef C_BaseEntity *(__thiscall *FN)(PVOID, int); 10 | return GetVFunc(this, 3)(this, nEntityIndex); 11 | } 12 | 13 | C_BaseEntity *GetClientEntityFromHandle(int hEntity) 14 | { 15 | typedef C_BaseEntity *(__thiscall *FN)(PVOID, int); 16 | return GetVFunc(this, 4)(this, hEntity); 17 | } 18 | 19 | int GetHighestEntityIndex() 20 | { 21 | typedef int(__thiscall *FN)(PVOID); 22 | return GetVFunc(this, 6)(this); 23 | } 24 | }; 25 | 26 | #define VCLIENTENTITYLIST_INTERFACE_VERSION "VClientEntityList003" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Panel/Panel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_Panel 5 | { 6 | public: 7 | const char *GetName(unsigned int vgui_panel) 8 | { 9 | typedef const char *(__thiscall *FN)(PVOID, unsigned int); 10 | return GetVFunc(this, 36)(this, vgui_panel); 11 | } 12 | 13 | void SetMouseInputEnabled(unsigned int panel, bool state) 14 | { 15 | typedef void(__thiscall *FN)(void *, int, bool); 16 | GetVFunc(this, 32)(this, panel, state); 17 | } 18 | 19 | void SetTopmostPopup(unsigned int panel, bool state) 20 | { 21 | typedef void(__thiscall *FN)(void *, int, bool); 22 | GetVFunc(this, 59)(this, panel, state); 23 | } 24 | }; 25 | 26 | #define VGUI_PANEL_INTERFACE_VERSION "VGUI_Panel009" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/ClientModeHook/ClientModeHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | namespace ClientModeHook 5 | { 6 | extern VMT::Table Table; 7 | 8 | namespace OverrideView 9 | { 10 | const int index = 16; 11 | using fn = void(__thiscall *)(C_ClientModeShared *, C_ViewSetup *); 12 | void __stdcall Hook(C_ViewSetup *pView); 13 | } 14 | 15 | namespace ShouldDrawViewModel 16 | { 17 | const int index = 24; 18 | using fn = bool(__thiscall *)(C_ClientModeShared *); 19 | bool __stdcall Hook(); 20 | } 21 | 22 | namespace CreateMove 23 | { 24 | const int index = 21; 25 | using fn = bool(__thiscall *)(C_ClientModeShared *, float, C_UserCmd*); 26 | bool __stdcall Hook(float input_sample_frametime, C_UserCmd *pCmd); 27 | } 28 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Interface/Interface.cpp: -------------------------------------------------------------------------------- 1 | #include "Interface.h" 2 | 3 | PVOID CInterface::Get(PCCH szModule, PCCH szObject) 4 | { 5 | HMODULE Module = GetModuleHandleA(szModule); 6 | 7 | if (!Module) 8 | return nullptr; 9 | 10 | DWORD CreateInterface = (DWORD)GetProcAddress(Module, "CreateInterface"); 11 | DWORD ShortJump = (DWORD)CreateInterface + 5; 12 | DWORD Jump = (((DWORD)CreateInterface + 5) + *(DWORD *)ShortJump) + 4; 13 | Interface_t *List = **(Interface_t ***)(Jump + 6); 14 | 15 | while (List) 16 | { 17 | if (List && (strstr(List->szInterfaceName, szObject) && (strlen(List->szInterfaceName) - strlen(szObject)) < 5)) 18 | return List->Interface(); 19 | 20 | List = List->NextInterface; 21 | } 22 | 23 | return nullptr; 24 | } 25 | 26 | CInterface gInterface; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Includes/icons.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | enum ETextureID 5 | { 6 | DEFAULT_CT, 7 | DEFAULT_T, 8 | DEFUSER 9 | }; 10 | 11 | namespace ICONS { 12 | 13 | inline const int WIDTH = 64; 14 | inline const int HEIGHT = 64; 15 | 16 | inline int ID[10] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; 17 | 18 | //All non "CSS" are leftovers from Team Fortress 2 19 | inline std::string TEXTURES[10] = { 20 | "vgui/gfx/vgui/defuser.vtf", //CSS 21 | "hud/leaderboard_class_soldier.vtf", 22 | "vgui/avatar_default-t_64.vtf", //CSS 23 | "vgui/avatar_default_64.vtf", //CSS 24 | "hud/leaderboard_class_demo.vtf", 25 | "hud/leaderboard_class_medic.vtf", 26 | "hud/leaderboard_class_heavy.vtf", 27 | "hud/leaderboard_class_pyro.vtf", 28 | "hud/leaderboard_class_spy.vtf", 29 | "hud/leaderboard_class_engineer.vtf" 30 | }; 31 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Menu/Input/Input.cpp: -------------------------------------------------------------------------------- 1 | #include "Input.h" 2 | 3 | void C_Input::Update() 4 | { 5 | for (auto &Key : gInput.m_Keyboard) { 6 | if (Key.second != EKeyState::NONE) 7 | Key.second = EKeyState::HELD; 8 | } 9 | 10 | if (gInput.m_RMouse != EKeyState::NONE) 11 | gInput.m_RMouse = EKeyState::HELD; 12 | 13 | if (gInput.m_LMouse != EKeyState::NONE) 14 | gInput.m_LMouse = EKeyState::HELD; 15 | 16 | if (gInput.m_MMouse != EKeyState::NONE) 17 | gInput.m_MMouse = EKeyState::HELD; 18 | } 19 | 20 | EKeyState C_Input::GetKey(int key) 21 | { 22 | return m_Keyboard[key]; 23 | } 24 | 25 | EKeyState C_Input::GetMouse(int key) 26 | { 27 | switch (key) 28 | { 29 | case VK_RBUTTON: { return m_RMouse; } 30 | case VK_LBUTTON: { return m_LMouse; } 31 | case VK_MBUTTON: { return m_MMouse; } 32 | } 33 | 34 | return {}; 35 | } 36 | 37 | C_Input gInput; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Visuals/ESP/ESP.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../../SDK/SDK.h" 4 | 5 | class C_ESP 6 | { 7 | public: 8 | bool bActive = true; 9 | bool bOutline = false; 10 | 11 | bool bPlayers = true; 12 | int nNoTeammatePlayers = 2; //0 off 1 all 2 keep friends 13 | bool bPlayerName = true; 14 | bool bPlayerClass = true; 15 | bool bPlayerHealth = false; 16 | bool bPlayerCond = true; 17 | bool bPlayerHealthBar = true; 18 | int nPlayerBox = 2; //0 off 1 simple 2 corners 19 | 20 | bool bDebug = false; 21 | 22 | private: 23 | std::wstring ConvertUtf8ToWide(const std::string& str); 24 | 25 | private: 26 | bool ShouldRun(); 27 | bool GetDrawBounds(C_BaseEntity* pEntity, int& x, int& y, int& w, int& h); 28 | Color_t GetDrawColor(C_BaseEntity* pLocal, C_BaseEntity* pEntity); 29 | 30 | public: 31 | void Paint(); 32 | }; 33 | 34 | extern C_ESP gESP; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/ClientHook/ClientHook.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../SDK/SDK.h" 4 | 5 | namespace ClientHook 6 | { 7 | extern VMT::Table Table; 8 | 9 | namespace PreEntity 10 | { 11 | const int index = 5; 12 | using fn = void(__thiscall *)(C_BaseClientDLL *, char const *); 13 | void __stdcall Hook(char const *szMapName); 14 | } 15 | 16 | namespace PostEntity 17 | { 18 | const int index = 6; 19 | using fn = void(__thiscall *)(C_BaseClientDLL *); 20 | void __stdcall Hook(); 21 | } 22 | 23 | namespace ShutDown 24 | { 25 | const int index = 7; 26 | using fn = void(__thiscall *)(C_BaseClientDLL *); 27 | void __stdcall Hook(); 28 | } 29 | 30 | namespace FrameStageNotify 31 | { 32 | const int index = 35; 33 | using fn = void(__thiscall *)(C_BaseClientDLL *, ClientFrameStage_t); 34 | void __stdcall Hook(ClientFrameStage_t FrameStage); 35 | } 36 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/GameMovement/GameMovement.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_GameMovement 5 | { 6 | public: 7 | virtual ~C_GameMovement(void) {} 8 | 9 | // Process the current movement command 10 | virtual void ProcessMovement(C_BaseEntity *pPlayer, C_MoveData *pMove) = 0; 11 | virtual void StartTrackPredictionErrors(C_BaseEntity *pPlayer) = 0; 12 | virtual void FinishTrackPredictionErrors(C_BaseEntity *pPlayer) = 0; 13 | virtual void DiffPrint(char const *fmt, ...) = 0; 14 | 15 | // Allows other parts of the engine to find out the normal and ducked player bbox sizes 16 | virtual Vec3 const &GetPlayerMins(bool ducked) const = 0; 17 | virtual Vec3 const &GetPlayerMaxs(bool ducked) const = 0; 18 | virtual Vec3 const &GetPlayerViewOffset(bool ducked) const = 0; 19 | }; 20 | 21 | #define CLIENT_GAMEMOVEMENT_INTERFACE_VERSION "GameMovement001" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/ModelInfo/ModelInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../Includes/Includes.h" 3 | 4 | class C_ModelInfoClient 5 | { 6 | public: 7 | model_t *GetModel(int index) 8 | { 9 | typedef model_t *(__thiscall *FN)(PVOID, int); 10 | return GetVFunc(this, 1)(this, index); 11 | } 12 | 13 | int GetModelIndex(const char *name) 14 | { 15 | typedef int (__thiscall *FN)(PVOID, const char *); 16 | return GetVFunc(this, 2)(this, name); 17 | } 18 | 19 | const char *GetModelName(const model_t *model) 20 | { 21 | typedef const char *(__thiscall *FN)(PVOID, const model_t *); 22 | return GetVFunc(this, 3)(this, model); 23 | } 24 | 25 | studiohdr_t *GetStudioModel(const model_t *model) 26 | { 27 | typedef studiohdr_t *(__thiscall *FN)(PVOID, const model_t *); 28 | return GetVFunc(this, 28)(this, model); 29 | } 30 | }; 31 | 32 | #define VMODELINFO_CLIENT_INTERFACE_VERSION "VModelInfoClient006" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/ClientHook/ClientHook.cpp: -------------------------------------------------------------------------------- 1 | #include "ClientHook.h" 2 | 3 | void __stdcall ClientHook::PreEntity::Hook(char const *szMapName) 4 | { 5 | Table.Original(index)(gInts.Client, szMapName); 6 | 7 | //.. 8 | } 9 | 10 | void __stdcall ClientHook::PostEntity::Hook() 11 | { 12 | Table.Original(index)(gInts.Client); 13 | 14 | //... 15 | } 16 | 17 | void __stdcall ClientHook::ShutDown::Hook() 18 | { 19 | Table.Original(index)(gInts.Client); 20 | 21 | gEntCache.Clear(); 22 | } 23 | 24 | void __stdcall ClientHook::FrameStageNotify::Hook(ClientFrameStage_t FrameStage) 25 | { 26 | Table.Original(index)(gInts.Client, FrameStage); 27 | 28 | switch (FrameStage) 29 | { 30 | case ClientFrameStage_t::FRAME_NET_UPDATE_START: 31 | { 32 | gEntCache.Clear(); 33 | break; 34 | } 35 | 36 | case ClientFrameStage_t::FRAME_NET_UPDATE_END: 37 | { 38 | gEntCache.Fill(); 39 | break; 40 | } 41 | } 42 | } 43 | 44 | VMT::Table ClientHook::Table; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseObject/BaseObject.cpp: -------------------------------------------------------------------------------- 1 | #include "BaseObject.h" 2 | 3 | C_BaseEntity *C_BaseObject::GetOwner() 4 | { 5 | DYNVAR_RETURN(C_BaseEntity *, this, "DT_BaseObject", "m_hBuilder"); 6 | } 7 | 8 | int C_BaseObject::GetLevel() 9 | { 10 | DYNVAR_RETURN(int, this, "DT_BaseObject", "m_iUpgradeLevel"); 11 | } 12 | 13 | bool C_BaseObject::IsSapped() 14 | { 15 | DYNVAR_RETURN(bool, this, "DT_BaseObject", "m_bHasSapper"); 16 | } 17 | 18 | bool C_BaseObject::IsPlasmaDisabled() 19 | { 20 | DYNVAR_RETURN(bool, this, "DT_BaseObject", "m_bPlasmaDisable"); //cowmangler's secondary attack I think 21 | } 22 | 23 | bool C_BaseObject::IsDisabled() 24 | { 25 | DYNVAR_RETURN(bool, this, "DT_BaseObject", "m_bDisabled"); 26 | } 27 | 28 | int C_BaseObject::GetHealth() 29 | { 30 | DYNVAR_RETURN(int, this, "DT_BaseObject", "m_iHealth"); 31 | } 32 | 33 | int C_BaseObject::GetMaxHealth() 34 | { 35 | DYNVAR_RETURN(int, this, "DT_BaseObject", "m_iMaxHealth"); 36 | } 37 | 38 | bool C_BaseObject::IsCarried() 39 | { 40 | DYNVAR_RETURN(int, this, "DT_BaseObject", "m_bCarried"); 41 | } -------------------------------------------------------------------------------- /Base.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29905.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SourceEngine", "SourceEngine\SourceEngine.vcxproj", "{B0E892F3-31FF-4AC4-9D80-C58D98FD5E3F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B0E892F3-31FF-4AC4-9D80-C58D98FD5E3F}.Debug|x86.ActiveCfg = Debug|Win32 15 | {B0E892F3-31FF-4AC4-9D80-C58D98FD5E3F}.Debug|x86.Build.0 = Debug|Win32 16 | {B0E892F3-31FF-4AC4-9D80-C58D98FD5E3F}.Release|x86.ActiveCfg = Release|Win32 17 | {B0E892F3-31FF-4AC4-9D80-C58D98FD5E3F}.Release|x86.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E75861D4-4DA3-4D9A-A9E0-213AA9064809} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/OAuthCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef OAUTHCOMMON_H 18 | #define OAUTHCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define STEAMOAUTH_INTERFACE_VERSION_001 "SteamOAuth001" 24 | 25 | #endif // OAUTHCOMMON_H 26 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/SteamSalt.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef STEAMSALT_H 18 | #define STEAMSALT_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct SteamSalt 24 | { 25 | unsigned char uchSalt[STEAM_SALT_SIZE]; 26 | } SteamSalt_t; 27 | 28 | #endif // STEAMSALT_H 29 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/VMT/VMT.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include //std::unique_ptr 4 | 5 | //written by a pleb 6 | namespace VMT 7 | { 8 | class Table 9 | { 10 | private: 11 | unsigned int** baseclass = nullptr; 12 | std::unique_ptr current; 13 | unsigned int* original = nullptr; 14 | int size = 0; 15 | 16 | public: 17 | void Init(const void* base) 18 | { 19 | baseclass = (unsigned int**)(base); 20 | 21 | if (size == 0) { 22 | while (static_cast(*baseclass)[size]) 23 | size++; 24 | } 25 | 26 | original = *baseclass; 27 | current = std::make_unique(size); 28 | std::memcpy(current.get(), original, size * sizeof(unsigned int)); 29 | *baseclass = current.get(); 30 | }; 31 | template 32 | inline FN Original(const int index) { return reinterpret_cast(original[index]); } 33 | inline void Hook(const int index, void* function) { current[index] = reinterpret_cast(function); } 34 | inline void Unhook(const int index) { current[index] = original[index]; } 35 | inline bool Initialized() { return size && original != nullptr; } 36 | inline void RestoreTable() { if (Initialized()) *baseclass = original; } 37 | }; 38 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/AppTicketCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef APPTICKETCOMMON_H 18 | #define APPTICKETCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define STEAMAPPTICKET_INTERFACE_VERSION_001 "STEAMAPPTICKET_INTERFACE_VERSION001" 24 | 25 | #endif // APPTICKETCOMMON_H 26 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/VisCheck/VisCheck.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../BaseEntity/BaseEntity.h" 4 | 5 | class C_TraceFilterHitscan : public C_TraceFilter 6 | { 7 | public: 8 | virtual bool ShouldHitEntity(void* pEntityHandle, int nContentsMask); 9 | virtual TraceType_t GetTraceType() const; 10 | C_BaseEntity* pSkip = nullptr; 11 | }; 12 | 13 | class C_TraceFilterWorldAndPropsOnly : public C_TraceFilter 14 | { 15 | public: 16 | virtual bool ShouldHitEntity(void *pEntityHandle, int nContentsMask); 17 | virtual TraceType_t GetTraceType() const; 18 | C_BaseEntity *pSkip = nullptr; 19 | }; 20 | 21 | class C_TraceFilterWorldAndPropsOnlyOther : public C_TraceFilter 22 | { 23 | public: 24 | virtual bool ShouldHitEntity(void *pEntityHandle, int nContentsMask); 25 | virtual TraceType_t GetTraceType() const; 26 | C_BaseEntity *pSkip = nullptr; 27 | }; 28 | 29 | class C_VisCheck 30 | { 31 | public: 32 | bool Pos(C_BaseEntity* pSkip, C_BaseEntity* pEntity, const Vec3& from, const Vec3& to); 33 | bool PosHitboxId(C_BaseEntity* pSkip, C_BaseEntity* pEntity, const Vec3& from, const Vec3& to, int nHitbox); 34 | bool PosHitboxIdOut(C_BaseEntity* pSkip, C_BaseEntity* pEntity, const Vec3& from, const Vec3& to, int& nHitboxOut); 35 | }; 36 | 37 | extern C_VisCheck gVisCheck; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseEntity/AnimState/TFPlayerAnimState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MultiPlayerAnimState.h" 3 | 4 | class CTFPlayerAnimState : public CMultiPlayerAnimState 5 | { 6 | public: 7 | C_BaseEntity *GetTFPlayer() { return m_pTFPlayer; } 8 | 9 | virtual void ClearAnimationState() = 0; 10 | virtual Activity TranslateActivity(Activity actDesired) = 0; 11 | virtual void Update(float eyeYaw, float eyePitch) = 0; 12 | virtual void CheckStunAnimation() = 0; 13 | virtual Activity CalcMainActivity() = 0; 14 | virtual void ComputePoseParam_AimYaw(CStudioHdr *pStudioHdr) = 0; 15 | virtual float GetCurrentMaxGroundSpeed() = 0; 16 | virtual float GetGesturePlaybackRate() = 0; 17 | virtual bool ShouldUpdateAnimState() = 0; 18 | virtual void GetOuterAbsVelocity(Vec3 &vel) = 0; 19 | virtual void RestartGesture(int iGestureSlot, Activity iGestureActivity, bool bAutoKill = true) = 0; 20 | void SetRenderAngles(const Vec3 &angles) { m_angRender = angles; } 21 | 22 | C_BaseEntity *m_pTFPlayer; 23 | bool m_bInAirWalk; 24 | float m_flHoldDeployedPoseUntilTime; 25 | float m_flTauntMoveX; 26 | float m_flTauntMoveY; 27 | float m_flVehicleLeanVel; 28 | float m_flVehicleLeanPos; 29 | Vec3 m_vecSmoothedUp; 30 | }; 31 | 32 | #define MAXSTUDIOPOSEPARAM 24 -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/EntityCache/EntityCache.cpp: -------------------------------------------------------------------------------- 1 | #include "EntityCache.h" 2 | 3 | void C_EntityCache::Fill() 4 | { 5 | C_BaseEntity *_pLocal = gInts.EntityList->GetClientEntity(gInts.Engine->GetLocalPlayer()); 6 | 7 | if (_pLocal && _pLocal->IsInValidTeam()) 8 | { 9 | pLocal = _pLocal; 10 | pLocalWeapon = pLocal->GetActiveWeapon(); 11 | 12 | for (int n = 1; n < gInts.EntityList->GetHighestEntityIndex(); n++) 13 | { 14 | C_BaseEntity *pEntity = gInts.EntityList->GetClientEntity(n); 15 | 16 | if (!pEntity || pEntity->IsDormant()) 17 | continue; 18 | 19 | switch (pEntity->GetClassId()) 20 | { 21 | case CCSPlayer: 22 | { 23 | Groups[GroupType_t::PLAYERS_ALL].push_back(pEntity); 24 | Groups[pEntity->GetTeamNum() != pLocal->GetTeamNum() ? GroupType_t::PLAYERS_ENEMIES : GroupType_t::PLAYERS_TEAMMATES].push_back(pEntity); 25 | break; 26 | } 27 | 28 | default: break; 29 | } 30 | } 31 | } 32 | } 33 | 34 | void C_EntityCache::Clear() 35 | { 36 | pLocal = nullptr; 37 | pLocalWeapon = nullptr; 38 | 39 | for (auto &group : Groups) 40 | group.second.clear(); 41 | } 42 | 43 | const std::vector &C_EntityCache::GetGroup(const GroupType_t &group) 44 | { 45 | return Groups[group]; 46 | } 47 | 48 | C_EntityCache gEntCache; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamOfflineStatus.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMOFFLINESTATUS_H 18 | #define TSTEAMOFFLINESTATUS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamOfflineStatus 24 | { 25 | int eOfflineNow; 26 | int eOfflineNextSession; 27 | } TSteamOfflineStatus; 28 | 29 | #endif // TSTEAMOFFLINESTATUS_H 30 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamBufferMethod.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMBUFFERMETHOD_H 18 | #define ESTEAMBUFFERMETHOD_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamBufferMethod 24 | { 25 | eSteamBufferMethodFBF = 0, 26 | eSteamBufferMethodNBF = 1 27 | } ESteamBufferMethod; 28 | 29 | #endif // ESTEAMBUFFERMETHOD_H 30 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/BridgeCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef BRIDGECOMMON_H 18 | #define BRIDGECOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define STEAM2BRIDGE_INTERFACE_VERSION_001 "STEAM2BRIDGE_INTERFACE_VERSION001" 24 | #define STEAM2BRIDGE_INTERFACE_VERSION_002 "STEAM2BRIDGE_INTERFACE_VERSION002" 25 | 26 | #endif // BRIDGECOMMON_H 27 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/SteamAPI.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef STEAMAPI_H 18 | #define STEAMAPI_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // includes 24 | #include "SteamTypes.h" 25 | 26 | // extern function declarations 27 | #include "Steam.h" 28 | 29 | // inline interface utils 30 | #include "Interface_OSW.h" 31 | 32 | #endif // STEAMAPI_H 33 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamUpdateStats.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMUPDATESTATS_H 18 | #define TSTEAMUPDATESTATS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamUpdateStats 24 | { 25 | SteamUnsigned64_t uBytesTotal; 26 | SteamUnsigned64_t uBytesPresent; 27 | } TSteamUpdateStats; 28 | 29 | #endif // TSTEAMUPDATESTATS_H 30 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamSeekMethod.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMSEEKMETHOD_H 18 | #define ESTEAMSEEKMETHOD_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamSeekMethod 24 | { 25 | eSteamSeekMethodSet = 0, 26 | eSteamSeekMethodCur = 1, 27 | eSteamSeekMethodEnd = 2 28 | } ESteamSeekMethod; 29 | 30 | #endif // ESTEAMSEEKMETHOD_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/SteamclientAPI.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef STEAMCLIENTAPI_H 18 | #define STEAMCLIENTAPI_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // includes 24 | #include "SteamTypes.h" 25 | 26 | // extern function declarations 27 | #include "Steamclient.h" 28 | 29 | // inline interface utils 30 | #include "Interface_OSW.h" 31 | 32 | #endif // STEAMCLIENTAPI_H 33 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamAppVersion.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMAPPVERSION_H 18 | #define TSTEAMAPPVERSION_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamAppVersion 24 | { 25 | char *szLabel; 26 | unsigned int uMaxLabelChars; 27 | unsigned int uVersionId; 28 | int bIsNotAvailable; 29 | } TSteamAppVersion; 30 | 31 | #endif // TSTEAMAPPVERSION_H 32 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamAppDependencyInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMAPPDEPENDENCYINFO_H 18 | #define TSTEAMAPPDEPENDENCYINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamAppDependencyInfo 24 | { 25 | unsigned int AppId; 26 | unsigned int IsRequired; 27 | char szMountName[STEAM_MAX_PATH]; 28 | } TSteamAppDependencyInfo; 29 | 30 | #endif // TSTEAMAPPDEPENDENCYINFO_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/Steamworks.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef STEAMWORKS_H 18 | #define STEAMWORKS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | 25 | #ifndef NO_STEAM 26 | // steam.dll 27 | #include "SteamAPI.h" 28 | #endif 29 | 30 | #ifndef NO_STEAMCLIENT 31 | // steamclient.dll / steam_api.dll 32 | #include "SteamclientAPI.h" 33 | #endif 34 | 35 | #endif // STEAMWORKS_H 36 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamSubscriptionStats.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMSUBSCRIPTIONSTATS_H 18 | #define TSTEAMSUBSCRIPTIONSTATS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamSubscriptionStats 24 | { 25 | unsigned int uNumSubscriptions; 26 | unsigned int uMaxNameChars; 27 | unsigned int uMaxApps; 28 | } TSteamSubscriptionStats; 29 | 30 | #endif // TSTEAMSUBSCRIPTIONSTATS_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamDiscountQualifier.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMDISCOUNTQUALIFIER_H 18 | #define TSTEAMDISCOUNTQUALIFIER_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamDiscountQualifier 24 | { 25 | char szName[STEAM_MAX_PATH]; 26 | unsigned int uRequiredSubscription; 27 | int bIsDisqualifier; 28 | } TSteamDiscountQualifier; 29 | 30 | #endif // TSTEAMDISCOUNTQUALIFIER_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamPaymentCardType.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMPAYMENTCARDTYPE_H 18 | #define ESTEAMPAYMENTCARDTYPE_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamPaymentCardType 24 | { 25 | eVisa = 1, 26 | eMaster = 2, 27 | eAmericanExpress = 3, 28 | eDiscover = 4, 29 | eDinnersClub = 5, 30 | eJCB = 6, 31 | } ESteamPaymentCardType; 32 | 33 | #endif // ESTEAMPAYMENTCARDTYPE_H 34 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamPrepurchaseReceiptInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMPREPURCHASERECEIPTINFO_H 18 | #define TSTEAMPREPURCHASERECEIPTINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamPrepurchaseReceiptInfo 24 | { 25 | char szTypeOfProofOfPurchase[STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE + 1]; 26 | } TSteamPrepurchaseReceiptInfo; 27 | 28 | #endif // TSTEAMPREPURCHASERECEIPTINFO_H 29 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamSubscriptionDiscount.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMSUBSCRIPTIONDISCOUNT_H 18 | #define TSTEAMSUBSCRIPTIONDISCOUNT_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamSubscriptionDiscount 24 | { 25 | char szName[STEAM_MAX_PATH]; 26 | unsigned int uDiscountInCents; 27 | unsigned int uNumQualifiers; 28 | } TSteamSubscriptionDiscount; 29 | 30 | #endif // TSTEAMSUBSCRIPTIONDISCOUNT_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/MusicCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef MUSICCOMMON_H 18 | #define MUSICCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | enum AudioPlayback_Status 24 | { 25 | AudioPlayback_Undefined = 0, 26 | AudioPlayback_Playing = 1, 27 | AudioPlayback_Paused = 2, 28 | AudioPlayback_Idle = 3 29 | }; 30 | 31 | #define STEAMMUSIC_INTERFACE_VERSION_001 "STEAMMUSIC_INTERFACE_VERSION001" 32 | 33 | #endif // MUSICCOMMON_H 34 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamExternalBillingInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMEXTERNALBILLINGINFO_H 18 | #define TSTEAMEXTERNALBILLINGINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamExternalBillingInfo 24 | { 25 | char szAccountName[STEAM_EXTERNAL_ACCOUNTNAME_SIZE + 1]; 26 | char szPassword[STEAM_EXTERNAL_ACCOUNTPASSWORD_SIZE + 1]; 27 | } TSteamExternalBillingInfo; 28 | 29 | #endif // TSTEAMEXTERNALBILLINGINFO_H 30 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamProgress.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMPROGRESS_H 18 | #define TSTEAMPROGRESS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamProgress 24 | { 25 | int bValid; // non-zero if call provides progress info 26 | unsigned int uPercentDone; // 0 to 100 if bValid 27 | char szProgress[STEAM_MAX_PATH]; // additional progress info 28 | } TSteamProgress; 29 | 30 | #endif // TSTEAMPROGRESS_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/FriendGameInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef FRIENDGAMEINFO_H 18 | #define FRIENDGAMEINFO_H 19 | #ifndef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #pragma pack( push, 8 ) 24 | 25 | // friend game played information 26 | struct FriendGameInfo_t 27 | { 28 | CGameID m_gameID; 29 | uint32 m_unGameIP; 30 | uint16 m_usGamePort; 31 | uint16 m_usQueryPort; 32 | CSteamID m_steamIDLobby; 33 | }; 34 | 35 | #pragma pack( pop ) 36 | 37 | #endif // FRIENDGAMEINFO_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/SDK.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Main/BaseEntity/BaseEntity.h" 4 | #include "Main/BaseCombatWeapon/BaseCombatWeapon.h" 5 | #include "Main/BaseObject/BaseObject.h" 6 | 7 | #include "Main/DrawUtils/DrawUtils.h" 8 | #include "Main/EntityCache/EntityCache.h" 9 | #include "Main/VisCheck/VisCheck.h" 10 | #include "Main/GlobalInfo/GlobalInfo.h" 11 | #include "Main/ConVars/ConVars.h" 12 | 13 | #pragma warning( disable : 4996 ) 14 | 15 | #define TIME_TO_TICKS( dt ) ( (int)( 0.5f + (float)(dt) / gInts.GlobalVars->interval_per_tick ) ) 16 | #define TICKS_TO_TIME( t ) ( gInts.GlobalVars->interval_per_tick * ( t ) ) 17 | #define TICK_INTERVAL ( gInts.GlobalVars->interval_per_tick ) 18 | 19 | namespace Util 20 | { 21 | inline void TraceHull(const Vec3& vecStart, const Vec3& vecEnd, const Vec3& vecHullMin, const Vec3& vecHullMax, 22 | unsigned int nMask, C_TraceFilter* pFilter, C_GameTrace* pTrace) 23 | { 24 | Ray_t ray; 25 | ray.Init(vecStart, vecEnd, vecHullMin, vecHullMax); 26 | gInts.EngineTrace->TraceRay(ray, nMask, pFilter, pTrace); 27 | } 28 | 29 | inline void InitDebug() { 30 | #ifdef _DEBUG 31 | AllocConsole(); 32 | freopen("CONOUT$", "w", stdout); 33 | #endif 34 | } 35 | 36 | inline void ReleaseDebug() { 37 | #ifdef _DEBUG 38 | FreeConsole(); 39 | system("exit"); 40 | #endif 41 | } 42 | 43 | inline void PrintDebug(const char* szString) { 44 | #ifdef _DEBUG 45 | printf(szString); 46 | #endif 47 | } 48 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamStreamLauncher001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMSTREAMLAUNCHER001_H 18 | #define ISTEAMSTREAMLAUNCHER001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "StreamLauncherCommon.h" 25 | 26 | abstract_class ISteamStreamLauncher001 27 | { 28 | public: 29 | virtual EStreamLauncherResult StartStreaming(const char *cszFilePath) = 0; 30 | virtual void StopStreaming() = 0; 31 | }; 32 | 33 | #endif // ISTEAMSTREAMLAUNCHER001_H 34 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientStreamLauncher.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTSTREAMLAUNCHER_H 18 | #define ICLIENTSTREAMLAUNCHER_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "StreamLauncherCommon.h" 25 | 26 | abstract_class UNSAFE_INTERFACE IClientStreamLauncher 27 | { 28 | public: 29 | virtual EStreamLauncherResult StartStreaming(const char *cszFilePath) = 0; 30 | virtual void StopStreaming() = 0; 31 | }; 32 | 33 | #endif // ICLIENTSTREAMLAUNCHER_H 34 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamServerType.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMSERVERTYPE_H 18 | #define ESTEAMSERVERTYPE_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamServerType 24 | { 25 | eSteamValveCDKeyValidationServer = 0, 26 | eSteamHalfLifeMasterServer = 1, 27 | eSteamFriendsServer = 2, 28 | eSteamCSERServer = 3, 29 | eSteamHalfLife2MasterServer = 4, 30 | eSteamRDKFMasterServer = 5, 31 | eMaxServerTypes = 6, 32 | } ESteamServerType; 33 | 34 | #endif // ESTEAMSERVERTYPE_H 35 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamAppUpdateStatsQueryType.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMAPPUPDATESTATSQUERYTYPE_H 18 | #define ESTEAMAPPUPDATESTATSQUERYTYPE_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamAppUpdateStatsQueryType 24 | { 25 | ePhysicalBytesReceivedThisSession = 1, 26 | eAppReadyToLaunchStatus = 2, 27 | eAppPreloadStatus = 3, 28 | eAppEntireDepot = 4, 29 | eCacheBytesPresent = 5, 30 | } ESteamAppUpdateStatsQueryType; 31 | 32 | #endif // ESTEAMAPPUPDATESTATSQUERYTYPE_H 33 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/MasterServerUpdaterCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef MASTERSERVERUPDATERCOMMON_H 18 | #define MASTERSERVERUPDATERCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define CLIENTMASTERSERVERUPDATER_INTERFACE_VERSION "CLIENTMASTERSERVERUPDATER_INTERFACE_VERSION001" 24 | 25 | #define STEAMMASTERSERVERUPDATER_INTERFACE_VERSION_001 "SteamMasterServerUpdater001" 26 | 27 | #define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1) 28 | 29 | #endif // MASTERSERVERUPDATERCOMMON_H 30 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/GameEvent/GameEvent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class C_GameEvent 4 | { 5 | public: 6 | virtual ~C_GameEvent() { }; 7 | virtual const char* GetName() const = 0; 8 | 9 | virtual bool IsReliable() const = 0; 10 | virtual bool IsLocal() const = 0; 11 | virtual bool IsEmpty(const char* szKey = 0) = 0; 12 | 13 | virtual bool GetBool(const char* szKey = 0, bool bDefault = false) = 0; 14 | virtual int GetInt(const char* szKey = 0, int nDefault = 0) = 0; 15 | virtual float GetFloat(const char* szKey = 0, float flDefault = 0.0f) = 0; 16 | virtual const char* GetString(const char* szKey = 0, const char* szDefault = "") = 0; 17 | 18 | virtual void SetBool(const char* szKey, bool bNew) = 0; 19 | virtual void SetInt(const char* szKey, int nNew) = 0; 20 | virtual void SetFloat(const char* szKey, float flNew) = 0; 21 | virtual void SetString(const char* szKey, const char* szNew) = 0; 22 | }; 23 | 24 | class C_GameEventListener 25 | { 26 | public: 27 | virtual ~C_GameEventListener(void) {}; 28 | 29 | virtual void FireGameEvent(C_GameEvent* pEvent) = 0; 30 | }; 31 | 32 | class C_GameEventManager 33 | { 34 | public: 35 | bool AddListener(C_GameEventListener* pListener, const char* szName, bool ServerSide) { 36 | typedef bool(__thiscall* FN)(PVOID, C_GameEventListener*, const char*, bool); 37 | return GetVFunc(this, 3)(this, pListener, szName, ServerSide); 38 | } 39 | }; 40 | 41 | #define GAMEEVENTSMANAGER_ENGINE_INTERFACE "GAMEEVENTSMANAGER002" -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/UnifiedMessagesCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef UNIFIEDMESSAGESCOMMON_H 18 | #define UNIFIEDMESSAGESCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // versions 24 | #define CLIENTUNIFIEDMESSAGES_INTERFACE_VERSION "CLIENTUNIFIEDMESSAGES_INTERFACE_VERSION001" 25 | #define STEAMUNIFIEDMESSAGES_INTERFACE_VERSION_001 "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001" 26 | 27 | // callbacks 28 | #pragma pack( push, 8 ) 29 | 30 | #pragma pack( pop ) 31 | 32 | #endif // UNIFIEDMESSAGESCOMMON_H 33 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamFindFilter.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMFINDFILTER_H 18 | #define ESTEAMFINDFILTER_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamFindFilter /* Filter elements returned by SteamFind{First,Next} */ 24 | { 25 | eSteamFindLocalOnly, /* limit search to local filesystem */ 26 | eSteamFindRemoteOnly, /* limit search to remote repository */ 27 | eSteamFindAll /* do not limit search (duplicates allowed) */ 28 | } ESteamFindFilter; 29 | 30 | #endif // ESTEAMFINDFILTER_H 31 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamAppLaunchOption.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMAPPLAUNCHOPTION_H 18 | #define TSTEAMAPPLAUNCHOPTION_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamAppLaunchOption 24 | { 25 | char *szDesc; 26 | unsigned int uMaxDescChars; 27 | char *szCmdLine; 28 | unsigned int uMaxCmdLineChars; 29 | unsigned int uIndex; 30 | unsigned int uIconIndex; 31 | int bNoDesktopShortcut; 32 | int bNoStartMenuShortcut; 33 | int bIsLongRunningUnattended; 34 | } TSteamAppLaunchOption; 35 | 36 | #endif // TSTEAMAPPLAUNCHOPTION_H 37 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamOAuth001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMOAUTH001_H 18 | #define ISTEAMOAUTH001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "OAuthCommon.h" 25 | 26 | abstract_class OBSOLETE_INTERFACE ISteamOAuth001 27 | { 28 | public: 29 | virtual SteamAPICall_t RequestOAuthTokenForApp(const char *cszOAuthScope) = 0; 30 | virtual bool GetOAuthTokenForApp(void *pubBuffer, int32 cubBuffer, uint32 *puTokenSize) = 0; 31 | virtual void InvalidateOAuthTokenForApp() = 0; 32 | }; 33 | 34 | #endif // ISTEAMOAUTH001_H 35 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/ClientModeHook/ClientModeHook.cpp: -------------------------------------------------------------------------------- 1 | #include "ClientModeHook.h" 2 | 3 | #include "../../Features/Aimbot/Aimbot.h" 4 | #include "../../Features/Prediction/Prediction.h" 5 | #include "../../Features/Movement/Movement.h" 6 | 7 | void __stdcall ClientModeHook::OverrideView::Hook(C_ViewSetup *pView) 8 | { 9 | Table.Original(index)(gInts.ClientMode, pView); 10 | 11 | pView->fov = 120.0f; 12 | } 13 | 14 | bool __stdcall ClientModeHook::ShouldDrawViewModel::Hook() 15 | { 16 | return Table.Original(index)(gInts.ClientMode); 17 | 18 | //... 19 | } 20 | 21 | bool __stdcall ClientModeHook::CreateMove::Hook(float input_sample_frametime, C_UserCmd* pCmd) 22 | { 23 | if (!pCmd || !pCmd->command_number) 24 | return false; 25 | 26 | uintptr_t _bp; __asm mov _bp, ebp; 27 | bool* pSendPacket = (bool*)(***(uintptr_t***)_bp - 0x1); 28 | 29 | //"Cache" this ticks weaponinfo 30 | { 31 | auto pLocal = gEntCache.pLocal; 32 | auto pLocalWeapon = gEntCache.pLocalWeapon; 33 | 34 | if (pLocal && pLocalWeapon) 35 | { 36 | gGlobalInfo.bWeaponCanShoot = pLocalWeapon->CanShoot(pLocal); 37 | } 38 | } 39 | 40 | Vec3 vOldAngles = pCmd->viewangles; 41 | float flOldSideMove = pCmd->sidemove; 42 | float flOldForwardMove = pCmd->forwardmove; 43 | 44 | gMovement.DoBunnyhop(pCmd); 45 | 46 | //gPrediction.Start(pCmd); 47 | { 48 | // ... 49 | } 50 | //gPrediction.End(pCmd); 51 | 52 | return Table.Original(index)(gInts.ClientMode, input_sample_frametime, pCmd); 53 | } 54 | 55 | VMT::Table ClientModeHook::Table; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/EVoiceResult.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef EVOICERESULT_H 18 | #define EVOICERESULT_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // Error codes for use with the voice functions 24 | typedef enum EVoiceResult 25 | { 26 | k_EVoiceResultOK = 0, 27 | k_EVoiceResultNotInitialized = 1, 28 | k_EVoiceResultNotRecording = 2, 29 | k_EVoiceResultNoData = 3, 30 | k_EVoiceResultBufferTooSmall = 4, 31 | k_EVoiceResultDataCorrupted = 5, 32 | k_EVoiceResultRestricted = 6, 33 | k_EVoiceResultUnsupportedCodec = 7, 34 | } EVoiceResult; 35 | 36 | #endif // EVOICERESULT_H 37 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamContentServer001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMCONTENTSERVER001_H 18 | #define ISTEAMCONTENTSERVER001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "ContentServerCommon.h" 25 | 26 | abstract_class ISteamContentServer001 27 | { 28 | public: 29 | virtual bool LogOn(uint32 uContentServerID) = 0; 30 | virtual bool LogOff() = 0; 31 | 32 | virtual bool BLoggedOn() = 0; 33 | 34 | virtual void SendClientContentAuthRequest(CSteamID steamID, uint32 unContentID) = 0; 35 | }; 36 | 37 | #endif // ISTEAMCONTENTSERVER001_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/StreamLauncherCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef STREAMLAUNCHERCOMMON_H 18 | #define STREAMLAUNCHERCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // versions 24 | #define CLIENTSTREAMLAUNCHER_INTERFACE_VERSION "CLIENTSTREAMLAUNCHER_INTERFACE_VERSION001" 25 | #define STEAMSTREAMLAUNCHER_INTERFACE_VERSION_001 "STEAMSTREAMLAUNCHER_INTERFACE_VERSION001" 26 | 27 | enum EStreamLauncherResult 28 | { 29 | // TODO: Reverse this enum 30 | }; 31 | 32 | // callbacks 33 | #pragma pack( push, 8 ) 34 | 35 | #pragma pack( pop ) 36 | 37 | #endif // STREAMLAUNCHERCOMMON_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/NetVars/NetVars.cpp: -------------------------------------------------------------------------------- 1 | #include "NetVars.h" 2 | 3 | #undef GetProp 4 | 5 | void C_NetVars::Init() 6 | { 7 | const auto *client_class = gInts.Client->GetAllClasses(); 8 | 9 | while (client_class != nullptr) 10 | { 11 | const auto class_info = std::make_shared(0); 12 | RecvTable *recv_table = reinterpret_cast(client_class->pRecvTable); 13 | populate_nodes(recv_table, &class_info->nodes); 14 | nodes.emplace(recv_table->GetName(), class_info); 15 | 16 | client_class = client_class->pNextClass; 17 | } 18 | } 19 | 20 | void C_NetVars::populate_nodes(RecvTable *recv_table, map_type *map) 21 | { 22 | for (auto i = 0; i < recv_table->GetNumProps(); i++) 23 | { 24 | const auto *prop = recv_table->GetPropW(i); 25 | const auto prop_info = std::make_shared(prop->GetOffset()); 26 | 27 | if (prop->GetType() == DPT_DataTable) 28 | populate_nodes(prop->GetDataTable(), &prop_info->nodes); 29 | 30 | map->emplace(prop->GetName(), prop_info); 31 | } 32 | } 33 | 34 | void C_NetVars::DumpClassID() 35 | { 36 | #ifdef _DEBUG 37 | printf("-========================-[CLASS ID'S]-========================-\nenum EClientClass\n{\n"); 38 | 39 | auto pClientClass = gInts.Client->GetAllClasses(); 40 | 41 | while (pClientClass != nullptr) 42 | { 43 | printf("\t%s = %i, \n", pClientClass->szNetworkName, pClientClass->iClassID); 44 | pClientClass = pClientClass->pNextClass; 45 | } 46 | 47 | printf("};\n-========================-[ END ]-========================-\n"); 48 | #endif 49 | } 50 | 51 | C_NetVars gNetVars; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamError.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMERROR_H 18 | #define TSTEAMERROR_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum EDetailedPlatformErrorType 24 | { 25 | eNoDetailedErrorAvailable, 26 | eStandardCerrno, 27 | eWin32LastError, 28 | eWinSockLastError, 29 | eDetailedPlatformErrorCount 30 | } EDetailedPlatformErrorType; 31 | 32 | typedef struct TSteamError 33 | { 34 | ESteamError eSteamError; 35 | EDetailedPlatformErrorType eDetailedErrorType; 36 | int nDetailedErrorCode; 37 | char szDesc[STEAM_MAX_PATH]; 38 | } TSteamError; 39 | 40 | #endif // TSTEAMERROR_H 41 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamSubscriptionBillingInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMSUBSCRIPTIONBILLINGINFO_H 18 | #define TSTEAMSUBSCRIPTIONBILLINGINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamSubscriptionBillingInfo 24 | { 25 | ESteamSubscriptionBillingInfoType eBillingInfoType; 26 | union 27 | { 28 | TSteamPaymentCardInfo PaymentCardInfo; 29 | TSteamPrepurchaseInfo PrepurchaseInfo; 30 | TSteamExternalBillingInfo ExternalBillingInfo; 31 | char bUseAccountBillingInfo; 32 | }; 33 | } TSteamSubscriptionBillingInfo; 34 | 35 | #endif // TSTEAMSUBSCRIPTIONBILLINGINFO_H 36 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamSubscriptionBillingInfoType.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMSUBSCRIPTIONBILLINGINFOTYPE_H 18 | #define ESTEAMSUBSCRIPTIONBILLINGINFOTYPE_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamSubscriptionBillingInfoType 24 | { 25 | ePaymentCardInfo = 1, 26 | ePrepurchasedInfo = 2, 27 | eAccountBillingInfo = 3, 28 | eExternalBillingInfo = 4, // indirect billing via ISP etc (not supported yet) 29 | ePaymentCardReceipt = 5, 30 | ePrepurchaseReceipt = 6, 31 | eEmptyReceipt = 7, 32 | } ESteamSubscriptionBillingInfoType; 33 | 34 | #endif // ESTEAMSUBSCRIPTIONBILLINGINFOTYPE_H 35 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseEntity/AnimState/BaseAnimatingOverlay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Activity.h" 3 | 4 | #define ANIM_LAYER_ACTIVE 0x0001 5 | #define ANIM_LAYER_AUTOKILL 0x0002 6 | #define ANIM_LAYER_KILLME 0x0004 7 | #define ANIM_LAYER_DONTRESTORE 0x0008 8 | #define ANIM_LAYER_CHECKACCESS 0x0010 9 | #define ANIM_LAYER_DYING 0x0020 10 | 11 | class C_BaseAnimatingOverlay; 12 | 13 | class CAnimationLayer 14 | { 15 | public: 16 | int m_fFlags; 17 | bool m_bSequenceFinished; 18 | bool m_bLooping; 19 | int m_nSequence; 20 | float m_flCycle; 21 | float m_flPrevCycle; 22 | float m_flWeight; 23 | float m_flPlaybackRate; 24 | float m_flBlendIn; 25 | float m_flBlendOut; 26 | float m_flKillRate; 27 | float m_flKillDelay; 28 | float m_flLayerAnimtime; 29 | float m_flLayerFadeOuttime; 30 | 31 | Activity m_nActivity; 32 | 33 | int m_nPriority; 34 | int m_nOrder; 35 | 36 | bool IsActive() { return ((m_fFlags & ANIM_LAYER_ACTIVE) != 0); } 37 | bool IsAutokill() { return ((m_fFlags & ANIM_LAYER_AUTOKILL) != 0); } 38 | bool IsKillMe() { return ((m_fFlags & ANIM_LAYER_KILLME) != 0); } 39 | bool IsAutoramp() { return (m_flBlendIn != 0.0 || m_flBlendOut != 0.0); } 40 | void KillMe() { m_fFlags |= ANIM_LAYER_KILLME; } 41 | void Dying() { m_fFlags |= ANIM_LAYER_DYING; } 42 | bool IsDying() { return ((m_fFlags & ANIM_LAYER_DYING) != 0); } 43 | void Dead() { m_fFlags &= ~ANIM_LAYER_DYING; } 44 | 45 | float m_flLastEventCheck; 46 | float m_flLastAccess; 47 | 48 | // Network state changes get forwarded here. 49 | C_BaseAnimatingOverlay *m_pOwnerEntity; 50 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamAppStats.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMAPPSTATS_H 18 | #define TSTEAMAPPSTATS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamAppStats 24 | { 25 | unsigned int uNumApps; 26 | unsigned int uMaxNameChars; 27 | unsigned int uMaxInstallDirNameChars; 28 | unsigned int uMaxVersionLabelChars; 29 | unsigned int uMaxLaunchOptions; 30 | unsigned int uMaxLaunchOptionDescChars; 31 | unsigned int uMaxLaunchOptionCmdLineChars; 32 | unsigned int uMaxNumIcons; 33 | unsigned int uMaxIconSize; 34 | unsigned int uMaxDependencies; 35 | } TSteamAppStats; 36 | 37 | #endif // TSTEAMAPPSTATS_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Hooks/WndProcHook/WndProcHook.cpp: -------------------------------------------------------------------------------- 1 | #include "WndProcHook.h" 2 | 3 | #include "../../Features/Menu/Input/Input.h" 4 | #include "../../Features/Menu/Menu.h" 5 | 6 | LONG __stdcall WndProcHook::Hook(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 7 | { 8 | switch (uMsg) 9 | { 10 | case WM_KEYDOWN: { 11 | gInput.m_Keyboard[wParam] = EKeyState::PRESSED; 12 | break; 13 | } 14 | 15 | case WM_KEYUP: { 16 | gInput.m_Keyboard[wParam] = EKeyState::NONE; 17 | break; 18 | } 19 | 20 | case WM_RBUTTONDOWN: 21 | { 22 | if (wParam & MK_RBUTTON) 23 | gInput.m_RMouse = EKeyState::PRESSED; 24 | 25 | break; 26 | } 27 | 28 | case WM_LBUTTONDOWN: 29 | { 30 | if (wParam & MK_LBUTTON) 31 | gInput.m_LMouse = EKeyState::PRESSED; 32 | 33 | break; 34 | } 35 | 36 | case WM_MBUTTONDOWN: 37 | { 38 | if (wParam & MK_MBUTTON) 39 | gInput.m_MMouse = EKeyState::PRESSED; 40 | 41 | break; 42 | } 43 | 44 | case WM_RBUTTONUP: 45 | { 46 | gInput.m_RMouse = EKeyState::NONE; 47 | break; 48 | } 49 | 50 | case WM_LBUTTONUP: 51 | { 52 | gInput.m_LMouse = EKeyState::NONE; 53 | break; 54 | } 55 | 56 | case WM_MBUTTONUP: 57 | { 58 | gInput.m_MMouse = EKeyState::NONE; 59 | break; 60 | } 61 | 62 | case WM_MOUSEWHEEL: { 63 | gInput.m_Wheel = ((int)wParam < 0 ? EScrollWheelState::UP : EScrollWheelState::DOWN); 64 | break; 65 | } 66 | } 67 | 68 | if (gMenu.m_Open && (gInts.Engine->Con_IsVisible() || gInts.EngineVGui->IsGameUIVisible())) 69 | return 1; 70 | 71 | return CallWindowProc(WndProc, hWnd, uMsg, wParam, lParam); 72 | } 73 | 74 | WNDPROC WndProcHook::WndProc; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamGlobalUserID.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMGLOBALUSERID_H 18 | #define TSTEAMGLOBALUSERID_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // Applications need to be able to authenticate Steam users from ANY instance. 24 | // So a SteamIDTicket contains SteamGlobalUserID, which is a unique combination of 25 | // instance and user id. 26 | typedef struct TSteamGlobalUserID 27 | { 28 | SteamInstanceID_t m_SteamInstanceID; 29 | 30 | union m_SteamLocalUserID 31 | { 32 | SteamLocalUserID_t As64bits; 33 | TSteamSplitLocalUserID Split; 34 | } m_SteamLocalUserID; 35 | } TSteamGlobalUserID; 36 | 37 | #endif // TSTEAMGLOBALUSERID_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientGameCoordinator.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTGAMECOORDINATOR_H 18 | #define ICLIENTGAMECOORDINATOR_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "GameCoordinatorCommon.h" 25 | 26 | abstract_class IClientGameCoordinator 27 | { 28 | public: 29 | virtual EGCResults SendMessage(AppId_t unAppID, uint32 unMsgType, const void *pubData, uint32 cubData) = 0; 30 | 31 | virtual bool IsMessageAvailable(AppId_t unAppID, uint32 *pcubMsgSize) = 0; 32 | 33 | virtual EGCResults RetrieveMessage(AppId_t unAppID, uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize) = 0; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamSubscriptionReceipt.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMSUBSCRIPTIONRECEIPT_H 18 | #define TSTEAMSUBSCRIPTIONRECEIPT_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamSubscriptionReceipt 24 | { 25 | ESteamSubscriptionStatus eStatus; 26 | ESteamSubscriptionStatus ePreviousStatus; 27 | ESteamSubscriptionBillingInfoType eReceiptInfoType; 28 | 29 | char szConfirmationCode[STEAM_CONFIRMATION_CODE_SIZE + 1]; 30 | 31 | union 32 | { 33 | TSteamPaymentCardReceiptInfo PaymentCardReceiptInfo; 34 | TSteamPrepurchaseReceiptInfo PrepurchaseReceiptInfo; 35 | }; 36 | } TSteamSubscriptionReceipt; 37 | 38 | #endif // TSTEAMSUBSCRIPTIONRECEIPT_H 39 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamPrepurchaseInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMPREPURCHASEINFO_H 18 | #define TSTEAMPREPURCHASEINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamPrepurchaseInfo 24 | { 25 | char szTypeOfProofOfPurchase[STEAM_TYPE_OF_PROOF_OF_PURCHASE_SIZE + 1]; 26 | 27 | // A ProofOfPurchase token is not necessarily a nul-terminated string; it may be binary data 28 | // (perhaps encrypted). Hence we need a length and an array of bytes. 29 | unsigned int uLengthOfBinaryProofOfPurchaseToken; 30 | char cBinaryProofOfPurchaseToken[STEAM_PROOF_OF_PURCHASE_TOKEN_SIZE + 1]; 31 | } TSteamPrepurchaseInfo; 32 | 33 | #endif // TSTEAMPREPURCHASEINFO_H 34 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/Win32Library.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #pragma once 18 | 19 | class DynamicLibrary 20 | { 21 | public: 22 | DynamicLibrary(const char* cszPath) 23 | { 24 | m_handle = LoadLibraryA(cszPath); 25 | } 26 | 27 | ~DynamicLibrary() 28 | { 29 | if(m_handle) 30 | FreeLibrary(m_handle); 31 | } 32 | 33 | void * GetSymbol(const char* cszSymbol) const 34 | { 35 | if(!m_handle) 36 | return NULL; 37 | 38 | return (void *)GetProcAddress(m_handle, cszSymbol); 39 | } 40 | 41 | bool IsLoaded() const 42 | { 43 | return m_handle != NULL; 44 | } 45 | 46 | private: 47 | HMODULE m_handle; 48 | 49 | DynamicLibrary(const DynamicLibrary&); 50 | void operator=(const DynamicLibrary&); 51 | }; 52 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/POSIXLibrary.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #pragma once 18 | #include 19 | 20 | class DynamicLibrary 21 | { 22 | public: 23 | DynamicLibrary(const char* cszPath) 24 | { 25 | m_handle = dlopen(cszPath, RTLD_LAZY); 26 | } 27 | 28 | ~DynamicLibrary() 29 | { 30 | if(m_handle) 31 | dlclose(m_handle); 32 | } 33 | 34 | void * GetSymbol(const char* cszSymbol) const 35 | { 36 | if(!m_handle) 37 | return NULL; 38 | 39 | return dlsym(m_handle, cszSymbol); 40 | } 41 | 42 | bool IsLoaded() const 43 | { 44 | return m_handle != NULL; 45 | } 46 | 47 | private: 48 | void *m_handle; 49 | 50 | DynamicLibrary(const DynamicLibrary&); 51 | void operator=(const DynamicLibrary&); 52 | }; 53 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamMusic001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMMUSIC001_H 18 | #define ISTEAMMUSIC001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "MusicCommon.h" 25 | 26 | abstract_class ISteamMusic001 27 | { 28 | public: 29 | virtual bool BIsEnabled() = 0; 30 | virtual bool BIsPlaying() = 0; 31 | 32 | virtual AudioPlayback_Status GetPlaybackStatus() = 0; 33 | 34 | virtual void Play() = 0; 35 | virtual void Pause() = 0; 36 | virtual void PlayPrevious() = 0; 37 | virtual void PlayNext() = 0; 38 | 39 | // volume is between 0.0 and 1.0 40 | virtual void SetVolume(float flVolume) = 0; 41 | virtual float GetVolume() = 0; 42 | }; 43 | 44 | #endif // ISTEAMMUSIC001_H 45 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamUnifiedMessages001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMUNIFIEDMESSAGES001_H 18 | #define ISTEAMUNIFIEDMESSAGES001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "UnifiedMessagesCommon.h" 25 | 26 | abstract_class ISteamUnifiedMessages001 27 | { 28 | public: 29 | virtual uint64 SendMethod(const char *, const void *, uint32, uint64) = 0; 30 | virtual bool GetMethodResponseInfo(uint64, uint32 *, EResult *) = 0; 31 | virtual bool GetMethodResponseData(uint64, void *, uint32, bool) = 0; 32 | virtual bool ReleaseMethod(uint64) = 0; 33 | virtual bool SendNotification(const char *, const void *, uint32) = 0; 34 | }; 35 | 36 | #endif // ISTEAMUNIFIEDMESSAGES001_H 37 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientUnifiedMessages.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTUNIFIEDMESSAGES_H 18 | #define ICLIENTUNIFIEDMESSAGES_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "UnifiedMessagesCommon.h" 25 | 26 | abstract_class UNSAFE_INTERFACE IClientUnifiedMessages 27 | { 28 | public: 29 | virtual uint64 SendMethod(const char *, const void *, uint32, uint64) = 0; 30 | virtual bool GetMethodResponseInfo(uint64, uint32 *, EResult *) = 0; 31 | virtual bool GetMethodResponseData(uint64, void *, uint32, bool) = 0; 32 | virtual bool ReleaseMethod(uint64) = 0; 33 | virtual bool SendNotification(const char *, const void *, uint32) = 0; 34 | }; 35 | 36 | #endif // ICLIENTUNIFIEDMESSAGES_H 37 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamContentServer002.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMCONTENTSERVER002_H 18 | #define ISTEAMCONTENTSERVER002_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "ContentServerCommon.h" 25 | 26 | abstract_class ISteamContentServer002 27 | { 28 | public: 29 | virtual bool LogOn(uint32 uContentServerID) = 0; 30 | virtual bool LogOff() = 0; 31 | 32 | virtual bool BLoggedOn() = 0; 33 | 34 | virtual void SendClientContentAuthRequest(CSteamID steamID, uint32 uContentID, uint64 ulSessionToken, bool bTokenPresent) = 0; 35 | 36 | virtual bool BCheckTicket(CSteamID steamID, uint32 uContentID, const void *pvTicketData, uint32 cubTicketLength) = 0; 37 | }; 38 | 39 | #endif // ISTEAMCONTENTSERVER001_H 40 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Utils/Pattern/Pattern.cpp: -------------------------------------------------------------------------------- 1 | #include "Pattern.h" 2 | 3 | #define INRANGE(x,a,b) (x >= a && x <= b) 4 | #define GetBits(x) (INRANGE((x&(~0x20)),'A','F') ? ((x&(~0x20)) - 'A' + 0xa) : (INRANGE(x,'0','9') ? x - '0' : 0)) 5 | #define GetByte(x) (GetBits(x[0]) << 4 | GetBits(x[1])) 6 | 7 | DWORD CPattern::FindPattern(DWORD dwAddress, DWORD dwLength, PCCH szPattern) 8 | { 9 | PCCH szPat = szPattern; 10 | DWORD dwFirstMatch = 0x0; 11 | 12 | for (DWORD pCur = dwAddress; pCur < dwLength; pCur++) 13 | { 14 | if (!*szPat) 15 | return dwFirstMatch; 16 | 17 | if (*(PBYTE)szPat == '\?' || *(BYTE *)pCur == GetByte(szPat)) 18 | { 19 | if (!dwFirstMatch) 20 | dwFirstMatch = pCur; 21 | 22 | if (!szPat[2]) 23 | return dwFirstMatch; 24 | 25 | if (*(PWORD)szPat == '\?\?' || *(PBYTE)szPat != '\?') 26 | szPat += 3; 27 | 28 | else szPat += 2; 29 | } 30 | 31 | else { 32 | szPat = szPattern; 33 | dwFirstMatch = 0; 34 | } 35 | } 36 | 37 | return 0x0; 38 | } 39 | 40 | HMODULE CPattern::GetModuleHandleSafe(PCCH szModuleName) 41 | { 42 | HMODULE hmModuleHandle = 0; 43 | 44 | do 45 | { 46 | hmModuleHandle = GetModuleHandleA(szModuleName); 47 | Sleep(1); 48 | } while (hmModuleHandle == 0); 49 | 50 | return hmModuleHandle; 51 | } 52 | 53 | DWORD CPattern::Find(PCCH szModuleName, PCCH szPattern) 54 | { 55 | HMODULE hmModule = GetModuleHandleSafe(szModuleName); 56 | PIMAGE_DOS_HEADER pDOSHeader = (PIMAGE_DOS_HEADER)hmModule; 57 | PIMAGE_NT_HEADERS pNTHeaders = (PIMAGE_NT_HEADERS)(((DWORD)hmModule) + pDOSHeader->e_lfanew); 58 | 59 | return FindPattern(((DWORD)hmModule) + pNTHeaders->OptionalHeader.BaseOfCode, ((DWORD)hmModule) + pNTHeaders->OptionalHeader.SizeOfCode, szPattern); 60 | } 61 | 62 | CPattern gPattern; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamNotify.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMNOTIFICATIONCALLBACKEVENT_H 18 | #define ESTEAMNOTIFICATIONCALLBACKEVENT_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamNotify 24 | { 25 | eSteamNotifyTicketsWillExpire = 0, 26 | eSteamNotifyAccountInfoChanged = 1, 27 | eSteamNotifyContentDescriptionChanged = 2, 28 | eSteamNotifyPleaseShutdown = 3, 29 | eSteamNotifyNewContentServer = 4, 30 | eSteamNotifySubscriptionStatusChanged = 5, 31 | eSteamNotifyContentServerConnectionLost = 6, 32 | eSteamNotifyCacheLoadingCompleted = 7, 33 | eSteamNotifyCacheNeedsDecryption = 8, 34 | eSteamNotifyCacheNeedsRepair = 9, 35 | eSteamNotifyAppDownloading = 10, 36 | eSteamNotifyAppDownloadingPaused = 11, 37 | } ESteamNotify; 38 | 39 | #endif // ESTEAMNOTIFICATIONCALLBACKEVENT_H 40 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamApp.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMAPP_H 18 | #define TSTEAMAPP_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamApp 24 | { 25 | char *szName; 26 | unsigned int uMaxNameChars; 27 | char *szLatestVersionLabel; 28 | unsigned int uMaxLatestVersionLabelChars; 29 | char *szCurrentVersionLabel; 30 | unsigned int uMaxCurrentVersionLabelChars; 31 | char* szInstallDirName; 32 | unsigned int uMaxInstallDirNameChars; 33 | unsigned int uId; 34 | unsigned int uLatestVersionId; 35 | unsigned int uCurrentVersionId; 36 | unsigned int uMinCacheFileSizeMB; 37 | unsigned int uMaxCacheFileSizeMB; 38 | unsigned int uNumLaunchOptions; 39 | unsigned int uNumIcons; 40 | unsigned int uNumVersions; 41 | unsigned int uNumDependencies; 42 | } TSteamApp; 43 | 44 | #endif // TSTEAMAPP_H 45 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientProductBuilder.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTPRODUCTBUILDER_H 18 | #define ICLIENTPRODUCTBUILDER_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | 25 | // Not a typo, it seem that IClientProductBuilder's version string is really the same as IClientDepotBuilder's. 26 | // Valid as of Steamclient beta 22nd March 2014 (1395164792) 27 | #define CLIENTPRODUCTBUILDER_INTERFACE_VERSION "CLIENTDEPOTBUILDER_INTERFACE_VERSION001" 28 | 29 | abstract_class IClientProductBuilder 30 | { 31 | public: 32 | virtual uint64 SignInstallScript(uint32, const char *, const char *) = 0; 33 | virtual uint64 DRMWrap(uint32, const char *, const char *, const char *, uint32) = 0; 34 | virtual uint64 CEGWrap(uint32, const char *, const char *, const char *) = 0; 35 | }; 36 | 37 | #endif // ICLIENTPRODUCTBUILDER_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamApps001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMAPPS001_H 18 | #define ISTEAMAPPS001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "AppsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: interface to app data 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamApps001 30 | { 31 | public: 32 | // returns 0 if the key does not exist 33 | // this may be true on first call, since the app data may not be cached locally yet 34 | // If you expect it to exists wait for the AppDataChanged_t after the first failure and ask again 35 | virtual int GetAppData(AppId_t nAppID, const char *pchKey, char *pchValue, int cchValueMax) = 0; 36 | }; 37 | 38 | #endif // ISTEAMAPPS001_H 39 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamAppList001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMAPPLIST001_H 18 | #define ISTEAMAPPLIST001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "AppsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: interface to app data 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamAppList001 30 | { 31 | public: 32 | virtual unknown_ret GetNumInstalledApps() = 0; 33 | virtual unknown_ret GetInstalledApps(uint32 * puUnk, uint32 uUnk) = 0; 34 | virtual unknown_ret GetAppName(uint32 uUnk, char * pUnk, int32 iUnk) = 0; 35 | virtual unknown_ret GetAppInstallDir(uint32 uUnk, char * pUnk, int32 iUnk) = 0; 36 | virtual unknown_ret GetAppBuildId(uint32 uUnk) = 0; 37 | }; 38 | 39 | #endif // ISTEAMAPPS001_H 40 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamSplitLocalUserID.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMSPLITLOCALUSERID_H 18 | #define TSTEAMSPLITLOCALUSERID_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // Applications need to be able to authenticate Steam users from ANY instance. 24 | // So a SteamIDTicket contains SteamGlobalUserID, which is a unique combination of 25 | // instance and user id. 26 | 27 | // SteamLocalUserID is an unsigned 64-bit integer. 28 | // For platforms without 64-bit int support, we provide access via a union that splits it into 29 | // high and low unsigned 32-bit ints. Such platforms will only need to compare LocalUserIDs 30 | // for equivalence anyway - not perform arithmetic with them. 31 | typedef struct TSteamSplitLocalUserID 32 | { 33 | unsigned int Low32bits; 34 | unsigned int High32bits; 35 | } TSteamSplitLocalUserID; 36 | 37 | #endif // TSTEAMSPLITLOCALUSERID_H 38 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Includes/MD5.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: Generic MD5 hashing algo 4 | // 5 | //=============================================================================// 6 | 7 | #ifndef CHECKSUM_MD5_H 8 | #define CHECKSUM_MD5_H 9 | 10 | #ifdef _WIN32 11 | #pragma once 12 | #endif 13 | 14 | // 16 bytes == 128 bit digest 15 | #define MD5_DIGEST_LENGTH 16 16 | #define MD5_BIT_LENGTH ( MD5_DIGEST_LENGTH * sizeof(unsigned char) ) 17 | struct MD5Value_t 18 | { 19 | unsigned char bits[MD5_DIGEST_LENGTH]; 20 | 21 | void Zero(); 22 | bool IsZero() const; 23 | 24 | bool operator==(const MD5Value_t &src) const; 25 | bool operator!=(const MD5Value_t &src) const; 26 | 27 | }; 28 | 29 | // MD5 Hash 30 | typedef struct 31 | { 32 | unsigned int buf[4]; 33 | unsigned int bits[2]; 34 | unsigned char in[64]; 35 | } MD5Context_t; 36 | 37 | void MD5Init(MD5Context_t *context); 38 | void MD5Update(MD5Context_t *context, unsigned char const *buf, unsigned int len); 39 | void MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5Context_t *context); 40 | 41 | char *MD5_Print(unsigned char *digest, int hashlen); 42 | 43 | /// Convenience wrapper to calculate the MD5 for a buffer, all in one step, without 44 | /// bothering with the context object. 45 | void MD5_ProcessSingleBuffer(const void *p, int len, MD5Value_t &md5Result); 46 | 47 | unsigned int MD5_PseudoRandom(unsigned int nSeed); 48 | 49 | /// Returns true if the values match. 50 | bool MD5_Compare(const MD5Value_t &data, const MD5Value_t &compare); 51 | 52 | inline bool MD5Value_t::operator==(const MD5Value_t &src) const 53 | { 54 | return MD5_Compare(*this, src); 55 | } 56 | 57 | inline bool MD5Value_t::operator!=(const MD5Value_t &src) const 58 | { 59 | return !MD5_Compare(*this, src); 60 | } 61 | 62 | #endif // CHECKSUM_MD5_H -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamRemoteStorage001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMREMOTESTORAGE001_H 18 | #define ISTEAMREMOTESTORAGE001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "RemoteStorageCommon.h" 25 | 26 | abstract_class ISteamRemoteStorage001 27 | { 28 | public: 29 | virtual bool FileWrite(const char *filename, void const *data, int) = 0; 30 | 31 | virtual uint32 GetFileSize(const char *filename) = 0; 32 | 33 | virtual bool FileRead(const char *filename, void *buffer, int size) = 0; 34 | 35 | virtual bool FileExists(const char *filename) = 0; 36 | virtual OBSOLETE_FUNCTION bool FileDelete(const char *filename) = 0; 37 | 38 | virtual uint32 GetFileCount() = 0; 39 | 40 | virtual const char *GetFileNameAndSize(int index, int *size) = 0; 41 | 42 | virtual bool GetQuota(int *current, int *maximum) = 0; 43 | }; 44 | 45 | #endif // ISTEAMREMOTESTORAGE001_H 46 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientStreamClient.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTSTREAMCLIENT_H 18 | #define ICLIENTSTREAMCLIENT_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | 25 | #define CLIENTSTREAMCLIENT_INTERFACE_VERSION "CLIENTSTREAMCLIENT_INTERFACE_VERSION001" 26 | 27 | abstract_class UNSAFE_INTERFACE IClientStreamClient 28 | { 29 | public: 30 | virtual void Launched(CGameID gameID) = 0; 31 | virtual void FocusGained(CGameID gameID, bool) = 0; 32 | virtual void FocusLost(CGameID gameID) = 0; 33 | virtual void Finished(CGameID gameID, EResult eResult) = 0; 34 | virtual const char * GetSystemInfo() = 0; 35 | virtual void StartStreamingSession(CGameID gameID) = 0; 36 | virtual void ReportStreamingSessionEvent(CGameID gameID, const char *) = 0; 37 | virtual void FinishStreamingSession(CGameID gameID, const char *, const char *) = 0; 38 | }; 39 | 40 | #endif // ICLIENTSTREAMCLIENT_H 41 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamUtils001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMUTILS001_H 18 | #define ISTEAMUTILS001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "UtilsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: interface to user independent utility functions 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamUtils001 30 | { 31 | public: 32 | // return the number of seconds since the user 33 | virtual uint32 GetSecondsSinceAppActive() = 0; 34 | virtual uint32 GetSecondsSinceComputerActive() = 0; 35 | 36 | // the universe this client is connecting to 37 | virtual EUniverse GetConnectedUniverse() = 0; 38 | 39 | // server time - in PST, number of seconds since January 1, 1970 (i.e unix time) 40 | virtual uint32 GetServerRealTime() = 0; 41 | }; 42 | 43 | #endif // ISTEAMUTILS001_H 44 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamApps002.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMAPPS002_H 18 | #define ISTEAMAPPS002_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "AppsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: interface to app data 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamApps002 30 | { 31 | public: 32 | virtual bool BIsSubscribed() = 0; 33 | virtual bool BIsLowViolence() = 0; 34 | virtual bool BIsCybercafe() = 0; 35 | virtual bool BIsVACBanned() = 0; 36 | 37 | virtual const char *GetCurrentGameLanguage() = 0; 38 | virtual const char *GetAvailableGameLanguages() = 0; 39 | 40 | // only use this member if you need to check ownership of another game related to yours, a demo for example 41 | virtual bool BIsSubscribedApp(AppId_t nAppID) = 0; 42 | }; 43 | 44 | #endif // ISTEAMAPPS002_H 45 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamAppTicket001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMAPPTICKET001_H 18 | #define ISTEAMAPPTICKET001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "AppTicketCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: hand out a reasonable "future proof" view of an app ownership ticket 28 | // the raw (signed) buffer, and indices into that buffer where the appid and 29 | // steamid are located. the sizes of the appid and steamid are implicit in 30 | // (each version of) the interface - currently uin32 appid and uint64 steamid 31 | //----------------------------------------------------------------------------- 32 | abstract_class ISteamAppTicket001 33 | { 34 | public: 35 | virtual uint32 GetAppOwnershipTicketData(AppId_t nAppId, void *pvSignedTicket, uint32 cbSignedTicket, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature) = 0; 36 | }; 37 | 38 | #endif // ISTEAMAPPTICKET001_H 39 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ESteamSubscriptionStatus.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ESTEAMSUBSCRIPTIONSTATUS_H 18 | #define ESTEAMSUBSCRIPTIONSTATUS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ESteamSubscriptionStatus 24 | { 25 | eSteamSubscriptionOK = 0, 26 | eSteamSubscriptionPending = 1, 27 | eSteamSubscriptionPreorder = 2, 28 | eSteamSubscriptionPrepurchaseTransferred = 3, 29 | eSteamSubscriptionPrepurchaseInvalid = 4, 30 | eSteamSubscriptionPrepurchaseRejected = 5, 31 | eSteamSubscriptionPrepurchaseRevoked = 6, 32 | eSteamSubscriptionPaymentCardDeclined = 7, 33 | eSteamSubscriptionCancelledByUser = 8, 34 | eSteamSubscriptionCancelledByVendor = 9, 35 | eSteamSubscriptionPaymentCardUseLimit = 10, 36 | eSteamSubscriptionPaymentCardAlert = 11, 37 | eSteamSubscriptionFailed = 12, 38 | eSteamSubscriptionPaymentCardAVSFailure = 13, 39 | eSteamSubscriptionPaymentCardInsufficientFunds = 14, 40 | eSteamSubscriptionRestrictedCountry = 15, 41 | } ESteamSubscriptionStatus; 42 | 43 | #endif // ESTEAMSUBSCRIPTIONSTATUS_H 44 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/MatchMakingKeyValuePair.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef MATCHMAKINGKEYVALUEPAIR_H 18 | #define MATCHMAKINGKEYVALUEPAIR_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #ifdef _S4N_ 24 | #define strncpy(...) 25 | #else 26 | #include 27 | #include 28 | #endif 29 | 30 | struct MatchMakingKeyValuePair_t 31 | { 32 | MatchMakingKeyValuePair_t() { m_szKey[0] = m_szValue[0] = 0; } 33 | 34 | #ifdef _MSC_VER 35 | #pragma warning(push) 36 | #pragma warning(disable: 4996) 37 | #endif 38 | 39 | MatchMakingKeyValuePair_t(const char *pchKey, const char *pchValue) 40 | { 41 | strncpy(m_szKey, pchKey, sizeof(m_szKey)); // this is a public header, use basic c library string funcs only! 42 | m_szKey[sizeof(m_szKey) - 1] = '\0'; 43 | strncpy(m_szValue, pchValue, sizeof(m_szValue)); 44 | m_szValue[sizeof(m_szValue) - 1] = '\0'; 45 | } 46 | 47 | #ifdef _MSC_VER 48 | #pragma warning(pop) 49 | #endif 50 | 51 | char m_szKey[256]; 52 | char m_szValue[256]; 53 | }; 54 | 55 | #endif // MATCHMAKINGKEYVALUEPAIR_H 56 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ContentServerCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef CONTENTSERVERCOMMON_H 18 | #define CONTENTSERVERCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define CLIENTCONTENTSERVER_INTERFACE_VERSION "CLIENTCONTENTSERVER_INTERFACE_VERSION001" 24 | 25 | #define STEAMCONTENTSERVER_INTERFACE_VERSION_001 "SteamContentServer001" 26 | #define STEAMCONTENTSERVER_INTERFACE_VERSION_002 "SteamContentServer002" 27 | 28 | typedef enum EConnectionPriority 29 | { 30 | k_EConnectionPriorityLow = 0, 31 | k_EConnectionPriorityMedium = 1, 32 | k_EConnectionPriorityHigh = 2, 33 | } EConnectionPriority; 34 | 35 | #pragma pack( push, 8 ) 36 | struct CSClientApprove_t 37 | { 38 | enum { k_iCallback = k_iSteamContentServerCallbacks + 1 }; 39 | 40 | CSteamID m_SteamID; 41 | uint32 m_uContentID; 42 | }; 43 | 44 | struct CSClientDeny_t 45 | { 46 | enum { k_iCallback = k_iSteamContentServerCallbacks + 2 }; 47 | 48 | CSteamID m_SteamID; 49 | uint32 m_uContentID; 50 | EDenyReason m_eDenyReason; 51 | }; 52 | #pragma pack( pop ) 53 | 54 | #endif // CONTENTSERVERCOMMON_H 55 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/DLLMain.cpp: -------------------------------------------------------------------------------- 1 | #include "Hooks/Hooks.h" 2 | 3 | //If you want to make this a mess which has features for many different games 4 | //you need to make this process automated. 5 | //Or then just don't hook WndProc idc 6 | 7 | DWORD WINAPI MainThread(LPVOID lpParam) 8 | { 9 | Util::InitDebug(); 10 | 11 | gSteam.Init(); 12 | gInts.Init(); 13 | gNetVars.Init(); 14 | gHooks.Init(); 15 | gConVars.Init(); 16 | 17 | gDraw.InitFonts 18 | ({ 19 | //FONT_ESP 20 | { 0x0, "Tahoma", 12, 0, FONTFLAG_OUTLINE }, 21 | //FONT_ESP_NAME 22 | { 0x0, "Tahoma", 13, 0, FONTFLAG_OUTLINE }, 23 | //FONT_ESP_COND 24 | { 0x0, "Consolas", 10, 0, FONTFLAG_OUTLINE }, 25 | //FONT_ESP_PICKUPS 26 | { 0x0, "Tahoma", 11, 0, FONTFLAG_OUTLINE }, 27 | //FONT_DEBUG 28 | { 0x0, "Arial", 16, 0, FONTFLAG_OUTLINE }, 29 | //FONT_MENU 30 | { 0x0, "Segoe UI", 14, 0, FONTFLAG_NONE } 31 | }); 32 | 33 | //CSteamID csLocal = gSteam.User->GetSteamID(); 34 | //csLocal.Render() = Steam ID (STEAM_0:1:201244158) 35 | //csLocal.SteamRender() = Steam ID3 ([U:1:402488317]) 36 | 37 | //Wait until client is in came, after that we can properly dump the class ID's 38 | while (!gInts.Engine->IsInGame()) 39 | std::this_thread::sleep_for(std::chrono::seconds(1)); 40 | 41 | gNetVars.DumpClassID(); 42 | 43 | Util::PrintDebug("MainThread finished.\n"); 44 | 45 | //Stuck at this, as long as "panic" key is not pressed. 46 | while (!(GetAsyncKeyState(VK_F11) & 0x8000)) 47 | std::this_thread::sleep_for(std::chrono::seconds(1)); 48 | 49 | gHooks.Release(); 50 | Util::ReleaseDebug(); 51 | FreeLibraryAndExitThread(static_cast(lpParam), EXIT_SUCCESS); 52 | } 53 | 54 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 55 | { 56 | switch (fdwReason) 57 | { 58 | case DLL_PROCESS_ATTACH: { 59 | if (HANDLE hMain = CreateThread(0, 0, MainThread, hinstDLL, 0, 0)) CloseHandle(hMain); 60 | break; 61 | } 62 | 63 | case DLL_PROCESS_DETACH: { 64 | break; 65 | } 66 | 67 | default: break; 68 | } 69 | 70 | return TRUE; 71 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamPaymentCardReceiptInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMPAYMENTCARDRECEIPTINFO_H 18 | #define TSTEAMPAYMENTCARDRECEIPTINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamPaymentCardReceiptInfo 24 | { 25 | ESteamPaymentCardType eCardType; 26 | char szCardLastFourDigits[STEAM_CARD_LASTFOURDIGITS_SIZE + 1]; 27 | char szCardHolderName[STEAM_CARD_HOLDERNAME_SIZE + 1]; 28 | char szBillingAddress1[STEAM_BILLING_ADDRESS1_SIZE + 1]; 29 | char szBillingAddress2[STEAM_BILLING_ADDRESS2_SIZE + 1]; 30 | char szBillingCity[STEAM_BILLING_CITY_SIZE + 1]; 31 | char szBillingZip[STEAM_BILLING_ZIP_SIZE + 1]; 32 | char szBillingState[STEAM_BILLING_STATE_SIZE + 1]; 33 | char szBillingCountry[STEAM_BILLING_COUNTRY_SIZE + 1]; 34 | char szCardApprovalCode[STEAM_CARD_APPROVAL_CODE_SIZE + 1]; 35 | char szTransDate[STEAM_DATE_SIZE + 1]; 36 | char szTransTime[STEAM_TIME_SIZE + 1]; 37 | unsigned int uPriceWithoutTax; 38 | unsigned int uTaxAmount; 39 | unsigned int uShippingCost; 40 | } TSteamPaymentCardReceiptInfo; 41 | 42 | #endif // TSTEAMPAYMENTCARDRECEIPTINFO_H 43 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamApps003.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMAPPS003_H 18 | #define ISTEAMAPPS003_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "AppsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: interface to app data 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamApps003 30 | { 31 | public: 32 | virtual bool BIsSubscribed() = 0; 33 | virtual bool BIsLowViolence() = 0; 34 | virtual bool BIsCybercafe() = 0; 35 | virtual bool BIsVACBanned() = 0; 36 | virtual const char *GetCurrentGameLanguage() = 0; 37 | virtual const char *GetAvailableGameLanguages() = 0; 38 | 39 | // only use this member if you need to check ownership of another game related to yours, a demo for example 40 | virtual bool BIsSubscribedApp(AppId_t nAppID) = 0; 41 | 42 | // Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed 43 | virtual bool BIsDlcInstalled(AppId_t nAppID) = 0; 44 | }; 45 | 46 | #endif // ISTEAMAPPS003_H 47 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/NetVars/NetVars.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../Interfaces/Interfaces.h" 3 | 4 | //Emily's NetVars 5 | class C_NetVars 6 | { 7 | struct node; 8 | using map_type = std::unordered_map>; 9 | 10 | struct node { 11 | node(DWORD offset) : offset(offset) {} 12 | map_type nodes; 13 | DWORD offset; 14 | }; 15 | 16 | map_type nodes; 17 | 18 | public: 19 | void Init(); 20 | 21 | private: 22 | void populate_nodes(class RecvTable *recv_table, map_type *map); 23 | 24 | DWORD get_offset_recursive(map_type &map, int acc, const char *name) { 25 | return acc + map[name]->offset; 26 | } 27 | 28 | template 29 | DWORD get_offset_recursive(map_type &map, int acc, const char *name, args_t ...args) { 30 | const auto &node = map[name]; 31 | return get_offset_recursive(node->nodes, acc + node->offset, args...); 32 | } 33 | 34 | public: 35 | template 36 | DWORD get_offset(const char *name, args_t ...args) { 37 | const auto &node = nodes[name]; 38 | return get_offset_recursive(node->nodes, node->offset, args...); 39 | } 40 | 41 | void DumpClassID(); 42 | }; 43 | 44 | extern C_NetVars gNetVars; 45 | 46 | template 47 | class CDynamicNetvar 48 | { 49 | DWORD off; 50 | 51 | public: 52 | template 53 | CDynamicNetvar(args_t... a) { 54 | off = gNetVars.get_offset(a...); 55 | } 56 | 57 | template 58 | CDynamicNetvar(int offset, args_t... a) { 59 | off = gNetVars.get_offset(a...) + offset; 60 | } 61 | 62 | T GetValue(PVOID base) { 63 | return *reinterpret_cast((DWORD)base + (DWORD)off); 64 | } 65 | 66 | void SetValue(PVOID base, T val) { 67 | *reinterpret_cast((DWORD)(base)+((DWORD)(off))) = val; 68 | } 69 | }; 70 | 71 | #define DYNVAR(name, type, ...) static CDynamicNetvar ##name( __VA_ARGS__ ) 72 | #define DYNVAR_RETURN(type, base, ...) DYNVAR(n, type, __VA_ARGS__); return n.GetValue(base) 73 | #define DYNVAR_SET(type, base, value, ...) DYNVAR(n, type, __VA_ARGS__); n.SetValue(base,value) -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientContentServer.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTCONTENTSERVER_H 18 | #define ICLIENTCONTENTSERVER_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "ContentServerCommon.h" 25 | #include "UserCommon.h" 26 | 27 | abstract_class UNSAFE_INTERFACE IClientContentServer 28 | { 29 | virtual HSteamUser GetHSteamUser() = 0; 30 | 31 | STEAMWORKS_STRUCT_RETURN_0(CSteamID, GetSteamID) /*virtual CSteamID GetSteamID() = 0;*/ 32 | 33 | virtual void LogOn(uint32 uContentServerID) = 0; 34 | virtual void LogOff() = 0; 35 | 36 | virtual bool BLoggedOn() = 0; 37 | virtual ELogonState GetLogonState() = 0; 38 | virtual bool BConnected() = 0; 39 | 40 | virtual int RaiseConnectionPriority(EConnectionPriority eConnectionPriority) = 0; 41 | virtual void ResetConnectionPriority(int hRaiseConnectionPriorityPrev) = 0; 42 | 43 | virtual void SetCellID(CellID_t cellID) = 0; 44 | 45 | virtual bool SendClientContentAuthRequest(CSteamID steamID, uint32 unContentID, bool bUseToken, uint64 ulSessionToken, bool bTokenPresent) = 0; 46 | virtual bool BCheckTicket(CSteamID steamID, uint32 uContentID, const void *pvTicketData, uint32 cubTicketLength) = 0; 47 | }; 48 | 49 | #endif // ICLIENTCONTENTSERVER_H 50 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamSubscription.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMSUBSCRIPTION_H 18 | #define TSTEAMSUBSCRIPTION_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum EBillingType 24 | { 25 | eNoCost = 0, 26 | eBillOnceOnly = 1, 27 | eBillMonthly = 2, 28 | eProofOfPrepurchaseOnly = 3, 29 | eGuestPass = 4, 30 | eHardwarePromo = 5, 31 | eGift = 6, 32 | eAutoGrant = 7, 33 | OEMTicket = 8, 34 | eRecurringOption = 9, 35 | eNumBillingTypes = 10, 36 | } EBillingType; 37 | 38 | typedef struct TSteamSubscription 39 | { 40 | char* szName; 41 | unsigned int uMaxNameChars; 42 | unsigned int* puAppIds; 43 | unsigned int uMaxAppIds; 44 | unsigned int uId; 45 | unsigned int uNumApps; 46 | EBillingType eBillingType; 47 | unsigned int uCostInCents; 48 | unsigned int uNumDiscounts; 49 | int bIsPreorder; 50 | int bRequiresShippingAddress; 51 | unsigned int uDomesticShippingCostInCents; 52 | unsigned int uInternationalShippingCostInCents; 53 | bool bIsCyberCafeSubscription; 54 | unsigned int uGameCode; 55 | char szGameCodeDesc[STEAM_MAX_PATH]; 56 | bool bIsDisabled; 57 | bool bRequiresCD; 58 | unsigned int uTerritoryCode; 59 | bool bIsSteam3Subscription; 60 | } TSteamSubscription; 61 | 62 | #endif // TSTEAMSUBSCRIPTION_H 63 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ECurrencyCode.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ECURRENCYCODE_H 18 | #define ECURRENCYCODE_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef enum ECurrencyCode 24 | { 25 | k_ECurrencyCodeInvalid = 0, 26 | k_ECurrencyCodeUSD = 1, 27 | k_ECurrencyCodeGBP = 2, 28 | k_ECurrencyCodeEUR = 3, 29 | k_ECurrencyCodeCHF = 4, 30 | k_ECurrencyCodeRUB = 5, 31 | k_ECurrencyCodePLN = 6, 32 | k_ECurrencyCodeBRL = 7, 33 | k_ECurrencyCodeJPY = 8, 34 | k_ECurrencyCodeNOK = 9, 35 | k_ECurrencyCodeIDR = 10, 36 | k_ECurrencyCodeMYR = 11, 37 | k_ECurrencyCodePHP = 12, 38 | k_ECurrencyCodeSGD = 13, 39 | k_ECurrencyCodeTHB = 14, 40 | k_ECurrencyCodeVND = 15, 41 | k_ECurrencyCodeKRW = 16, 42 | k_ECurrencyCodeTRY = 17, 43 | k_ECurrencyCodeUAH = 18, 44 | k_ECurrencyCodeMXN = 19, 45 | k_ECurrencyCodeCAD = 20, 46 | k_ECurrencyCodeAUD = 21, 47 | k_ECurrencyCodeNZD = 22, 48 | k_ECurrencyCodeCNY = 23, 49 | k_ECurrencyCodeINR = 24, 50 | k_ECurrencyCodeCLP = 25, 51 | k_ECurrencyCodePEN = 26, 52 | k_ECurrencyCodeCOP = 27, 53 | k_ECurrencyCodeZAR = 28, 54 | k_ECurrencyCodeHKD = 29, 55 | k_ECurrencyCodeTWD = 30, 56 | k_ECurrencyCodeSAR = 31, 57 | k_ECurrencyCodeAED = 32, 58 | //k_ECurrencyCodeMax = 33, 59 | } ECurrencyCode; 60 | 61 | #endif // ECURRENCYCODE_H 62 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientDeviceAuth.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTDEVICEAUTH_H 18 | #define ICLIENTDEVICEAUTH_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | 25 | #define CLIENTDEVICEAUTH_INTERFACE_VERSION "CLIENTDEVICEAUTH_INTERFACE_VERSION001" 26 | 27 | abstract_class UNSAFE_INTERFACE IClientDeviceAuth 28 | { 29 | public: 30 | virtual uint64 AuthorizeLocalDevice(const char * pubUnk, uint32 cubUnk) = 0; 31 | virtual uint64 DeauthorizeLocalDevice(uint32 uUnk) = 0; 32 | 33 | virtual uint64 DeauthorizeRemoteDevice(uint64 uUnk) = 0; 34 | virtual uint64 RequestAuthorizationInfos() = 0; 35 | virtual uint32 GetDeviceAuthorizations(uint64 *, uint32, bool) = 0; 36 | virtual bool GetDeviceAuthorizationInfo(uint64, uint32 *, uint32 *, bool *, char *, int32, char *, int32, char *, int32, uint32 *) = 0; 37 | 38 | virtual uint32 GetAuthorizedBorrowsers(uint32 *, uint32) = 0; 39 | virtual uint32 GetLocalUsers(uint32 *, uint32) = 0; 40 | virtual bool GetBorrowserInfo(uint32, char *, int32, bool *) = 0; 41 | virtual uint64 UpateAuthorizedBorrowers(const uint32 *, uint32, bool) = 0; 42 | 43 | virtual uint32 GetSharedLibraryLockedBy(uint32 uUnk) = 0; 44 | virtual uint32 GetSharedLibraryOwners(uint32 *, uint32) = 0; 45 | }; 46 | 47 | #endif // ICLIENTDEVICEAUTH_H 48 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamController001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMCONTROLLER001_H 18 | #define ISTEAMCONTROLLER001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "ControllerCommon.h" 25 | 26 | abstract_class ISteamController001 27 | { 28 | public: 29 | // 30 | // Native controller support API 31 | // 32 | 33 | // Must call init and shutdown when starting/ending use of the interface 34 | virtual bool Init(const char *pchAbsolutePathToControllerConfigVDF) = 0; 35 | virtual bool Shutdown() = 0; 36 | 37 | // Pump callback/callresult events, SteamAPI_RunCallbacks will do this for you, 38 | // normally never need to call directly. 39 | virtual void RunFrame() = 0; 40 | 41 | // Get the state of the specified controller, returns false if that controller is not connected 42 | virtual bool GetControllerState(uint32 unControllerIndex, SteamControllerState_t *pState) = 0; 43 | 44 | // Trigger a haptic pulse on the controller 45 | virtual void TriggerHapticPulse(uint32 unControllerIndex, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec) = 0; 46 | 47 | // Set the override mode which is used to choose to use different base/legacy bindings from your config file 48 | virtual void SetOverrideMode(const char *pchMode) = 0; 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/IClientApps.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ICLIENTAPPS_H 18 | #define ICLIENTAPPS_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "AppsCommon.h" 25 | 26 | abstract_class UNSAFE_INTERFACE IClientApps 27 | { 28 | public: 29 | // returns 0 if the key does not exist 30 | // this may be true on first call, since the app data may not be cached locally yet 31 | // If you expect it to exists wait for the AppDataChanged_t after the first failure and ask again 32 | virtual int32 GetAppData(AppId_t unAppID, const char *pchKey, char *pchValue, int32 cchValueMax) = 0; 33 | 34 | virtual bool SetLocalAppConfig(AppId_t unAppID, uint8 *pchBuffer, int32 cbBuffer) = 0; 35 | 36 | virtual AppId_t GetInternalAppIDFromGameID(CGameID nGameID) = 0; 37 | 38 | virtual int32 GetAllOwnedMultiplayerApps(uint32 *punAppIDs, int32 cAppIDsMax) = 0; 39 | 40 | virtual int32 GetAppDataSection(AppId_t unAppID, EAppInfoSection eSection, uint8 *pchBuffer, int32 cbBufferMax, bool bSharedKVSymbols) = 0; 41 | virtual bool RequestAppInfoUpdate(const AppId_t *pAppIDs, int32 nNumAppIDs) = 0; 42 | 43 | virtual void NotifyAppEventTriggered(AppId_t unAppID, EAppEvent eAppEvent) = 0; 44 | 45 | virtual int32 GetDLCCount(AppId_t unAppID) = 0; 46 | virtual bool BGetDLCDataByIndex(AppId_t unAppID, int32 iDLC, AppId_t* pDlcAppID, bool *pbAvailable, char *pchName, int32 cchNameBufferSize) = 0; 47 | }; 48 | 49 | #endif // ICLIENTAPPS_H 50 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamGameCoordinator001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMGAMECOORDINATOR001_H 18 | #define ISTEAMGAMECOORDINATOR001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "GameCoordinatorCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: Functions for sending and receiving messages from the Game Coordinator 28 | // for this application 29 | //----------------------------------------------------------------------------- 30 | abstract_class ISteamGameCoordinator001 31 | { 32 | public: 33 | 34 | // sends a message to the Game Coordinator 35 | virtual EGCResults SendMessage(uint32 unMsgType, const void *pubData, uint32 cubData) = 0; 36 | 37 | // returns true if there is a message waiting from the game coordinator 38 | virtual bool IsMessageAvailable(uint32 *pcubMsgSize) = 0; 39 | 40 | // fills the provided buffer with the first message in the queue and returns k_EGCResultOK or 41 | // returns k_EGCResultNoMessage if there is no message waiting. pcubMsgSize is filled with the message size. 42 | // If the provided buffer is not large enough to fit the entire message, k_EGCResultBufferTooSmall is returned 43 | // and the message remains at the head of the queue. 44 | virtual EGCResults RetrieveMessage(uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize) = 0; 45 | }; 46 | 47 | #endif // ISTEAMGAMECOORDINATOR001_H 48 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Interfaces.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "EngineClient/EngineClient.h" 4 | #include "BaseClientDLL/BaseClientDLL.h" 5 | #include "ClientDLLSharedAppSystems/ClientDLLSharedAppSystems.h" 6 | #include "ClientModeShared/ClientModeShared.h" 7 | #include "GlobalVarsBase/GlobalVarsBase.h" 8 | #include "ClientEntityList/ClientEntityList.h" 9 | #include "ModelInfo/ModelInfo.h" 10 | #include "EngineTrace/EngineTrace.h" 11 | #include "GameMovement/GameMovement.h" 12 | #include "MoveHelper/MoveHelper.h" 13 | #include "ConVar/ConVar.h" 14 | #include "Prediction/Prediction.h" 15 | #include "Panel/Panel.h" 16 | #include "Surface/Surface.h" 17 | #include "RenderView/RenderView.h" 18 | #include "EngineVGui/EngineVGui.h" 19 | #include "NetChannel/NetChannel.h" 20 | #include "GameEvent/GameEvent.h" 21 | #include "DebugOverlay/DebugOverlay.h" 22 | #include "Steam/Steamworks.h" 23 | #include "Steam/SteamTypes.h" 24 | 25 | class C_SteamInterfaces 26 | { 27 | public: 28 | ISteamFriends002* Friends002 = nullptr; 29 | ISteamFriends015* Friends015 = nullptr; 30 | ISteamApps006* SteamApps = nullptr; 31 | ISteamUserStats011* UserStats = nullptr; 32 | ISteamClient017* Client = nullptr; 33 | ISteamUser017* User = nullptr; 34 | ISteamUtils007* Utils007 = nullptr; 35 | 36 | void Init(); 37 | }; 38 | 39 | class C_Interfaces 40 | { 41 | public: 42 | C_BaseClientDLL* Client = nullptr; 43 | C_ClientDLLSharedAppSystems* ClientShared = nullptr; 44 | C_ClientModeShared* ClientMode = nullptr; 45 | C_EngineClient* Engine = nullptr; 46 | C_Panel* Panel = nullptr; 47 | C_Surface* Surface = nullptr; 48 | C_ClientEntityList* EntityList = nullptr; 49 | C_ModelInfoClient* ModelInfo = nullptr; 50 | C_EngineTrace* EngineTrace = nullptr; 51 | C_Prediction* Prediction = nullptr; 52 | C_GameMovement* GameMovement = nullptr; 53 | C_MoveHelper* MoveHelper = nullptr; 54 | ICvar* CVars = nullptr; //hello, I am ICvar and I do not associate with C_ niggas 55 | C_GlobalVarsBase* GlobalVars = nullptr; 56 | C_EngineVGui* EngineVGui = nullptr; 57 | int32_t* RandomSeed = nullptr; //What about me?!?! 58 | void* DemoPlayer = nullptr; //hHaha we're getting STRONG!!1 59 | C_GameEventManager* GameEvent = nullptr; //Normally this would be another traitor but I added C_ 60 | C_RenderView* RenderView = nullptr; 61 | IDebugOverlay* DebugOverlay = nullptr; //Back at it MF 62 | 63 | void Init(); 64 | }; 65 | 66 | extern C_Interfaces gInts; 67 | extern C_SteamInterfaces gSteam; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamRemoteStorage002.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMREMOTESTORAGE002_H 18 | #define ISTEAMREMOTESTORAGE002_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "RemoteStorageCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: Functions for accessing, reading and writing files stored remotely 28 | // and cached locally 29 | //----------------------------------------------------------------------------- 30 | abstract_class ISteamRemoteStorage002 31 | { 32 | public: 33 | // NOTE 34 | // 35 | // Filenames are case-insensitive, and will be converted to lowercase automatically. 36 | // So "foo.bar" and "Foo.bar" are the same file, and if you write "Foo.bar" then 37 | // iterate the files, the filename returned will be "foo.bar". 38 | // 39 | 40 | // file operations 41 | virtual bool FileWrite(const char *pchFile, const void *pvData, int32 cubData) = 0; 42 | virtual int32 GetFileSize(const char *pchFile) = 0; 43 | virtual int32 FileRead(const char *pchFile, void *pvData, int32 cubDataToRead) = 0; 44 | virtual bool FileExists(const char *pchFile) = 0; 45 | 46 | // iteration 47 | virtual int32 GetFileCount() = 0; 48 | virtual const char *GetFileNameAndSize(int iFile, int32 *pnFileSizeInBytes) = 0; 49 | 50 | // quota management 51 | virtual bool GetQuota(int32 *pnTotalBytes, int32 *puAvailableBytes) = 0; 52 | }; 53 | 54 | #endif // ISTEAMREMOTESTORAGE_H 55 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ClientCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef CLIENTCOMMON_H 18 | #define CLIENTCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | // interface predec 24 | class ISteamClient; 25 | class ISteamUser; 26 | class ISteamGameServer; 27 | class ISteamFriends; 28 | class ISteamUtils; 29 | class ISteamMatchmaking; 30 | class ISteamContentServer; 31 | class ISteamMasterServerUpdater; 32 | class ISteamMatchmakingServers; 33 | class ISteam2Bridge; 34 | class ISteamUserStats; 35 | class ISteamApps; 36 | class ISteamBilling; 37 | class IVAC; 38 | class ISteamNetworking; 39 | class ISteamRemoteStorage; 40 | class ISteamGameServerItems; 41 | class ISteamGameServerStats; 42 | class ISteamHTTP; 43 | class ISteamScreenshots; 44 | class ISteamUnifiedMessages; 45 | class ISteamController; 46 | class ISteamUGC; 47 | class ISteamAppList; 48 | class ISteamMusic; 49 | class ISteamMusicRemote; 50 | class ISteamHTMLSurface; 51 | class ISteamInventory; 52 | class ISteamVideo; 53 | 54 | #define CLIENTENGINE_INTERFACE_VERSION "CLIENTENGINE_INTERFACE_VERSION004" 55 | 56 | #define STEAMCLIENT_INTERFACE_VERSION_006 "SteamClient006" 57 | #define STEAMCLIENT_INTERFACE_VERSION_007 "SteamClient007" 58 | #define STEAMCLIENT_INTERFACE_VERSION_008 "SteamClient008" 59 | #define STEAMCLIENT_INTERFACE_VERSION_009 "SteamClient009" 60 | #define STEAMCLIENT_INTERFACE_VERSION_010 "SteamClient010" 61 | #define STEAMCLIENT_INTERFACE_VERSION_011 "SteamClient011" 62 | #define STEAMCLIENT_INTERFACE_VERSION_012 "SteamClient012" 63 | #define STEAMCLIENT_INTERFACE_VERSION_017 "SteamClient017" 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteam2Bridge001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAM2BRIDGE001_H 18 | #define ISTEAM2BRIDGE001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "BridgeCommon.h" 25 | 26 | abstract_class ISteam2Bridge001 27 | { 28 | public: 29 | virtual void SetSteam2Ticket(uint8 *pubTicket, int cubTicket) = 0; 30 | 31 | virtual bool SetAccountName(const char *pchAccountName) = 0; 32 | virtual bool SetPassword(const char *pchPassword) = 0; 33 | virtual bool SetAccountCreationTime(RTime32 rt) = 0; 34 | 35 | virtual bool CreateProcess(void *lpVACBlob, uint32 cbBlobSize, char const *lpApplicationName, char *lpCommandLine, uint32 dwCreationFlags, void *lpEnvironment, char *lpCurrentDirectory, uint32 nGameID) = 0; 36 | 37 | virtual EUniverse GetConnectedUniverse() = 0; 38 | virtual const char *GetIPCountry() = 0; 39 | 40 | virtual uint32 GetNumLicenses() = 0; 41 | 42 | virtual int32 GetLicensePackageID(uint32 nLicenseIndex) = 0; 43 | virtual RTime32 GetLicenseTimeCreated(uint32 nLicenseIndex) = 0; 44 | virtual RTime32 GetLicenseTimeNextProcess(uint32 nLicenseIndex) = 0; 45 | virtual int32 GetLicenseMinuteLimit(uint32 nLicenseIndex) = 0; 46 | virtual int32 GetLicenseMinutesUsed(uint32 nLicenseIndex) = 0; 47 | virtual EPaymentMethod GetLicensePaymentMethod(uint32 nLicenseIndex) = 0; 48 | virtual ELicenseFlags GetLicenseFlags(uint32 nLicenseIndex) = 0; 49 | virtual const char *GetLicensePurchaseCountryCode(uint32 nLicenseIndex) = 0; 50 | 51 | virtual bool SetOfflineMode(bool bOffline) = 0; 52 | }; 53 | 54 | #endif // ISTEAM2BRIDGE001_H 55 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamPaymentCardInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMPAYMENTCARDINFO_H 18 | #define TSTEAMPAYMENTCARDINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamPaymentCardInfo 24 | { 25 | ESteamPaymentCardType eCardType; 26 | char szCardNumber[STEAM_CARD_NUMBER_SIZE + 1]; 27 | char szCardHolderName[STEAM_CARD_HOLDERNAME_SIZE + 1]; 28 | char szCardExpYear[STEAM_CARD_EXPYEAR_SIZE + 1]; 29 | char szCardExpMonth[STEAM_CARD_EXPMONTH_SIZE + 1]; 30 | char szCardCVV2[STEAM_CARD_CVV2_SIZE + 1]; 31 | char szBillingAddress1[STEAM_BILLING_ADDRESS1_SIZE + 1]; 32 | char szBillingAddress2[STEAM_BILLING_ADDRESS2_SIZE + 1]; 33 | char szBillingCity[STEAM_BILLING_CITY_SIZE + 1]; 34 | char szBillingZip[STEAM_BILLING_ZIP_SIZE + 1]; 35 | char szBillingState[STEAM_BILLING_STATE_SIZE + 1]; 36 | char szBillingCountry[STEAM_BILLING_COUNTRY_SIZE + 1]; 37 | char szBillingPhone[STEAM_BILLING_PHONE_SIZE + 1]; 38 | char szBillingEmailAddress[STEAM_BILLING_EMAIL_SIZE + 1]; 39 | unsigned int uExpectedCostInCents; 40 | unsigned int uExpectedTaxInCents; 41 | char szShippingName[STEAM_CARD_HOLDERNAME_SIZE + 1]; 42 | char szShippingAddress1[STEAM_BILLING_ADDRESS1_SIZE + 1]; 43 | char szShippingAddress2[STEAM_BILLING_ADDRESS2_SIZE + 1]; 44 | char szShippingCity[STEAM_BILLING_CITY_SIZE + 1]; 45 | char szShippingZip[STEAM_BILLING_ZIP_SIZE + 1]; 46 | char szShippingState[STEAM_BILLING_STATE_SIZE + 1]; 47 | char szShippingCountry[STEAM_BILLING_COUNTRY_SIZE + 1]; 48 | char szShippingPhone[STEAM_BILLING_PHONE_SIZE + 1]; 49 | unsigned int uExpectedShippingCostInCents; 50 | } TSteamPaymentCardInfo; 51 | 52 | #endif // TSTEAMPAYMENTCARDINFO_H 53 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/TSteamElemInfo.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef TSTEAMELEMINFO_H 18 | #define TSTEAMELEMINFO_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | typedef struct TSteamElemInfo 24 | { 25 | int bIsDir; /* If non-zero, element is a directory; if zero, element is a file */ 26 | unsigned int uSizeOrCount; /* If element is a file, this contains size of file in bytes */ 27 | int bIsLocal; /* If non-zero, reported item is a standalone element on local filesystem */ 28 | char cszName[STEAM_MAX_PATH]; /* Base element name (no path) */ 29 | long lLastAccessTime; /* Seconds since 1/1/1970 (like time_t) when element was last accessed */ 30 | long lLastModificationTime; /* Seconds since 1/1/1970 (like time_t) when element was last modified */ 31 | long lCreationTime; /* Seconds since 1/1/1970 (like time_t) when element was created */ 32 | } TSteamElemInfo; 33 | 34 | typedef struct TSteamElemInfo64 35 | { 36 | int bIsDir; /* If non-zero, element is a directory; if zero, element is a file */ 37 | unsigned long long ullSizeOrCount; /* If element is a file, this contains size of file in bytes */ 38 | int bIsLocal; /* If non-zero, reported item is a standalone element on local filesystem */ 39 | char cszName[STEAM_MAX_PATH]; /* Base element name (no path) */ 40 | long long llLastAccessTime; /* Seconds since 1/1/1970 (like time_t) when element was last accessed */ 41 | long long llLastModificationTime; /* Seconds since 1/1/1970 (like time_t) when element was last modified */ 42 | long long llCreationTime; /* Seconds since 1/1/1970 (like time_t) when element was created */ 43 | } TSteamElemInfo64; 44 | 45 | #endif // TSTEAMELEMINFO_H 46 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Prediction/Prediction.cpp: -------------------------------------------------------------------------------- 1 | #include "Prediction.h" 2 | 3 | int C_LocalPrediction::GetTickbase(C_UserCmd *pCmd, C_BaseEntity *pLocal) 4 | { 5 | static int nTick = 0; 6 | static C_UserCmd *pLastCmd = nullptr; 7 | 8 | if (pCmd) 9 | { 10 | if (!pLastCmd || pLastCmd->hasbeenpredicted) 11 | nTick = pLocal->GetTickBase(); 12 | 13 | else nTick++; 14 | 15 | pLastCmd = pCmd; 16 | } 17 | 18 | return nTick; 19 | } 20 | 21 | void C_LocalPrediction::Start(C_UserCmd *pCmd) 22 | { 23 | if (!gInts.MoveHelper) 24 | return; 25 | 26 | C_BaseEntity *pLocal = gEntCache.pLocal; 27 | 28 | if (pLocal && pLocal->IsAlive()) 29 | { 30 | pLocal->SetCurrentCmd(pCmd); 31 | 32 | *gInts.RandomSeed = MD5_PseudoRandom(pCmd->command_number) & std::numeric_limits::max(); 33 | 34 | fOldCurrentTime = gInts.GlobalVars->curtime; 35 | fOldFrameTime = gInts.GlobalVars->frametime; 36 | nOldTickCount = gInts.GlobalVars->tickcount; 37 | nOldFlags = pLocal->GetFlags(); 38 | 39 | const int nOldTickBase = pLocal->GetTickBase(); 40 | const bool bOldIsFirstPrediction = gInts.Prediction->m_bFirstTimePredicted; 41 | const bool bOldInPrediction = gInts.Prediction->m_bInPrediction; 42 | 43 | gInts.GlobalVars->curtime = TICKS_TO_TIME(GetTickbase(pCmd, pLocal)); 44 | gInts.GlobalVars->frametime = (gInts.Prediction->m_bEnginePaused ? 0.0f : TICK_INTERVAL); 45 | gInts.GlobalVars->tickcount = GetTickbase(pCmd, pLocal); 46 | 47 | gInts.Prediction->m_bFirstTimePredicted = false; 48 | gInts.Prediction->m_bInPrediction = true; 49 | 50 | //skipped buttons 51 | 52 | //TODO: CheckMovingGround(pLocal, gInts.GlobalVars->frametime); 53 | 54 | gInts.Prediction->SetLocalViewAngles(pCmd->viewangles); 55 | 56 | gInts.MoveHelper->SetHost(pLocal); 57 | 58 | gInts.Prediction->SetupMove(pLocal, pCmd, gInts.MoveHelper, &moveData); 59 | gInts.GameMovement->ProcessMovement(pLocal, &moveData); 60 | gInts.Prediction->FinishMove(pLocal, pCmd, &moveData); 61 | 62 | pLocal->SetTickBase(nOldTickBase); 63 | 64 | gInts.Prediction->m_bInPrediction = bOldInPrediction; 65 | gInts.Prediction->m_bFirstTimePredicted = bOldIsFirstPrediction; 66 | } 67 | } 68 | 69 | void C_LocalPrediction::End(C_UserCmd *pCmd) 70 | { 71 | if (!gInts.MoveHelper) 72 | return; 73 | 74 | C_BaseEntity *pLocal = gEntCache.pLocal; 75 | 76 | if (pLocal && pLocal->IsAlive()) 77 | { 78 | gInts.MoveHelper->SetHost(nullptr); 79 | 80 | gInts.GlobalVars->curtime = fOldCurrentTime; 81 | gInts.GlobalVars->frametime = fOldFrameTime; 82 | gInts.GlobalVars->tickcount = nOldTickCount; 83 | 84 | pLocal->SetCurrentCmd(nullptr); 85 | 86 | *gInts.RandomSeed = -1; 87 | } 88 | } 89 | 90 | C_LocalPrediction gPrediction; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/GameStatsCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef GAMESTATSCOMMON_H 18 | #define GAMESTATSCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define STEAMGAMESTATS_INTERFACE_VERSION_001 "SteamGameStats001" 24 | 25 | #define CLIENTGAMESTATS_INTERFACE_VERSION "CLIENTGAMESTATS_INTERFACE_VERSION001" 26 | 27 | //----------------------------------------------------------------------------- 28 | // Purpose: nAccountType for GetNewSession 29 | //----------------------------------------------------------------------------- 30 | enum EGameStatsAccountType 31 | { 32 | k_EGameStatsAccountType_Steam = 1, // ullAccountID is a 64-bit SteamID for a player 33 | k_EGameStatsAccountType_Xbox = 2, // ullAccountID is a 64-bit XUID 34 | k_EGameStatsAccountType_SteamGameServer = 3, // ullAccountID is a 64-bit SteamID for a game server 35 | }; 36 | 37 | #pragma pack( push, 8 ) 38 | //----------------------------------------------------------------------------- 39 | // Purpose: callback for GetNewSession() method 40 | //----------------------------------------------------------------------------- 41 | struct GameStatsSessionIssued_t 42 | { 43 | enum { k_iCallback = k_iSteamGameStatsCallbacks + 1 }; 44 | 45 | uint64 m_ulSessionID; 46 | EResult m_eResult; 47 | bool m_bCollectingAny; 48 | bool m_bCollectingDetails; 49 | }; 50 | 51 | //----------------------------------------------------------------------------- 52 | // Purpose: callback for EndSession() method 53 | //----------------------------------------------------------------------------- 54 | struct GameStatsSessionClosed_t 55 | { 56 | enum { k_iCallback = k_iSteamGameStatsCallbacks + 2 }; 57 | 58 | uint64 m_ulSessionID; 59 | EResult m_eResult; 60 | }; 61 | #pragma pack( pop ) 62 | 63 | #endif // GAMESTATSCOMMON_H 64 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/Features/Menu/Menu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../SDK/SDK.h" 3 | 4 | enum struct EItemType { 5 | DEFAULT, 6 | INT, 7 | FLOAT, 8 | BOOL 9 | }; 10 | 11 | class CItemBase 12 | { 13 | public: 14 | std::string m_Name = {}; 15 | EItemType e_Type = EItemType::DEFAULT; 16 | CItemBase(EItemType type, const std::string &name) : e_Type(type), m_Name(name) {}; 17 | }; 18 | 19 | class CItemInt : public CItemBase 20 | { 21 | public: 22 | int *m_Ptr = nullptr; 23 | std::vector> m_Aliases = {}; 24 | int m_Min = std::numeric_limits::min(); 25 | int m_Max = std::numeric_limits::max(); 26 | 27 | int m_AliasIdx = 0; 28 | 29 | CItemInt(const std::string &name, 30 | int *ptr, 31 | std::vector> aliases = {}, 32 | int min = std::numeric_limits::min(), 33 | int max = std::numeric_limits::max()) 34 | : CItemBase(EItemType::INT, name), m_Ptr(ptr), m_Aliases(aliases), m_Min(min), m_Max(max) 35 | { 36 | if (!m_Aliases.empty()) 37 | { 38 | bool Found = false; 39 | 40 | for (const auto &Alias : this->m_Aliases) 41 | { 42 | if (*reinterpret_cast(this->m_Ptr) == Alias.first) { 43 | this->m_AliasIdx = Alias.first; 44 | Found = true; 45 | break; 46 | } 47 | } 48 | 49 | if (!Found) 50 | *reinterpret_cast(this->m_Ptr) = this->m_Aliases.at(0).first; 51 | } 52 | } 53 | }; 54 | 55 | class CItemFloat : public CItemBase 56 | { 57 | public: 58 | float *m_Ptr = nullptr; 59 | float m_Step = 1.0f; 60 | float m_Min = std::numeric_limits::min(); 61 | float m_Max = std::numeric_limits::max(); 62 | 63 | CItemFloat(const std::string &name, 64 | float *ptr, 65 | float step = 1.0f, 66 | float min = std::numeric_limits::min(), 67 | float max = std::numeric_limits::max()) 68 | : CItemBase(EItemType::FLOAT, name), m_Ptr(ptr), m_Step(step), m_Min(min), m_Max(max) {} 69 | }; 70 | 71 | class CItemBool : public CItemBase 72 | { 73 | public: 74 | bool *m_Ptr = nullptr; 75 | CItemBool(const std::string &name, bool *ptr) : CItemBase(EItemType::BOOL, name), m_Ptr(ptr) {} 76 | }; 77 | 78 | class CItemGroup 79 | { 80 | public: 81 | std::string m_Name = {}; 82 | std::vector m_Items = {}; 83 | bool m_Open = false; 84 | }; 85 | 86 | class CItemList 87 | { 88 | public: 89 | std::string m_Name = {}; 90 | std::vector m_ItemGroups = {}; 91 | }; 92 | 93 | class CMenu 94 | { 95 | private: 96 | std::vector m_ItemLists = {}; 97 | void CreateLists(); 98 | 99 | public: 100 | bool m_Open = false; 101 | bool m_OnAimbotFOV = false; 102 | 103 | ~CMenu(); 104 | void Run(); 105 | }; 106 | 107 | extern CMenu gMenu; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseCombatWeapon/BaseCombatWeapon.cpp: -------------------------------------------------------------------------------- 1 | #include "BaseCombatWeapon.h" 2 | #include "../ConVars/ConVars.h" 3 | 4 | int C_BaseCombatWeapon::GetWeaponID() 5 | { 6 | typedef int(__thiscall* FN)(void*); 7 | return GetVFunc(this, 377)(this); 8 | } 9 | 10 | int C_BaseCombatWeapon::GetClip1() 11 | { 12 | DYNVAR_RETURN(int, this, "DT_BaseCombatWeapon", "LocalWeaponData", "m_iClip1"); 13 | } 14 | 15 | int C_BaseCombatWeapon::GetSlot() 16 | { 17 | typedef int(__thiscall* FN)(PVOID); 18 | return GetVFunc(this, 327)(this); 19 | } 20 | 21 | float C_BaseCombatWeapon::GetChargeTime() 22 | { 23 | DYNVAR_RETURN(float, this, "DT_WeaponPipebombLauncher", "PipebombLauncherLocalData", "m_flChargeBeginTime"); 24 | } 25 | 26 | int C_BaseCombatWeapon::GetItemDefinitionIndex() 27 | { 28 | DYNVAR_RETURN(int, this, "DT_EconEntity", "m_AttributeManager", "m_Item", "m_iItemDefinitionIndex"); 29 | } 30 | 31 | float C_BaseCombatWeapon::GetSwingRange(C_BaseEntity* pLocal) 32 | { 33 | typedef int(__thiscall* FN)(C_BaseEntity*); 34 | return (static_cast(GetVFunc(this, 451)(pLocal))); 35 | } 36 | 37 | bool C_BaseCombatWeapon::DoSwingTrace(C_GameTrace& Trace) 38 | { 39 | typedef int(__thiscall* FN)(C_GameTrace&); 40 | return GetVFunc(this, 453)(Trace); 41 | } 42 | 43 | Vec3& C_BaseCombatWeapon::GetBulletSpread() 44 | { 45 | typedef Vec3& (__thiscall* FN)(PVOID); 46 | return GetVFunc(this, 286)(this); 47 | } 48 | 49 | int C_BaseCombatWeapon::GetDamageType() 50 | { 51 | typedef int(__thiscall* FN)(void*); 52 | return GetVFunc(this, 378)(this); 53 | } 54 | 55 | bool C_BaseCombatWeapon::CanFireCriticalShot(bool bHeadShot) 56 | { 57 | typedef bool(__thiscall* FN)(void*, bool, C_BaseEntity*); 58 | return GetVFunc(this, 421)(this, bHeadShot, nullptr); 59 | } 60 | 61 | float C_BaseCombatWeapon::GetNextSecondaryAttack() 62 | { 63 | DYNVAR_RETURN(float, this, "DT_BaseCombatWeapon", "LocalActiveWeaponData", "m_flNextSecondaryAttack"); 64 | } 65 | 66 | float C_BaseCombatWeapon::GetNextPrimaryAttack() 67 | { 68 | DYNVAR_RETURN(float, this, "DT_BaseCombatWeapon", "LocalActiveWeaponData", "m_flNextPrimaryAttack"); 69 | } 70 | 71 | bool C_BaseCombatWeapon::CanShoot(C_BaseEntity* pLocal) 72 | { 73 | if (auto pNet = gInts.Engine->GetNetChannelInfo()) 74 | { 75 | float fInterp = gConVars.cl_interp->GetFloat(); 76 | float fLatency = (pNet->GetLatency(FLOW_OUTGOING) + pNet->GetLatency(FLOW_INCOMING)); 77 | 78 | return (GetNextPrimaryAttack() < (static_cast(pLocal->GetTickBase() + (fInterp + fLatency)) * gInts.GlobalVars->interval_per_tick)); 79 | } 80 | 81 | return false; 82 | } 83 | 84 | bool C_BaseCombatWeapon::CanSecondaryAttack(C_BaseEntity* pLocal) 85 | { 86 | return (GetNextSecondaryAttack() < (static_cast(pLocal->GetTickBase()) * gInts.GlobalVars->interval_per_tick)); 87 | } -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamGameStats001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMGAMESTATS001_H 18 | #define ISTEAMGAMESTATS001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "GameStatsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: Functions for recording game play sessions and details thereof 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamGameStats001 30 | { 31 | public: 32 | virtual SteamAPICall_t GetNewSession(int8 nAccountType, uint64 ulAccountID, int32 nAppID, RTime32 rtTimeStarted) = 0; 33 | virtual SteamAPICall_t EndSession(uint64 ulSessionID, RTime32 rtTimeEnded, int nReasonCode) = 0; 34 | virtual EResult AddSessionAttributeInt(uint64 ulSessionID, const char* pstrName, int32 nData) = 0; 35 | virtual EResult AddSessionAttributeString(uint64 ulSessionID, const char* pstrName, const char *pstrData) = 0; 36 | virtual EResult AddSessionAttributeFloat(uint64 ulSessionID, const char* pstrName, float fData) = 0; 37 | 38 | virtual EResult AddNewRow(uint64 *pulRowID, uint64 ulSessionID, const char *pstrTableName) = 0; 39 | virtual EResult CommitRow(uint64 ulRowID) = 0; 40 | virtual EResult CommitOutstandingRows(uint64 ulSessionID) = 0; 41 | virtual EResult AddRowAttributeInt(uint64 ulRowID, const char *pstrName, int32 nData) = 0; 42 | virtual EResult AddRowAtributeString(uint64 ulRowID, const char *pstrName, const char *pstrData) = 0; 43 | virtual EResult AddRowAttributeFloat(uint64 ulRowID, const char *pstrName, float fData) = 0; 44 | 45 | virtual EResult AddSessionAttributeInt64(uint64 ulSessionID, const char *pstrName, int64 llData) = 0; 46 | virtual EResult AddRowAttributeInt64(uint64 ulRowID, const char *pstrName, int64 llData) = 0; 47 | }; 48 | 49 | #endif // ISTEAMGAMESERVERSTATS001_H 50 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Main/BaseEntity/BaseEntity.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../../NetVars/NetVars.h" 3 | 4 | #include "AnimState/TFPlayerAnimState.h" //includes class C_BaseCombatWeapon 5 | 6 | class C_BaseEntity 7 | { 8 | public: 9 | void RemoveEffect(byte Effect); 10 | void SetFov(int nFov); 11 | void SetFlags(int nFlags); 12 | void SetTickBase(int n); 13 | void SetRenderAngles(const Vec3& v); 14 | void SetAbsOrigin(const Vec3& v); 15 | void SetAbsAngles(const Vec3& v); 16 | void SetCurrentCmd(C_UserCmd* cmd); 17 | void SetVecOrigin(Vec3& vOrigin); 18 | void GetRenderBounds(Vec3& vMins, Vec3& vMaxs); 19 | void UpdateGlowEffect(); 20 | void UpTickBase(); 21 | void UpdateClientSideAnimation(); 22 | void IncreaseTickBase(); 23 | void* GetThrower(); 24 | int DrawModel(int flags); 25 | int GetClassId(); 26 | int GetMaxHealth(); 27 | int GetHealth(); 28 | int GetTeamNum(); 29 | int GetFlags(); 30 | int GetIndex(); 31 | int GetOwner(); 32 | int GetAmmo(); 33 | int GetHitboxSet(); 34 | int GetTickBase(); 35 | int GetType(); 36 | int GetChockedTicks(); 37 | int GetNumOfHitboxes(); 38 | int GetFov(); 39 | int GetObserverTarget(); 40 | int GetObserverMode(); 41 | float GetSurfaceFriction(); 42 | float GetMaxSpeed(); 43 | float GetWaterJumpTime(); 44 | float GetDamageRadius(); 45 | float flSimulationTime(); 46 | float GetNextAttack(); 47 | float GetStepSize(); 48 | float GetConveyorSpeed(); 49 | const Vec3& GetRenderAngles(); 50 | const Vec3& GetAbsOrigin(); 51 | const Vec3& GetAbsAngles(); 52 | Vec3 GetViewOffset(); 53 | Vec3 GetEyePosition(); 54 | Vec3 GetVecOrigin(); 55 | Vec3 GetWorldSpaceCenter(); 56 | Vec3 GetHitboxPos(int nHitbox); 57 | Vec3 GetBonePos(int nBone); 58 | Vec3 GetCollideableMins(); 59 | Vec3 GetCollideableMaxs(); 60 | Vec3 GetVelocity(); 61 | Vec3 GetPunchAngles(); 62 | BYTE GetLifeState(); 63 | C_BaseEntity* FirstMoveChild(); 64 | C_BaseEntity* NextMovePeer(); 65 | C_BaseEntity* GetGroundEntity(); 66 | C_ClientClass* GetClientClass(); 67 | MoveType_t GetMoveType(); 68 | C_BaseCombatWeapon* GetActiveWeapon(); 69 | C_UserCmd* GetCurrentCommand(); 70 | model_t* GetModel(); 71 | matrix3x4& GetRgflCoordinateFrame(); 72 | std::array GetPoseParam(); 73 | bool GetHitboxMinsAndMaxsAndMatrix(int nHitbox, Vec3& mins, Vec3& maxs, matrix3x4& matrix, Vec3* center); 74 | bool GetHitboxMinsAndMaxs(int nHitbox, Vec3& mins, Vec3& maxs, Vec3* center); 75 | bool IsPlayerOnSteamFriendList(C_BaseEntity* pEntity); 76 | bool SetupBones(matrix3x4* pBoneToWorldOut, int nMaxBones, int nBoneMask, float fCurrentTime); 77 | bool IsBaseCombatWeapon(); 78 | bool IsWearable(); 79 | bool IsInValidTeam(); 80 | bool GetTouched(); 81 | bool IsDormant(); 82 | bool IsOnGround(); 83 | bool IsInWater(); 84 | bool IsAlive(); 85 | bool IsDucking(); 86 | bool IsPlayer(); 87 | const char* GetModelName(); 88 | }; -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamUGC001.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMUGC001_H 18 | #define ISTEAMUGC001_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "UGCCommon.h" 25 | 26 | abstract_class ISteamUGC001 27 | { 28 | public: 29 | 30 | virtual UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) = 0; 31 | 32 | virtual UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) = 0; 33 | 34 | virtual SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) = 0; 35 | 36 | virtual bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails) = 0; 37 | 38 | // Release the request to free up memory, after retrieving results 39 | virtual bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) = 0; 40 | 41 | virtual bool AddRequiredTag(UGCQueryHandle_t handle, const char *pTagName) = 0; 42 | virtual bool AddExcludedTag(UGCQueryHandle_t handle, const char *pTagName) = 0; 43 | virtual bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) = 0; 44 | virtual bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) = 0; 45 | 46 | virtual bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char *pMatchCloudFileName) = 0; 47 | 48 | virtual bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) = 0; 49 | virtual bool SetSearchText(UGCQueryHandle_t handle, const char *pSearchText) = 0; 50 | virtual bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) = 0; 51 | 52 | virtual SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID) = 0; 53 | }; 54 | 55 | #endif // ISTEAMUGC001_H 56 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/GameServerStatsCommon.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef GAMESERVERSTATSCOMMON_H 18 | #define GAMESERVERSTATSCOMMON_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #define CLIENTGAMESERVERSTATS_INTERFACE_VERSION "CLIENTGAMESERVERSTATS_INTERFACE_VERSION001" 24 | 25 | #define STEAMGAMESERVERSTATS_INTERFACE_VERSION_001 "SteamGameServerStats001" 26 | 27 | #pragma pack( push, 8 ) 28 | //----------------------------------------------------------------------------- 29 | // Purpose: called when the latests stats and achievements have been received 30 | // from the server 31 | //----------------------------------------------------------------------------- 32 | struct GSStatsReceived_t 33 | { 34 | enum { k_iCallback = k_iSteamGameServerStatsCallbacks }; 35 | 36 | EResult m_eResult; // Success / error fetching the stats 37 | CSteamID m_steamIDUser; // The user for whom the stats are retrieved for 38 | }; 39 | 40 | //----------------------------------------------------------------------------- 41 | // Purpose: result of a request to store the user stats for a game 42 | //----------------------------------------------------------------------------- 43 | struct GSStatsStored_t 44 | { 45 | enum { k_iCallback = k_iSteamGameServerStatsCallbacks + 1 }; 46 | 47 | EResult m_eResult; // success / error 48 | CSteamID m_steamIDUser; // The user for whom the stats were stored 49 | }; 50 | 51 | //----------------------------------------------------------------------------- 52 | // Purpose: Callback indicating that a user's stats have been unloaded. 53 | // Call RequestUserStats again to access stats for this user 54 | //----------------------------------------------------------------------------- 55 | struct GSStatsUnloaded_t 56 | { 57 | enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 }; 58 | 59 | CSteamID m_steamIDUser; // User whose stats have been unloaded 60 | }; 61 | 62 | #pragma pack( pop ) 63 | 64 | #endif // GAMESERVERSTATSCOMMON_H 65 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamUtils002.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMUTILS002_H 18 | #define ISTEAMUTILS002_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "UtilsCommon.h" 25 | 26 | //----------------------------------------------------------------------------- 27 | // Purpose: interface to user independent utility functions 28 | //----------------------------------------------------------------------------- 29 | abstract_class ISteamUtils002 30 | { 31 | public: 32 | // return the number of seconds since the user 33 | virtual uint32 GetSecondsSinceAppActive() = 0; 34 | virtual uint32 GetSecondsSinceComputerActive() = 0; 35 | 36 | // the universe this client is connecting to 37 | virtual EUniverse GetConnectedUniverse() = 0; 38 | 39 | // Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time) 40 | virtual uint32 GetServerRealTime() = 0; 41 | 42 | // returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) 43 | // e.g "US" or "UK". 44 | virtual const char *GetIPCountry() = 0; 45 | 46 | // returns true if the image exists, and valid sizes were filled out 47 | virtual bool GetImageSize(int iImage, uint32 *pnWidth, uint32 *pnHeight) = 0; 48 | 49 | // returns true if the image exists, and the buffer was successfully filled out 50 | // results are returned in RGBA format 51 | // the destination buffer size should be 4 * height * width * sizeof(char) 52 | virtual bool GetImageRGBA(int iImage, uint8 *pubDest, int nDestBufferSize) = 0; 53 | 54 | // returns the IP of the reporting server for valve - currently only used in Source engine games 55 | virtual bool GetCSERIPPort(uint32 *unIP, uint16 *usPort) = 0; 56 | 57 | // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power 58 | virtual uint8 GetCurrentBatteryPower() = 0; 59 | }; 60 | 61 | #endif // ISTEAMUTILS002_H 62 | -------------------------------------------------------------------------------- /SourceEngine/SourceEngine/SDK/Interfaces/Steam/ISteamUGC002.h: -------------------------------------------------------------------------------- 1 | //========================== Open Steamworks ================================ 2 | // 3 | // This file is part of the Open Steamworks project. All individuals associated 4 | // with this project do not claim ownership of the contents 5 | // 6 | // The code, comments, and all related files, projects, resources, 7 | // redistributables included with this project are Copyright Valve Corporation. 8 | // Additionally, Valve, the Valve logo, Half-Life, the Half-Life logo, the 9 | // Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, 10 | // Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the 11 | // Counter-Strike logo, Source, the Source logo, and Counter-Strike Condition 12 | // Zero are trademarks and or registered trademarks of Valve Corporation. 13 | // All other trademarks are property of their respective owners. 14 | // 15 | //============================================================================= 16 | 17 | #ifndef ISTEAMUGC002_H 18 | #define ISTEAMUGC002_H 19 | #ifdef _WIN32 20 | #pragma once 21 | #endif 22 | 23 | #include "SteamTypes.h" 24 | #include "UGCCommon.h" 25 | 26 | abstract_class ISteamUGC002 27 | { 28 | public: 29 | 30 | virtual UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) = 0; 31 | 32 | virtual UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage) = 0; 33 | 34 | virtual SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) = 0; 35 | 36 | virtual bool GetQueryUGCResult(UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails) = 0; 37 | 38 | // Release the request to free up memory, after retrieving results 39 | virtual bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) = 0; 40 | 41 | virtual bool AddRequiredTag(UGCQueryHandle_t handle, const char *pTagName) = 0; 42 | virtual bool AddExcludedTag(UGCQueryHandle_t handle, const char *pTagName) = 0; 43 | virtual bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) = 0; 44 | virtual bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) = 0; 45 | 46 | virtual bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint32 uUnk) = 0; 47 | 48 | virtual bool SetCloudFileNameFilter(UGCQueryHandle_t handle, const char *pMatchCloudFileName) = 0; 49 | 50 | virtual bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) = 0; 51 | virtual bool SetSearchText(UGCQueryHandle_t handle, const char *pSearchText) = 0; 52 | virtual bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint32 unDays) = 0; 53 | 54 | virtual SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint32 uUnk) = 0; 55 | }; 56 | 57 | #endif // ISTEAMUGC002_H 58 | --------------------------------------------------------------------------------