From e650e739ae3bf3a0c8f835f8a16824aec96304e8 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Thu, 16 Nov 2023 07:08:11 +0100 Subject: [PATCH] Fix Message When Voting For Candidates --- Classes/VS_Info.uc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Classes/VS_Info.uc b/Classes/VS_Info.uc index 0eb33ba..6503c34 100644 --- a/Classes/VS_Info.uc +++ b/Classes/VS_Info.uc @@ -98,10 +98,19 @@ function VS_Candidate AddCandidateVote(VS_PlayerChannel Origin, VS_Candidate Can VoteSys.AdminForceTravelTo(P, M); return none; } else { - VoteSys.BroadcastLocalizedMessage2( - class'VS_Msg_LocalMessage', 6, - Origin.PlayerOwner.PlayerReplicationInfo.PlayerName, - ); + if (Candidate.MapRef != none) { + VoteSys.BroadcastLocalizedMessage2( + class'VS_Msg_LocalMessage', 6, + Origin.PlayerOwner.PlayerReplicationInfo.PlayerName, + Candidate.MapRef.MapName@"("$Candidate.PresetRef.Abbreviation$")" + ); + } else { + VoteSys.BroadcastLocalizedMessage2( + class'VS_Msg_LocalMessage', 12, + Origin.PlayerOwner.PlayerReplicationInfo.PlayerName, + Candidate.PresetRef.Abbreviation + ); + } Candidate.Votes += 1; Candidate.SortInList(); return Candidate;