Skip to content

Commit 5732d06

Browse files
committed
gameserver: try to reconnect the client after switching slots
1 parent 5b1ce77 commit 5732d06

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

source/modules/gameserver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,8 @@ static void MoveCGameClientIntoCGameClient(CGameClient* origin, CGameClient* tar
15641564
info.m_nPlayerSlot = target->m_nClientSlot;
15651565

15661566
target->SendNetMsg(info, true);
1567+
1568+
target->Reconnect();
15671569
}
15681570

15691571
#define MAX_PLAYERS 128
@@ -1612,11 +1614,9 @@ void hook_CGameClient_SpawnPlayer(CGameClient* client)
16121614
}
16131615

16141616
MoveCGameClientIntoCGameClient(client, pClient);
1615-
1616-
detour_CGameClient_SpawnPlayer.GetTrampoline<Symbols::CGameClient_SpawnPlayer>()(pClient);
1617+
//detour_CGameClient_SpawnPlayer.GetTrampoline<Symbols::CGameClient_SpawnPlayer>()(pClient);
16171618
}
16181619

1619-
static Symbols::MD5_MapFile func_MD5_MapFile;
16201620
void CGameServerModule::InitDetour(bool bPreServer)
16211621
{
16221622
if (bPreServer)

source/symbols.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,6 @@ namespace Symbols
519519
typedef void (*CBaseServer_FillServerInfo)(void*, SVC_ServerInfo&);
520520
extern const std::vector<Symbol> CBaseServer_FillServerInfoSym;
521521

522-
typedef bool (*MD5_MapFile)(MD5Value_t*, const char*);
523-
extern const std::vector<Symbol> MD5_MapFileSym;
524-
525522
typedef bool (*CBaseClient_SetSignonState)(void* client, int state, int spawncount);
526523
extern const std::vector<Symbol> CBaseClient_SetSignonStateSym;
527524

source/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ void Push_##className(className* var) \
353353
} \
354354
} \
355355
\
356-
static void [[maybe_unused]] Delete_##className(className* var) \
356+
static void Delete_##className(className* var) \
357357
{ \
358358
auto it = g_pPushed##className.find(var); \
359359
if (it != g_pPushed##className.end()) \

0 commit comments

Comments
 (0)