fix(bridge): protocol 13 step 2 — expiry, gathering, raids, plugin loads, and a ZoneManager helper (F1 F3 F4 F8 F12 F13) #18
@@ -292,7 +292,9 @@ namespace Oxide.Plugins
|
||||
|
||||
int entered = 0;
|
||||
|
||||
foreach (BasePlayer player in BasePlayer.activePlayerList.ToArray())
|
||||
// A copy: entering a player can eject or kill them, which changes the live list.
|
||||
// `activePlayerList` is Facepunch's ListHashSet, which has no ToArray.
|
||||
foreach (BasePlayer player in new List<BasePlayer>(BasePlayer.activePlayerList))
|
||||
{
|
||||
if (player == null || player.IsNpc || player.transform == null)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user