Skip to content

Commit

Permalink
Clear overlay teams when someone joins or leaves a lobby.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorConzales committed Sep 29, 2017
1 parent f46584f commit 4926ae0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Backend/Jobs/NetHookDumpReaderJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private void ReadFile(FileInfo file) {
case EMsg.ClientMMSJoinLobby:
LobbyUtils.ResetLobbyData();
SetLobbyPresence(true);
ClearOverlayTeams();
break;
case EMsg.ClientMMSLeaveLobby:
ProcessLobbyLeave();
Expand Down Expand Up @@ -189,6 +190,7 @@ private void ProcessLobbyUpdate(NetHookItem item) {
}
TryExtractLobbyData(lobbyData);
if (msg.Body.members.Count > 0) {
this.ClearOverlayTeams();
var lobbyMembers = new List<Player>();
foreach (var playerData in msg.Body.members) {
var memberData = new KeyValue();
Expand Down Expand Up @@ -288,6 +290,10 @@ private void ProcessLobbyUpdate(NetHookItem item) {
}
}

private void ClearOverlayTeams() {
Variables.Teams.Clear();
}

private void TryExtractNameAndRank(Player player, string lobbyName, bool rm) {
if (lobbyName == null) {
lobbyName = "Unknown";
Expand Down

0 comments on commit 4926ae0

Please sign in to comment.