Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EmuSDK/CUserCmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define IN_RELOAD (1 << 13)
#define IN_ALT1 (1 << 14)
#define IN_ALT2 (1 << 15)
#define IN_SCORE (1 << 16) // Used by client.dll for when scoreboard is held down
#define IN_SCORE (1 << 16) // Used by client_panorama.dll for when scoreboard is held down
#define IN_SPEED (1 << 17) // Player is holding the speed key
#define IN_WALK (1 << 18) // Player holding walk key
#define IN_ZOOM (1 << 19) // Zoom key for HUD zoom
Expand Down
31 changes: 31 additions & 0 deletions EmuSDK/EmuSDK.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EmuSDK", "EmuSDK.vcxproj", "{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Debug|x64.ActiveCfg = Debug|x64
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Debug|x64.Build.0 = Debug|x64
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Debug|x86.ActiveCfg = Debug|Win32
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Debug|x86.Build.0 = Debug|Win32
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Release|x64.ActiveCfg = Release|x64
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Release|x64.Build.0 = Release|x64
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Release|x86.ActiveCfg = Release|Win32
{AEF24743-9D8D-4B0C-8ECB-9DEC020976D9}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F129A25E-973C-49E8-9E01-A5656C6C39C3}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion EmuSDK/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class IVEngineClient
}
}; extern IVEngineClient* g_pEngine;

/* conveniently placed client.dll interface don't mind me */
/* conveniently placed client_panorama.dll interface don't mind me */
class IClientEntityList
{
private:
Expand Down
10 changes: 5 additions & 5 deletions EmuSDK/SDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ void CSDK::Initialize()

g_pUtils->Log(" Attempting to locate and attach interfaces to the game engine...");

g_pClient = SeekInterface<IBaseClientDLL>("client.dll", "VClient");
g_pClient = SeekInterface<IBaseClientDLL>("client_panorama.dll", "VClient");
g_pEngine = SeekInterface<IVEngineClient>("engine.dll", "VEngineClient");
g_pEntList = SeekInterface<IClientEntityList>("client.dll", "VClientEntityList");
g_pEntList = SeekInterface<IClientEntityList>("client_panorama.dll", "VClientEntityList");
g_pEngineTrace = SeekInterface<IEngineTrace>("engine.dll", "EngineTraceClient");
g_pModelInfo = SeekInterface<IVModelInfo>("engine.dll", "VModelInfoClient");
g_pDebugOverlay = SeekInterface <IVDebugOverlay > ("engine.dll", "VDebugOverlay");
g_pConsole = SeekInterface<ICVar>("vstdlib.dll", "VEngineCvar");
g_pVGUISurface = SeekInterface<ISurface>("vguimatsurface.dll", "VGUI_Surface");
g_pPhysicsAPI = SeekInterface<IPhysicsAPI>("vphysics.dll", "VPhysicsSurfaceProps");
g_pPrediction = SeekInterface<IPrediction>("client.dll", "VClientPrediction");
g_pGameMovement = SeekInterface<IGameMovement>("client.dll", "GameMovement");
g_pPrediction = SeekInterface<IPrediction>("client_panorama.dll", "VClientPrediction");
g_pGameMovement = SeekInterface<IGameMovement>("client_panorama.dll", "GameMovement");
g_pMaterialSystem = SeekInterface<IMaterialSystem>("materialsystem.dll", "VMaterialSystem");
g_pGameEventManager = SeekInterface<IGameEventManager2>("engine.dll", "GAMEEVENTSMANAGER002", false);
g_pModelRender = SeekInterface<IVModelRender>("engine.dll", "VEngineModel");
Expand All @@ -112,7 +112,7 @@ void CSDK::Initialize()
g_pInput = **reinterpret_cast<CInput***>((*(uintptr_t**)g_pClient)[15] + 0x1); // IN_something + 1 = input ptr
/* shoutout to @snorflake btw */

g_pMoveHelper = **reinterpret_cast<IMoveHelper***>(g_pUtils->FindPatternIDA("client.dll", "8B 0D ? ? ? ? 8B 46 08 68") + 2);
g_pMoveHelper = **reinterpret_cast<IMoveHelper***>(g_pUtils->FindPatternIDA("client_panorama.dll", "8B 0D ? ? ? ? 8B 46 08 68") + 2);

if (!g_pMoveHelper)
{
Expand Down
4 changes: 2 additions & 2 deletions EmuSDK/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ using LoadFromBufferFn = void(__thiscall*)(void* thisptr, const char* resourceNa

void CUtils::InitKeyValues(KeyValues* pKeyValues, const char* name)
{
InitKeyValuesFn InitKeyValuesEx = reinterpret_cast<InitKeyValuesFn>(FindPatternIDA("client.dll", "55 8B EC 51 33 C0 C7 45"));
InitKeyValuesFn InitKeyValuesEx = reinterpret_cast<InitKeyValuesFn>(FindPatternIDA("client_panorama.dll", "55 8B EC 51 33 C0 C7 45"));
InitKeyValuesEx(pKeyValues, name);
}

void CUtils::LoadFromBuffer(KeyValues* pKeyValues, const char* resourceName, const char* pBuffer, void* pFileSystem, const char* pPathID, void* pfnEvaluateSymbolProc)
{
LoadFromBufferFn LoadFromBufferEx = reinterpret_cast<LoadFromBufferFn>(FindPatternIDA("client.dll", "55 8B EC 83 E4 F8 83 EC 34 53 8B 5D 0C 89 4C 24 04"));
LoadFromBufferFn LoadFromBufferEx = reinterpret_cast<LoadFromBufferFn>(FindPatternIDA("client_panorama.dll", "55 8B EC 83 E4 F8 83 EC 34 53 8B 5D 0C 89 4C 24 04"));
LoadFromBufferEx(pKeyValues, resourceName, pBuffer, pFileSystem, pPathID, pfnEvaluateSymbolProc);
}