mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
client_disconnect forwards now get called for every client which is initialized (ie. client_connect was called for him) instead of clients which are ingame only (ie. client_putinserver was called)
This commit is contained in:
parent
a2c2dc88fc
commit
26e8b0dbb6
@ -422,10 +422,11 @@ void C_ServerDeactivate() {
|
||||
|
||||
for(int i = 1; i <= gpGlobals->maxClients; ++i){
|
||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(i);
|
||||
if (pPlayer->ingame){
|
||||
|
||||
if (pPlayer->initialized)
|
||||
executeForwards(FF_ClientDisconnect, pPlayer->index);
|
||||
|
||||
if (pPlayer->ingame){
|
||||
|
||||
pPlayer->Disconnect();
|
||||
--g_players_num;
|
||||
}
|
||||
@ -546,8 +547,10 @@ BOOL C_ClientConnect_Post( edict_t *pEntity, const char *pszName, const char *ps
|
||||
|
||||
void C_ClientDisconnect( edict_t *pEntity ) {
|
||||
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
||||
if (pPlayer->ingame) {
|
||||
if (pPlayer->initialized)
|
||||
executeForwards(FF_ClientDisconnect, pPlayer->index);
|
||||
|
||||
if (pPlayer->ingame) {
|
||||
--g_players_num;
|
||||
}
|
||||
pPlayer->Disconnect();
|
||||
|
Loading…
Reference in New Issue
Block a user