mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Convert AllPlayerControls into System.Collections.Generic.List<PlayerControl> from IEnumerable
This commit is contained in:
1 parent
f978733f31
commit
51bbfa919b
46 files changed
+289
-146
No files matched your search
@@ -118,8 +118,9 @@ static class ExtendedPlayerControl
|
||||
}
|
||||
public static void RpcSetNameEx(this PlayerControl player, string name)
|
||||
{
|
||||
foreach (var seer in Main.AllPlayerControls)
|
||||
for (int i = 0; i < Main.AllPlayerControls.Count; i++)
|
||||
{
|
||||
PlayerControl seer = Main.AllPlayerControls[i];
|
||||
Main.LastNotifyNames[(player.PlayerId, seer.PlayerId)] = name;
|
||||
}
|
||||
HudManagerPatch.LastSetNameDesyncCount++;
|
||||
@@ -1325,8 +1326,9 @@ static class ExtendedPlayerControl
|
||||
public static Dictionary<string, int> GetAllPlayerLocationsCount()
|
||||
{
|
||||
Dictionary<string, int> playerRooms = new();
|
||||
foreach (var pc in Main.AllAlivePlayerControls)
|
||||
for (int i1 = 0; i1 < Main.AllAlivePlayerControls.Count; i1++)
|
||||
{
|
||||
PlayerControl pc = Main.AllAlivePlayerControls[i1];
|
||||
if (!pc.IsAlive() || Pelican.IsEaten(pc.PlayerId)) return null;
|
||||
var Rooms = ShipStatus.Instance.AllRooms;
|
||||
if (Rooms == null) return null;
|
||||
|
||||
Reference in new issue
Block a user