Fixed clients not being marked as in kick queue in some cases (bug 5746, r=psychonic).
This commit is contained in:
parent
1f88f1f3f6
commit
7e0c0d79bc
@ -897,6 +897,14 @@ const char *CHalfLife2::CurrentCommandName()
|
|||||||
|
|
||||||
void CHalfLife2::AddDelayedKick(int client, int userid, const char *msg)
|
void CHalfLife2::AddDelayedKick(int client, int userid, const char *msg)
|
||||||
{
|
{
|
||||||
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
|
||||||
|
if (!pPlayer || !pPlayer->IsConnected() || pPlayer->IsInKickQueue())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pPlayer->MarkAsBeingKicked();
|
||||||
|
|
||||||
DelayedKickInfo kick;
|
DelayedKickInfo kick;
|
||||||
|
|
||||||
kick.client = client;
|
kick.client = client;
|
||||||
|
@ -1404,7 +1404,6 @@ static cell_t KickClient(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPlayer->MarkAsBeingKicked();
|
|
||||||
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), buffer);
|
g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), buffer);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user