re-add the IsConnected() check

This commit is contained in:
neon 2019-05-22 14:39:22 +02:00
parent ee4d50882f
commit 7cf6c0431f

View File

@ -150,7 +150,7 @@ DETOUR_DECL_STATIC6(Detour_SendTo, int, int, s, char *, buf, int, len, int, flag
{
IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(index);
if (pPlayer != NULL && pPlayer->IsInGame() && !pPlayer->IsSourceTV())
if (pPlayer != NULL && pPlayer->IsConnected() && pPlayer->IsInGame() && !pPlayer->IsSourceTV())
{
g_PlayerReplyPacket.WriteByte(iPlayers);
g_PlayerReplyPacket.WriteString(pPlayer->GetName());