fix players count if there are spectators

This commit is contained in:
GenZmeY 2021-08-25 18:59:57 +03:00
parent f9c11dc3b4
commit dd5201ea2b
5 changed files with 7 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -81,8 +81,9 @@ 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;
}

View File

@ -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;
}

View File

@ -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;
}