Fixed clients not being marked as in kick queue in some cases (bug 5746, r=psychonic).
Fixed clients not being marked as in kick queue in some cases (
bug 5746, r=psychonic).
1.1 --- a/core/HalfLife2.cpp Thu Jul 18 11:38:04 2013 -0400
1.2 +++ b/core/HalfLife2.cpp Thu Jul 18 11:38:04 2013 -0400
1.3 @@ -897,6 +897,14 @@
1.4
1.5 void CHalfLife2::AddDelayedKick(int client, int userid, const char *msg)
1.6 {
1.7 + CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
1.8 + if (!pPlayer || !pPlayer->IsConnected() || pPlayer->IsInKickQueue())
1.9 + {
1.10 + return;
1.11 + }
1.12 +
1.13 + pPlayer->MarkAsBeingKicked();
1.14 +
1.15 DelayedKickInfo kick;
1.16
1.17 kick.client = client;
2.1 --- a/core/smn_player.cpp Thu Jul 18 11:38:04 2013 -0400
2.2 +++ b/core/smn_player.cpp Thu Jul 18 11:38:04 2013 -0400
2.3 @@ -1404,7 +1404,6 @@
2.4 return 1;
2.5 }
2.6
2.7 - pPlayer->MarkAsBeingKicked();
2.8 g_HL2.AddDelayedKick(client, pPlayer->GetUserId(), buffer);
2.9
2.10 return 1;