fix playercount and endless suicide bug

This commit is contained in:
GenZmeY 2021-03-25 11:09:05 +03:00
parent 6cbeec5690
commit 9bfce509a5
5 changed files with 24 additions and 5 deletions

View File

@ -1,5 +1,14 @@
class MskGs_Endless extends KFGameInfo_Endless;
function WaveEnded(EWaveEndCondition WinCondition)
{
// fix bugs after tripware
if(!bWaveStarted && !MyKFGRI.bTraderIsOpen)
return;
Super.WaveEnded(WinCondition);
}
function UpdateGameSettings()
{
local name SessionName;
@ -74,7 +83,9 @@ function UpdateGameSettings()
{
KFGameSettings.MapName = WorldInfo.GetMapName(true);
foreach WorldInfo.AllControllers(class'PlayerController', PC)
if (PC.bIsPlayer)
if (PC.bIsPlayer
&& PC.PlayerReplicationInfo != none
&& !PC.PlayerReplicationInfo.bOnlySpectator)
NumHumanPlayers++;
KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers;
}

View File

@ -74,7 +74,9 @@ function UpdateGameSettings()
{
KFGameSettings.MapName = WorldInfo.GetMapName(true);
foreach WorldInfo.AllControllers(class'PlayerController', PC)
if (PC.bIsPlayer)
if (PC.bIsPlayer
&& PC.PlayerReplicationInfo != none
&& !PC.PlayerReplicationInfo.bOnlySpectator)
NumHumanPlayers++;
KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers;
}

View File

@ -74,7 +74,9 @@ function UpdateGameSettings()
{
KFGameSettings.MapName = WorldInfo.GetMapName(true);
foreach WorldInfo.AllControllers(class'PlayerController', PC)
if (PC.bIsPlayer)
if (PC.bIsPlayer
&& PC.PlayerReplicationInfo != none
&& !PC.PlayerReplicationInfo.bOnlySpectator)
NumHumanPlayers++;
KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers;
}

View File

@ -74,7 +74,9 @@ function UpdateGameSettings()
{
KFGameSettings.MapName = WorldInfo.GetMapName(true);
foreach WorldInfo.AllControllers(class'PlayerController', PC)
if (PC.bIsPlayer)
if (PC.bIsPlayer
&& PC.PlayerReplicationInfo != none
&& !PC.PlayerReplicationInfo.bOnlySpectator)
NumHumanPlayers++;
KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers;
}

View File

@ -74,7 +74,9 @@ function UpdateGameSettings()
{
KFGameSettings.MapName = WorldInfo.GetMapName(true);
foreach WorldInfo.AllControllers(class'PlayerController', PC)
if (PC.bIsPlayer)
if (PC.bIsPlayer
&& PC.PlayerReplicationInfo != none
&& !PC.PlayerReplicationInfo.bOnlySpectator)
NumHumanPlayers++;
KFGameSettings.NumOpenPublicConnections = KFGameSettings.NumPublicConnections - NumHumanPlayers;
}