From ab5e2aa6ace025380644c1bb6ff870080e1050ab Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Fri, 16 Dec 2016 07:17:03 +0300 Subject: [PATCH] Fixed sending messages to fakeclients (fixed #279) --- rehlds/engine/host_cmd.cpp | 6 ++++++ rehlds/engine/sv_main.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/rehlds/engine/host_cmd.cpp b/rehlds/engine/host_cmd.cpp index 400367e..8d01a62 100644 --- a/rehlds/engine/host_cmd.cpp +++ b/rehlds/engine/host_cmd.cpp @@ -2642,6 +2642,8 @@ void Host_TogglePause_f(void) #ifdef REHLDS_FIXES for (int i = 0; i < g_psvs.maxclients; i++) { + if (g_psvs.clients[i].fakeclient) + continue; if (!g_psvs.clients[i].connected) continue; @@ -2671,6 +2673,8 @@ void Host_Pause_f(void) #ifdef REHLDS_FIXES for (int i = 0; i < g_psvs.maxclients; i++) { + if (g_psvs.clients[i].fakeclient) + continue; if (!g_psvs.clients[i].connected) continue; @@ -2700,6 +2704,8 @@ void Host_Unpause_f(void) #ifdef REHLDS_FIXES for (int i = 0; i < g_psvs.maxclients; i++) { + if (g_psvs.clients[i].fakeclient) + continue; if (!g_psvs.clients[i].connected) continue; diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 7a6716d..9e5df0a 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -3756,6 +3756,8 @@ void SV_SendFullClientUpdateForAll(client_t *client) for (int i = 0; i < g_psvs.maxclients; i++) { host_client = &g_psvs.clients[i]; + if (host_client->fakeclient) + continue; if (!host_client->connected) continue;