Update some SDK headers
This commit is contained in:
parent
3cdfd39448
commit
b945425f1a
2
external/source-sdk-2013-headers
vendored
2
external/source-sdk-2013-headers
vendored
@ -1 +1 @@
|
||||
Subproject commit c80b09c1b6f40dc58b0a1d408832abb2b027d897
|
||||
Subproject commit a2b2bf54816ec2ad780f4b5a509e53e4a3f58fba
|
@ -20,6 +20,7 @@ class ILocalize;
|
||||
|
||||
class IToolFrameworkInternal;
|
||||
class ISteamClient;
|
||||
class ISteamNetworkingSockets;
|
||||
class ISteamFriends;
|
||||
class IVEngineClient013;
|
||||
class IClientEntityList;
|
||||
@ -62,6 +63,7 @@ extern TFGCClientSystem *g_TFGCClientSystem;
|
||||
extern CHud *g_CHUD;
|
||||
extern ISteamClient *g_ISteamClient;
|
||||
extern ISteamFriends *g_ISteamFriends;
|
||||
extern ISteamNetworkingSockets *g_ISteamNetworkingSockets;
|
||||
extern IVEngineClient013 *g_IEngine;
|
||||
extern void *demoplayer;
|
||||
extern IEngineSound *g_ISoundEngine;
|
||||
|
@ -18,46 +18,47 @@
|
||||
|
||||
// class ISteamFriends002;
|
||||
|
||||
IVModelRender *g_IVModelRender = nullptr;
|
||||
ISteamClient *g_ISteamClient = nullptr;
|
||||
ISteamFriends *g_ISteamFriends = nullptr;
|
||||
IVEngineClient013 *g_IEngine = nullptr;
|
||||
void *demoplayer = nullptr;
|
||||
IEngineSound *g_ISoundEngine = nullptr;
|
||||
vgui::ISurface *g_ISurface = nullptr;
|
||||
vgui::IPanel *g_IPanel = nullptr;
|
||||
vgui::ILocalize *g_ILocalize = nullptr;
|
||||
IClientEntityList *g_IEntityList = nullptr;
|
||||
ICvar *g_ICvar = nullptr;
|
||||
IGameEventManager2 *g_IEventManager2 = nullptr;
|
||||
IBaseClientDLL *g_IBaseClient = nullptr;
|
||||
IEngineTrace *g_ITrace = nullptr;
|
||||
IVModelInfoClient *g_IModelInfo = nullptr;
|
||||
IInputSystem *g_IInputSystem = nullptr;
|
||||
CGlobalVarsBase **rg_GlobalVars = nullptr;
|
||||
IPrediction *g_IPrediction = nullptr;
|
||||
IGameMovement *g_IGameMovement = nullptr;
|
||||
IInput *g_IInput = nullptr;
|
||||
ISteamUser *g_ISteamUser = nullptr;
|
||||
IAchievementMgr *g_IAchievementMgr = nullptr;
|
||||
ISteamUserStats *g_ISteamUserStats = nullptr;
|
||||
IStudioRender *g_IStudioRender = nullptr;
|
||||
IVDebugOverlay *g_IVDebugOverlay = nullptr;
|
||||
IMaterialSystemFixed *g_IMaterialSystem = nullptr;
|
||||
IVRenderView *g_IVRenderView = nullptr;
|
||||
IMaterialSystem *g_IMaterialSystemHL = nullptr;
|
||||
IMoveHelperServer *g_IMoveHelperServer = nullptr;
|
||||
CBaseClientState *g_IBaseClientState = nullptr;
|
||||
IGameEventManager *g_IGameEventManager = nullptr;
|
||||
TFGCClientSystem *g_TFGCClientSystem = nullptr;
|
||||
CHud *g_CHUD = nullptr;
|
||||
CGameRules *g_pGameRules = nullptr;
|
||||
IEngineVGui *g_IEngineVGui = nullptr;
|
||||
IUniformRandomStream *g_pUniformStream = nullptr;
|
||||
int *g_PredictionRandomSeed = nullptr;
|
||||
IFileSystem *g_IFileSystem = nullptr;
|
||||
IMDLCache *g_IMDLCache = nullptr;
|
||||
IToolFrameworkInternal *g_IToolFramework = nullptr;
|
||||
IVModelRender *g_IVModelRender = nullptr;
|
||||
ISteamClient *g_ISteamClient = nullptr;
|
||||
ISteamFriends *g_ISteamFriends = nullptr;
|
||||
ISteamNetworkingSockets *g_ISteamNetworkingSockets = nullptr;
|
||||
IVEngineClient013 *g_IEngine = nullptr;
|
||||
void *demoplayer = nullptr;
|
||||
IEngineSound *g_ISoundEngine = nullptr;
|
||||
vgui::ISurface *g_ISurface = nullptr;
|
||||
vgui::IPanel *g_IPanel = nullptr;
|
||||
vgui::ILocalize *g_ILocalize = nullptr;
|
||||
IClientEntityList *g_IEntityList = nullptr;
|
||||
ICvar *g_ICvar = nullptr;
|
||||
IGameEventManager2 *g_IEventManager2 = nullptr;
|
||||
IBaseClientDLL *g_IBaseClient = nullptr;
|
||||
IEngineTrace *g_ITrace = nullptr;
|
||||
IVModelInfoClient *g_IModelInfo = nullptr;
|
||||
IInputSystem *g_IInputSystem = nullptr;
|
||||
CGlobalVarsBase **rg_GlobalVars = nullptr;
|
||||
IPrediction *g_IPrediction = nullptr;
|
||||
IGameMovement *g_IGameMovement = nullptr;
|
||||
IInput *g_IInput = nullptr;
|
||||
ISteamUser *g_ISteamUser = nullptr;
|
||||
IAchievementMgr *g_IAchievementMgr = nullptr;
|
||||
ISteamUserStats *g_ISteamUserStats = nullptr;
|
||||
IStudioRender *g_IStudioRender = nullptr;
|
||||
IVDebugOverlay *g_IVDebugOverlay = nullptr;
|
||||
IMaterialSystemFixed *g_IMaterialSystem = nullptr;
|
||||
IVRenderView *g_IVRenderView = nullptr;
|
||||
IMaterialSystem *g_IMaterialSystemHL = nullptr;
|
||||
IMoveHelperServer *g_IMoveHelperServer = nullptr;
|
||||
CBaseClientState *g_IBaseClientState = nullptr;
|
||||
IGameEventManager *g_IGameEventManager = nullptr;
|
||||
TFGCClientSystem *g_TFGCClientSystem = nullptr;
|
||||
CHud *g_CHUD = nullptr;
|
||||
CGameRules *g_pGameRules = nullptr;
|
||||
IEngineVGui *g_IEngineVGui = nullptr;
|
||||
IUniformRandomStream *g_pUniformStream = nullptr;
|
||||
int *g_PredictionRandomSeed = nullptr;
|
||||
IFileSystem *g_IFileSystem = nullptr;
|
||||
IMDLCache *g_IMDLCache = nullptr;
|
||||
IToolFrameworkInternal *g_IToolFramework = nullptr;
|
||||
|
||||
template <typename T> T *BruteforceInterface(std::string name, sharedobj::SharedObject &object, int start = 0)
|
||||
{
|
||||
@ -87,6 +88,8 @@ template <typename T> T *BruteforceInterface(std::string name, sharedobj::Shared
|
||||
extern "C" typedef HSteamPipe (*GetHSteamPipe_t)();
|
||||
extern "C" typedef HSteamUser (*GetHSteamUser_t)();
|
||||
|
||||
extern "C" typedef void *(*SteamInternal_FindOrCreateUserInterface_t)(HSteamUser, const char *);
|
||||
|
||||
void CreateEarlyInterfaces()
|
||||
{
|
||||
g_IFileSystem = BruteforceInterface<IFileSystem>("VFileSystem", sharedobj::filesystem_stdio());
|
||||
@ -124,6 +127,8 @@ void CreateInterfaces()
|
||||
}
|
||||
logging::Info("Inited SteamAPI");
|
||||
|
||||
g_ISteamNetworkingSockets = (ISteamNetworkingSockets *) reinterpret_cast<SteamInternal_FindOrCreateUserInterface_t>(dlsym(sharedobj::steamapi().lmap, "SteamInternal_FindOrCreateUserInterface"))(su, "SteamNetworkingSockets009");
|
||||
|
||||
g_IVModelRender = BruteforceInterface<IVModelRender>("VEngineModel", sharedobj::engine(), 16);
|
||||
g_ISteamFriends = nullptr;
|
||||
g_IEngineVGui = BruteforceInterface<IEngineVGui>("VEngineVGui", sharedobj::engine());
|
||||
|
@ -32,7 +32,7 @@ static settings::Boolean enable_africa{ "dc.toggle-africa", "false" };
|
||||
|
||||
typedef std::array<char, 5> CidStr_t;
|
||||
|
||||
struct SteamNetworkingPOPID
|
||||
struct SteamNetworkingPOPID_decl
|
||||
{
|
||||
unsigned v;
|
||||
/* 'out' must point to array with capacity at least 5 */
|
||||
@ -95,7 +95,7 @@ static std::vector<std::string> africa_datacenters = { { "jnb" } };
|
||||
|
||||
static CatCommand print("dc_print", "Print codes of all available data centers", []() {
|
||||
static auto GetPOPCount = *(int (**)(void *))(*(uintptr_t *) g_ISteamNetworkingUtils + 37);
|
||||
static auto GetPOPList = *(int (**)(void *, SteamNetworkingPOPID *, int))(*(uintptr_t *) g_ISteamNetworkingUtils + 41);
|
||||
static auto GetPOPList = *(int (**)(void *, SteamNetworkingPOPID_decl *, int))(*(uintptr_t *) g_ISteamNetworkingUtils + 41);
|
||||
|
||||
char region[5];
|
||||
|
||||
@ -105,7 +105,7 @@ static CatCommand print("dc_print", "Print codes of all available data centers",
|
||||
g_ICvar->ConsoleColorPrintf(MENU_COLOR, "List of regions is not available yet\n");
|
||||
return;
|
||||
}
|
||||
SteamNetworkingPOPID *list = new SteamNetworkingPOPID[count];
|
||||
SteamNetworkingPOPID_decl *list = new SteamNetworkingPOPID_decl[count];
|
||||
GetPOPList(g_ISteamNetworkingUtils, list, count);
|
||||
|
||||
auto it = list;
|
||||
@ -156,8 +156,8 @@ static void OnRegionsUpdate(std::string regions)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
static int (*o_GetDirectPingToPOP)(void *self, SteamNetworkingPOPID cid);
|
||||
static int h_GetDirectPingToPOP(void *self, SteamNetworkingPOPID cid)
|
||||
static int (*o_GetDirectPingToPOP)(void *self, SteamNetworkingPOPID_decl cid);
|
||||
static int h_GetDirectPingToPOP(void *self, SteamNetworkingPOPID_decl cid)
|
||||
{
|
||||
CidStr_t cidStr;
|
||||
|
||||
|
Reference in New Issue
Block a user