From 5ab2e717f65918a8146250c60b1564b6dc5dbbe2 Mon Sep 17 00:00:00 2001 From: Explooosion-code <61145047+Explooosion-code@users.noreply.github.com> Date: Thu, 27 Aug 2020 20:16:41 +0200 Subject: [PATCH 1/2] Fix for player overhead names not disapearing. For some reason in the code there was a for loop to iterate over players and not over the created gamertags dict. This resulted in mp gamer tags not disaprearing when checkbox unchecked. --- vMenu/FunctionsController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vMenu/FunctionsController.cs b/vMenu/FunctionsController.cs index 4a7e3f9e..7d5ebb00 100644 --- a/vMenu/FunctionsController.cs +++ b/vMenu/FunctionsController.cs @@ -2343,9 +2343,9 @@ private async Task PlayerOverheadNamesControl() bool enabled = MainMenu.MiscSettingsMenu.MiscShowOverheadNames && IsAllowed(Permission.MSOverheadNames); if (!enabled) { - for (var i = 0; i < 255; i++) + foreach (KeyValuePair gamerTag in gamerTags) { - RemoveMpGamerTag(i); + RemoveMpGamerTag(gamerTag.Value); } } else From 99e20c8eb8ba941b60329334dfb489aa332520b6 Mon Sep 17 00:00:00 2001 From: Tom <31419184+TomGrobbe@users.noreply.github.com> Date: Sat, 29 Aug 2020 16:41:44 +0200 Subject: [PATCH 2/2] Clear the dictionary after removing all gamertags --- vMenu/FunctionsController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/vMenu/FunctionsController.cs b/vMenu/FunctionsController.cs index 7d5ebb00..95293639 100644 --- a/vMenu/FunctionsController.cs +++ b/vMenu/FunctionsController.cs @@ -2347,6 +2347,7 @@ private async Task PlayerOverheadNamesControl() { RemoveMpGamerTag(gamerTag.Value); } + gamerTags.clear(); } else {