Add client_remove() forward and fix a bug with client not internally disconnected (#414)

* Rename client_disconnected to client_disconnecting

* Add client_disconnected as post forward

* Fix client not properly disconnected internally

Introduced in #264.
Edict is reset once SV_DropClient is called, so that second check would be always false.

* Reflect changes on the concerned plugins

* Revert renaming, let's add only client_remove as post forward
This commit is contained in:
Vincent Herbet
2017-02-25 11:50:52 +01:00
committed by GitHub
parent b973d24081
commit 3568fb8747
3 changed files with 43 additions and 13 deletions

View File

@ -56,11 +56,11 @@ public client_authorized(id)
server_cmd("kick #%d ^"%L^"", get_user_userid(id), id, "DROPPED_RES")
}
public client_disconnected(id)
public client_remove(id)
{
if (get_pcvar_num(g_HidePtr))
{
setVisibleSlots(get_playersnum(1) - 1, MaxClients - get_pcvar_num(g_ResPtr))
setVisibleSlots(get_playersnum(1), MaxClients - get_pcvar_num(g_ResPtr))
}
}