From dd5201ea2bcbdd1bf303fa2a656790d83a5b89fe Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Wed, 25 Aug 2021 18:59:57 +0300 Subject: [PATCH] fix players count if there are spectators --- MskGs/Classes/MskGs_Endless.uc | 2 +- MskGs/Classes/MskGs_Objective.uc | 2 +- MskGs/Classes/MskGs_Survival.uc | 5 +++-- MskGs/Classes/MskGs_VersusSurvival.uc | 2 +- MskGs/Classes/MskGs_WeeklySurvival.uc | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MskGs/Classes/MskGs_Endless.uc b/MskGs/Classes/MskGs_Endless.uc index a682072..7053364 100644 --- a/MskGs/Classes/MskGs_Endless.uc +++ b/MskGs/Classes/MskGs_Endless.uc @@ -82,7 +82,7 @@ function UpdateGameSettings() foreach WorldInfo.AllControllers(class'PlayerController', PC) if (PC.bIsPlayer && PC.PlayerReplicationInfo != none - && !PC.PlayerReplicationInfo.bOnlySpectator) + && !PC.PlayerReplicationInfo.bBot) NumHumanPlayers++; KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers; } diff --git a/MskGs/Classes/MskGs_Objective.uc b/MskGs/Classes/MskGs_Objective.uc index 285f2ad..c0e98d6 100644 --- a/MskGs/Classes/MskGs_Objective.uc +++ b/MskGs/Classes/MskGs_Objective.uc @@ -81,7 +81,7 @@ function UpdateGameSettings() foreach WorldInfo.AllControllers(class'PlayerController', PC) if (PC.bIsPlayer && PC.PlayerReplicationInfo != none - && !PC.PlayerReplicationInfo.bOnlySpectator) + && !PC.PlayerReplicationInfo.bBot) NumHumanPlayers++; KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers; } diff --git a/MskGs/Classes/MskGs_Survival.uc b/MskGs/Classes/MskGs_Survival.uc index aa394b2..d5e0670 100644 --- a/MskGs/Classes/MskGs_Survival.uc +++ b/MskGs/Classes/MskGs_Survival.uc @@ -81,11 +81,12 @@ function UpdateGameSettings() foreach WorldInfo.AllControllers(class'PlayerController', PC) if (PC.bIsPlayer && PC.PlayerReplicationInfo != none - && !PC.PlayerReplicationInfo.bOnlySpectator) + && !PC.PlayerReplicationInfo.bBot) NumHumanPlayers++; + KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers; } - + //`REMOVEMESOON_ServerTakeoverLog("KFGameInfo_Survival.UpdateGameSettings 4 - PlayfabInter: "$PlayfabInter); if (PlayfabInter != none) { diff --git a/MskGs/Classes/MskGs_VersusSurvival.uc b/MskGs/Classes/MskGs_VersusSurvival.uc index e7dd821..e28a4be 100644 --- a/MskGs/Classes/MskGs_VersusSurvival.uc +++ b/MskGs/Classes/MskGs_VersusSurvival.uc @@ -81,7 +81,7 @@ function UpdateGameSettings() foreach WorldInfo.AllControllers(class'PlayerController', PC) if (PC.bIsPlayer && PC.PlayerReplicationInfo != none - && !PC.PlayerReplicationInfo.bOnlySpectator) + && !PC.PlayerReplicationInfo.bBot) NumHumanPlayers++; KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers; } diff --git a/MskGs/Classes/MskGs_WeeklySurvival.uc b/MskGs/Classes/MskGs_WeeklySurvival.uc index 2764d6d..140ccf6 100644 --- a/MskGs/Classes/MskGs_WeeklySurvival.uc +++ b/MskGs/Classes/MskGs_WeeklySurvival.uc @@ -81,7 +81,7 @@ function UpdateGameSettings() foreach WorldInfo.AllControllers(class'PlayerController', PC) if (PC.bIsPlayer && PC.PlayerReplicationInfo != none - && !PC.PlayerReplicationInfo.bOnlySpectator) + && !PC.PlayerReplicationInfo.bBot) NumHumanPlayers++; KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers; }