File tree Expand file tree Collapse file tree 6 files changed +23
-45
lines changed Expand file tree Collapse file tree 6 files changed +23
-45
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ namespace Hooks
95
95
SymbolFinder symfinder;
96
96
97
97
ProcessMessages_original =
98
- reinterpret_cast <ProcessMessages_t>( symfinder.ResolveOnBinary (
99
- global::engine_lib. c_str ( ),
98
+ reinterpret_cast <ProcessMessages_t>( symfinder.Resolve (
99
+ global::engine_loader. GetModuleLoader ( ). GetModule ( ),
100
100
ProcessMessages_sig,
101
101
ProcessMessages_siglen
102
102
) );
Original file line number Diff line number Diff line change 24
24
#endif
25
25
26
26
#include < scanning/symbolfinder.hpp>
27
- #include < GarrysMod/Interfaces.hpp>
28
27
#include < interface.h>
29
28
#include < eiface.h>
30
29
#include < cdll_int.h>
@@ -62,32 +61,13 @@ namespace global
62
61
63
62
static bool loaded = false ;
64
63
65
- const std::string engine_lib = Helpers::GetBinaryFileName(
66
- " engine" ,
67
- false ,
68
- IS_SERVERSIDE,
69
- " bin/"
70
- );
71
-
72
- const std::string client_lib = Helpers::GetBinaryFileName(
73
- " client" ,
74
- false ,
75
- IS_SERVERSIDE,
76
- " garrysmod/bin/"
77
- );
78
-
79
- const std::string server_lib = Helpers::GetBinaryFileName(
80
- " server" ,
81
- false ,
82
- IS_SERVERSIDE,
83
- " garrysmod/bin/"
84
- );
85
-
86
64
const char *tostring_format = " %s: %p" ;
87
65
88
66
GarrysMod::Lua::ILuaBase *lua = nullptr ;
89
67
90
- SourceSDK::FactoryLoader engine_loader ( engine_lib, false , false );
68
+ const SourceSDK::FactoryLoader engine_loader ( " engine" );
69
+ const SourceSDK::ModuleLoader client_loader ( " client" );
70
+ const SourceSDK::ModuleLoader server_loader ( " server" );
91
71
92
72
IVEngineServer *engine_server = nullptr ;
93
73
IVEngineClient *engine_client = nullptr ;
@@ -178,8 +158,10 @@ GMOD_MODULE_OPEN( )
178
158
{
179
159
SymbolFinder symfinder;
180
160
181
- pserver = reinterpret_cast <IServer **>( symfinder.ResolveOnBinary (
182
- global::engine_lib.c_str ( ), global::IServer_sig, global::IServer_siglen
161
+ pserver = reinterpret_cast <IServer **>( symfinder.Resolve (
162
+ global::engine_loader.GetModuleLoader ( ).GetModule ( ),
163
+ global::IServer_sig,
164
+ global::IServer_siglen
183
165
) );
184
166
}
185
167
Original file line number Diff line number Diff line change 4
4
#include < lua.hpp>
5
5
#include < stdint.h>
6
6
#include < string>
7
- #include < GarrysMod/Interfaces .hpp>
7
+ #include < GarrysMod/FactoryLoader .hpp>
8
8
#include < Platform.hpp>
9
9
10
10
class IVEngineServer ;
@@ -21,17 +21,13 @@ namespace GarrysMod
21
21
22
22
namespace global
23
23
{
24
- extern const std::string engine_lib;
25
-
26
- extern const std::string client_lib;
27
-
28
- extern const std::string server_lib;
29
-
30
24
extern const char *tostring_format;
31
25
32
26
extern GarrysMod::Lua::ILuaBase *lua;
33
27
34
- extern SourceSDK::FactoryLoader engine_loader;
28
+ extern const SourceSDK::FactoryLoader engine_loader;
29
+ extern const SourceSDK::ModuleLoader client_loader;
30
+ extern const SourceSDK::ModuleLoader server_loader;
35
31
36
32
extern IVEngineServer *engine_server;
37
33
Original file line number Diff line number Diff line change @@ -434,14 +434,14 @@ namespace NetMessage
434
434
{
435
435
SymbolFinder symfinder;
436
436
437
- CBaseClient_ConnectionStart = static_cast <const uint8_t *>( symfinder.ResolveOnBinary (
438
- global::engine_lib. c_str ( ),
437
+ CBaseClient_ConnectionStart = static_cast <const uint8_t *>( symfinder.Resolve (
438
+ global::engine_loader. GetModuleLoader ( ). GetModule ( ),
439
439
CBaseClient_ConnectionStart_sig,
440
440
CBaseClient_ConnectionStart_siglen
441
441
) );
442
442
443
- CBaseClientState_ConnectionStart = static_cast <const uint8_t *>( symfinder.ResolveOnBinary (
444
- global::engine_lib. c_str ( ),
443
+ CBaseClientState_ConnectionStart = static_cast <const uint8_t *>( symfinder.Resolve (
444
+ global::engine_loader. GetModuleLoader ( ). GetModule ( ),
445
445
CBaseClientState_ConnectionStart_sig,
446
446
CBaseClientState_ConnectionStart_siglen,
447
447
// starting point for sigscan
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ namespace DataPack
25
25
SymbolFinder symfinder;
26
26
27
27
SendFileToClient_original =
28
- reinterpret_cast <SendFileToClient_t>( symfinder.ResolveOnBinary (
29
- global::server_lib. c_str ( ),
28
+ reinterpret_cast <SendFileToClient_t>( symfinder.Resolve (
29
+ global::server_loader. GetModule ( ),
30
30
SendFileToClient_sig,
31
31
SendFileToClient_siglen
32
32
) );
Original file line number Diff line number Diff line change @@ -33,17 +33,17 @@ namespace GameTags
33
33
SymbolFinder symfinder;
34
34
35
35
RecalculateTags_original =
36
- reinterpret_cast <RecalculateTags_t>( symfinder.ResolveOnBinary (
37
- global::engine_lib. c_str ( ),
36
+ reinterpret_cast <RecalculateTags_t>( symfinder.Resolve (
37
+ global::engine_loader. GetModuleLoader ( ). GetModule ( ),
38
38
RecalculateTags_sig,
39
39
RecalculateTags_siglen
40
40
) );
41
41
42
42
#if defined SYSTEM_WINDOWS
43
43
44
44
CSteamGameServerAPIContext **gameserver_context_pointer =
45
- reinterpret_cast <CSteamGameServerAPIContext **>( symfinder.ResolveOnBinary (
46
- global::server_lib. c_str ( ),
45
+ reinterpret_cast <CSteamGameServerAPIContext **>( symfinder.Resolve (
46
+ global::server_loader. GetModule ( ),
47
47
SteamGameServerAPIContext_sig,
48
48
SteamGameServerAPIContext_siglen
49
49
) );
You can’t perform that action at this time.
0 commit comments