Skip to content

Commit

Permalink
Removes ClientDisconnect from the function finder, since it's unused.…
Browse files Browse the repository at this point in the history
… This fixes minqlx not working with the latest QLDS build.
  • Loading branch information
MinoMino committed Jun 7, 2016
1 parent f4afa59 commit 3d021f3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ G_AddEvent_ptr G_AddEvent;
G_InitGame_ptr G_InitGame;
CheckPrivileges_ptr CheckPrivileges;
ClientConnect_ptr ClientConnect;
ClientDisconnect_ptr ClientDisconnect;
ClientSpawn_ptr ClientSpawn;

// VM global variables.
Expand Down Expand Up @@ -294,14 +293,6 @@ void SearchVmFunctions(void) {
}
else DebugPrint("ClientConnect: %p\n", ClientConnect);

ClientDisconnect = (ClientDisconnect_ptr)PatternSearch((void*)((pint)qagame + 0xB000),
0xB0000, PTRN_CLIENTDISCONNECT, MASK_CLIENTDISCONNECT);
if (ClientDisconnect == NULL) {
DebugPrint("ERROR: Unable to find ClientDisconnect.\n");
failed = 1;
}
else DebugPrint("ClientDisconnect: %p\n", ClientDisconnect);

ClientSpawn = (ClientSpawn_ptr)PatternSearch((void*)((pint)qagame + 0xB000),
0xB0000, PTRN_CLIENTSPAWN, MASK_CLIENTSPAWN);
if (ClientSpawn == NULL) {
Expand Down
2 changes: 0 additions & 2 deletions patterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
#define MASK_CHECKPRIVILEGES "XXXX----XXXXXX----XXXXXXXXXXXXXXXXX----X-XXX----"
#define PTRN_CLIENTCONNECT "\x41\x57\x4c\x63\xff\x41\x56\x41\x89\xf6\x41\x55\x41\x54\x55\x4c\x89\xfd\x48\xc1\xe5\x00\x53\x89\xfb\x48\x81\xec\x00\x00\x00\x00\x4c\x8b\x2d\x00\x00\x00\x00\x64\x48\x8b\x04\x25\x00\x00\x00\x00"
#define MASK_CLIENTCONNECT "XXXXXXXXXXXXXXXXXXXXX-XXXXXX----XXX----XXXXX----"
#define PTRN_CLIENTDISCONNECT "\x41\x57\x41\x56\x41\x55\x41\x89\xfd\x41\x54\x4c\x63\xe7\x49\x69\xfc\x00\x00\x00\x00\x55\x53\x00\x83\xec\x48\x4c\x8b\x35\x00\x00\x00\x00\x49\x03\x3e\x83\x7f\x04\x00\x74\x00\xba\x00\x00\x00\x00\x31\xf6"
#define MASK_CLIENTDISCONNECT "XXXXXXXXXXXXXXXXX----XX-XXXXXX----XXXXXX-X-X----XX"
#define PTRN_GETCLIENTNAME "\x48\x83\xec\x00\x48\x8b\x05\x00\x00\x00\x00\x48\x63\xf7\x48\x69\xf6\x00\x00\x00\x00\x48\x8d\x3d\x00\x00\x00\x00\x48\x03\x30\x31\xc0\x48\x81\xc6\x00\x00\x00\x00\xe8\x00\x00\x00\x00"
#define MASK_GETCLIENTNAME "XXX-XXX----XXXXXX----XXX----XXXXXXXX----X----"

Expand Down
2 changes: 0 additions & 2 deletions quake_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,6 @@ typedef void (__cdecl *G_AddEvent_ptr)(gentity_t* ent, int event, int eventParm)
typedef void (__cdecl *G_InitGame_ptr)(int levelTime, int randomSeed, int restart);
typedef int (__cdecl *CheckPrivileges_ptr)(gentity_t* ent, char* cmd);
typedef char* (__cdecl *ClientConnect_ptr)(int clientNum, qboolean firstTime, qboolean isBot);
typedef void (__cdecl *ClientDisconnect_ptr)(int clientNum);
typedef void (__cdecl *ClientSpawn_ptr)(gentity_t* ent);

// Some of them are initialized by Initialize(), but not all of them necessarily.
Expand Down Expand Up @@ -1467,7 +1466,6 @@ extern G_AddEvent_ptr G_AddEvent;
extern G_InitGame_ptr G_InitGame;
extern CheckPrivileges_ptr CheckPrivileges;
extern ClientConnect_ptr ClientConnect;
extern ClientDisconnect_ptr ClientDisconnect;
extern ClientSpawn_ptr ClientSpawn;

// Server replacement functions for hooks.
Expand Down

0 comments on commit 3d021f3

Please sign in to comment.