This commit is contained in:
GenZmeY 2022-03-29 21:23:13 +03:00
parent f00b92a300
commit 2fb3f2bad5
2 changed files with 32 additions and 21 deletions

View File

@ -74,9 +74,17 @@ public static function UpdateGameSettings(KFGameInfo_Survival KFGI, bool bUsesSt
if (KFGI.WorldInfo.IsConsoleDedicatedServer() || KFGI.WorldInfo.IsEOSDedicatedServer())
{
KFGameSettings.MapName = KFGI.WorldInfo.GetMapName(true);
// Old:
//foreach KFGI.WorldInfo.AllControllers(class'PlayerController', PC)
// if (PC.bIsPlayer
// && PC.PlayerReplicationInfo != none
// && !PC.PlayerReplicationInfo.bBot)
// NumHumanPlayers++;
foreach KFGI.WorldInfo.AllControllers(class'PlayerController', PC)
if (PC.bIsPlayer
&& PC.PlayerReplicationInfo != none
&& !PC.PlayerReplicationInfo.bOnlySpectator
&& !PC.PlayerReplicationInfo.bBot)
NumHumanPlayers++;

View File

@ -322,32 +322,35 @@ function NotifyLogout(Controller C)
VoteCollector = MskGsVoteCollector(MyKFGI.MyKFGRI.VoteCollector);
VoteCollector.NotifyLogout(C);
MskGsMemberList.RemoveItem(C);
if (bXpNotifications)
if (MskGsMemberList.Find(C) != INDEX_NONE)
{
if (MskGsMemberList.Length >= 10)
MskGsMemberList.RemoveItem(C);
if (bXpNotifications)
{
if (C.PlayerReplicationInfo != NONE)
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. XP bonus: +50% (MAX!)");
if (MskGsMemberList.Length >= 10)
{
if (C.PlayerReplicationInfo != NONE)
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. XP bonus: +50% (MAX!)");
else
WorldInfo.Game.Broadcast(C, "XP bonus: +50% (MAX!)");
}
else if (MskGsMemberList.Length > 0)
{
if (C.PlayerReplicationInfo != NONE)
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
else
WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
}
else
WorldInfo.Game.Broadcast(C, "XP bonus: +50% (MAX!)");
}
else if (MskGsMemberList.Length > 0)
{
if (C.PlayerReplicationInfo != NONE)
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
else
WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"%");
}
else
{
if (C.PlayerReplicationInfo != NONE)
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. No XP bonus now.");
else
WorldInfo.Game.Broadcast(C, "No XP bonus now.");
{
if (C.PlayerReplicationInfo != NONE)
WorldInfo.Game.Broadcast(C, C.PlayerReplicationInfo.PlayerName$" left the game. No XP bonus now.");
else
WorldInfo.Game.Broadcast(C, "No XP bonus now.");
}
}
MyKFGI.UpdateGameSettings();
}
MyKFGI.UpdateGameSettings();
for (i = RepClients.Length - 1; i >= 0; i--)
{