1
0

Merge pull request #4 from GenZmeY/one-player

fixes for solo play
This commit is contained in:
GenZmeY 2023-06-29 02:11:19 +03:00 committed by GitHub
commit ba5cbdf19d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -38,6 +38,7 @@ public reliable client function WriteToChat(String Message, optional String HexC
if (KFPC.MyGFxManager.PartyWidget != None && KFPC.MyGFxManager.PartyWidget.PartyChatWidget != None)
{
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.SetVisible(true);
KFPC.MyGFxManager.PartyWidget.PartyChatWidget.AddChatMessage(Message, HexColor);
}

View File

@ -37,6 +37,7 @@ var private String KickeeName;
var private String YesVotesPlayers, NoVotesPlayers;
var private bool AllowHudNotification;
var private bool AllowSTPNotification; // SkipTrader and Pause
replication
{
@ -646,6 +647,8 @@ public function ServerStartVoteSkipTrader(PlayerReplicationInfo PRI)
KFPRI.ShowSkipTraderVote(PRI, CurrentVoteTime, !(KFPRI == PRI) && PRI.GetTeamNum() != 255);
}
AllowSTPNotification = KFPRIs.Length > 1;
KFGI.BroadcastLocalized(KFGI, class'KFLocalMessage', LMT_SkipTraderVoteStarted, CurrentSkipTraderVote.PlayerPRI);
SetTimer(CurrentVoteTime, false, nameof(ConcludeVoteSkipTrader), Self);
SetTimer(1, true, nameof(UpdateTimer), Self);
@ -692,7 +695,7 @@ public reliable server function RecieveVoteSkipTrader(PlayerReplicationInfo PRI,
`Log_Trace();
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE);
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE && AllowSTPNotification);
Super.RecieveVoteSkipTrader(PRI, bSkip);
@ -807,6 +810,8 @@ public function ServerStartVotePauseGame(PlayerReplicationInfo PRI)
KFPRI.ShowPauseGameVote(PRI, CurrentVoteTime, !(KFPRI == PRI));
}
AllowSTPNotification = KFPRIs.Length > 1;
KFGI.BroadcastLocalized(KFGI, class'KFLocalMessage', bIsEndlessPaused ? LMT_ResumeVoteStarted : LMT_PauseVoteStarted, CurrentPauseGameVote.PlayerPRI);
SetTimer(CurrentVoteTime, false, nameof(ConcludeVotePauseGame), Self);
SetTimer(1, true, nameof(UpdatePauseGameTimer), Self);
@ -853,7 +858,7 @@ public reliable server function ReceiveVotePauseGame(PlayerReplicationInfo PRI,
`Log_Trace();
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE);
MustNotify = (PlayersThatHaveVoted.Find(PRI) == INDEX_NONE && AllowSTPNotification);
Super.ReceiveVotePauseGame(PRI, bSkip);
@ -1118,4 +1123,5 @@ public function int GetNextMap()
defaultproperties
{
AllowHudNotification = true;
AllowSTPNotification = true;
}