mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-19 15:51:58 +00:00
FINALLY FIX MEMORY LEAK OMG (+ improved the lobby settings UI overall)
This commit is contained in:
1 parent
3bb0758e55
commit
bccb216e2d
29 files changed
+365
-557
No files matched your search
@@ -326,6 +326,8 @@ public static class CaptureTheFlag
|
||||
if (pc && outfit != null)
|
||||
Utils.RpcChangeSkin(pc, outfit);
|
||||
}
|
||||
|
||||
DefaultOutfits = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ internal static class CustomHnS
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary<Team, PlayerControl[]> playerTeams =Main.TeamValues[1..4]
|
||||
Dictionary<Team, PlayerControl[]> playerTeams = Main.TeamValues[1..4]
|
||||
.SelectMany(x => Enumerable.Repeat(x, Math.Max(memberNum[x], 0)))
|
||||
.Shuffle()
|
||||
.Zip(allPlayers)
|
||||
|
||||
@@ -664,7 +664,11 @@ public static class KingOfTheZones
|
||||
}
|
||||
}
|
||||
|
||||
void ResetSkins() => DefaultOutfits.Select(x => (pc: x.Key.GetPlayer(), outfit: x.Value)).DoIf(x => x.pc && x.outfit != null, x => Utils.RpcChangeSkin(x.pc, x.outfit));
|
||||
void ResetSkins()
|
||||
{
|
||||
DefaultOutfits.Select(x => (pc: x.Key.GetPlayer(), outfit: x.Value)).DoIf(x => x.pc && x.outfit != null, x => Utils.RpcChangeSkin(x.pc, x.outfit));
|
||||
DefaultOutfits = [];
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsNotInLocalPlayersTeam(PlayerControl pc)
|
||||
|
||||
@@ -14,7 +14,6 @@ public static class TheMindGame
|
||||
{
|
||||
private static Dictionary<byte, int> Points = [];
|
||||
private static Dictionary<byte, int> SuperPoints = [];
|
||||
private static Dictionary<PlayerControl, int> DefaultColorIds = [];
|
||||
private static Dictionary<byte, Group> Groups = [];
|
||||
private static Dictionary<Group, List<byte>> GroupPlayers = [];
|
||||
private static List<SystemTypes> AllRooms = [];
|
||||
@@ -276,7 +275,7 @@ public static class TheMindGame
|
||||
var pcCount = aapc.Count;
|
||||
Points = aapc.ToDictionary(x => x.PlayerId, _ => 0);
|
||||
SuperPoints = aapc.ToDictionary(x => x.PlayerId, _ => 0);
|
||||
DefaultColorIds = aapc.ToDictionary(x => x, x => x.Data.DefaultOutfit.ColorId);
|
||||
aapc.ToDictionary(x => x, x => x.Data.DefaultOutfit.ColorId);
|
||||
PlayerItems = aapc.ToDictionary(x => x.PlayerId, _ => new List<Item>());
|
||||
|
||||
Groups = [];
|
||||
|
||||
Reference in new issue
Block a user