Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <playerinfomanager.h>
- IClientEntityList *entitylist;
- IVModelRender *modelrender;
- IVEngineClient *engine;
- IVEfx *effects;
- IVRenderView *render;
- IVDebugOverlay *debugoverlay;
- IMaterialSystemStub *materials_stub;
- IDataCache *datacache;
- IVModelInfoClient *modelinfo;
- IEngineVGui *enginevgui;
- ISpatialPartition* partition;
- IBaseClientDLL *clientdll;
- IFileSystem *filesystem;
- IStaticPropMgrClient *staticpropmgr;
- IShadowMgr *shadowmgr;
- IUniformRandomStream *random;
- CGaussianRandomStream *randomgaussian;
- IEngineSound *enginesound;
- IEngineTrace *enginetrace;
- IGameUIFuncs *gameuifuncs;
- IGameEventManager2 *gameeventmanager;
- IPhysicsGameTrace *physgametrace;
- CGlobalVarsBase *gpGlobals;
- IClientTools *clienttools;
- IInputSystem *inputsystem;
- ISceneFileCache *scenefilecache;
- IMatchmaking *matchmaking;
- IAvi *avi;
- IBik *bik;
- IUploadGameStats *gamestatsuploader;
- CSteamAPIContext *steamapicontext;
- CInput* m_pInput;
- CClientEntityList * cl_entitylist;
- CBaseEntityList * g_pEntityList;
- IPhysicsSurfaceProps* physprops;
- IPlayerInfoManager* playerinfomanager;
- void Interfaces_Load()
- {
- CreateInterfaceFn sf, vf, ef, cf, srvf, mf, srf, vmsf, pf;
- sf = Sys_GetFactory("studiorender.dll");
- vf = Sys_GetFactory("vgui2.dll");
- ef = Sys_GetFactory("engine.dll");
- cf = Sys_GetFactory("client.dll");
- srvf = Sys_GetFactory("server.dll");
- mf = Sys_GetFactory("materialsystem.dll");
- srf = Sys_GetFactory("studiorender.dll");
- vmsf = Sys_GetFactory("vguimatsurface.dll");
- pf = Sys_GetFactory("vphysics.dll");
- CreateInterfaceFn fl[8] = { sf, vf, ef, cf, srvf, mf, srf, vmsf };
- ConnectTier1Libraries(fl, 8);
- ConnectTier2Libraries(fl, 8);
- ConnectTier3Libraries(fl, 8);
- ConVar_Register();
- vgui::VGui_InitInterfacesList("Haskell.dll", fl, 8);
- engine = (IVEngineClient*)ef(VENGINE_CLIENT_INTERFACE_VERSION, NULL);
- clientdll = (IBaseClientDLL*)cf(CLIENT_DLL_INTERFACE_VERSION, NULL);
- studiorender = (IStudioRender*)sf(STUDIO_RENDER_INTERFACE_VERSION, NULL);
- modelrender = (IVModelRender*)ef(VENGINE_HUDMODEL_INTERFACE_VERSION, NULL);
- render = (IVRenderView*)ef(VENGINE_RENDERVIEW_INTERFACE_VERSION, NULL);
- debugoverlay = (IVDebugOverlay*)ef(VDEBUG_OVERLAY_INTERFACE_VERSION, NULL);
- gameeventmanager = (IGameEventManager2*)ef(INTERFACEVERSION_GAMEEVENTSMANAGER2,NULL);
- random = (IUniformRandomStream *)ef(VENGINE_SERVER_RANDOM_INTERFACE_VERSION, NULL);
- enginevgui = (IEngineVGui*)ef(VENGINE_VGUI_VERSION, NULL);
- //g_pMatSystemSurface = (IMatSystemSurface*)vf( MAT_SYSTEM_SURFACE_INTERFACE_VERSION, NULL );
- playerinfomanager = (IPlayerInfoManager*)srvf(INTERFACEVERSION_PLAYERINFOMANAGER, NULL);
- gpGlobals = (CGlobalVars*)playerinfomanager->GetGlobalVars();
- physprops = (IPhysicsSurfaceProps*)pf(VPHYSICS_SURFACEPROPS_INTERFACE_VERSION, NULL);
- random = (IUniformRandomStream*)ef(VENGINE_CLIENT_RANDOM_INTERFACE_VERSION, NULL);
- entitylist = (IClientEntityList*)cf(VCLIENTENTITYLIST_INTERFACE_VERSION, NULL);
- cl_entitylist = dynamic_cast<CClientEntityList*>(entitylist);
- g_pEntityList = dynamic_cast<CBaseEntityList*>(entitylist);
- enginetrace = (IEngineTrace*)ef(INTERFACEVERSION_ENGINETRACE_CLIENT, NULL);
- modelinfo = (IVModelInfoClient*)ef(VMODELINFO_CLIENT_INTERFACE_VERSION, NULL);
- CInput* tmp = NULL;
- DWORD* tmp1 = (DWORD*)clientdll;
- __asm
- {
- pushad
- mov edx, [tmp1];
- mov eax, [edx];
- mov ecx, [eax+0x54];
- mov eax, [ecx+0x28];
- mov ecx, [eax];
- mov tmp, ecx;
- popad
- }
- m_pInput = tmp;
- }
Advertisement
Add Comment
Please, Sign In to add comment