Skip to content

Commit

Permalink
Replicate Map PlayCount To Clients
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Dec 27, 2023
1 parent 66120cd commit 8fd1b3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Serialization.uc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ final function VS_Map ParseMap(string Line) {
// | Parse Content | Skip /
M.MapName = DecodeString(Line); NextVariable(Line);
M.Sequence = int(Line); NextVariable(Line);
M.PlayCount = int(Line); NextVariable(Line);
M.MinPlayers = int(Line); NextVariable(Line);
M.MaxPlayers = int(Line);

Expand Down Expand Up @@ -128,6 +129,7 @@ final function string SerializeMap(VS_Map M) {
Result = "/MAP/";
Result = Result$EncodeString(M.MapName)$"/";
Result = Result$M.Sequence$"/";
Result = Result$M.PlayCount$"/";
Result = Result$M.MinPlayers$"/";
Result = Result$M.MaxPlayers;

Expand Down
1 change: 1 addition & 0 deletions Classes/VS_HistoryProcessor.uc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ event Tick(float Delta) {
if (M.MapName == Map) {
M.Sequence = History.Entry[ProcessedEntry].Sequence;
P.MaxSequenceNumber = Max(P.MaxSequenceNumber, M.Sequence);
M.PlayCount = History.Entry[ProcessedEntry].NumVoted;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Classes/VS_Map.uc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ class VS_Map extends Object;
var VS_Map Next;
var string MapName;
var int Sequence;
var int PlayCount;
var int MinPlayers;
var int MaxPlayers;

0 comments on commit 8fd1b3a

Please sign in to comment.