From d1d4a00d1dd7f851c5566fc560bcc2181bc9051c Mon Sep 17 00:00:00 2001 From: wtclaude Date: Sat, 26 Sep 2026 21:43:22 -0500 Subject: [PATCH] fix(bridge): the ZoneManager helper copies the player list without ToArray Found compiling on the rust-oxide rig: BasePlayer.activePlayerList is Facepunch's ListHashSet, which has no ToArray, so the helper did not compile. It now copies into a List, which it needs anyway: entering a player can eject or kill them and change the live list mid-loop. HarmonyLib itself resolved on Oxide with no reference directive, and the helper patched ZoneManager 3.1.14 on both frameworks once this compiled. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY --- overlay/oxide/plugins/RunicGatewayZones.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overlay/oxide/plugins/RunicGatewayZones.cs b/overlay/oxide/plugins/RunicGatewayZones.cs index de90edd..33c2ecb 100644 --- a/overlay/oxide/plugins/RunicGatewayZones.cs +++ b/overlay/oxide/plugins/RunicGatewayZones.cs @@ -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.activePlayerList)) { if (player == null || player.IsNpc || player.transform == null) continue;