diff --git a/Assets/WL/Camera/CameraMoveLead.cs b/Assets/WL/Camera/CameraMoveLead.cs index 4f43532be..9c6741f01 100644 --- a/Assets/WL/Camera/CameraMoveLead.cs +++ b/Assets/WL/Camera/CameraMoveLead.cs @@ -151,7 +151,13 @@ public class CameraMoveLead // 기준 속도 — 0 이면 캐릭터의 실제 이동속도(테이블·버프 반영)를 쓴다 (C45) float refSpeed = st.speedReference; - if (refSpeed <= 0.0001f && actor != null) refSpeed = actor.Get_MoveSpeed(); + if (refSpeed <= 0.0001f && actor != null) + { + // 2026-09-15 PD 「에러 나는 부분 수정」 — 섬(비전투 맵)에서는 PC 스탯 사전에 MOVSPD_Up 키가 없어 + // Get_MoveSpeed 가 매 프레임 KeyNotFoundException 을 던졌다 → 실패하면 기준 속도 0(= 아래 임계값 분기)으로 처리. + try { refSpeed = actor.Get_MoveSpeed(); } + catch (System.Exception) { refSpeed = 0f; } + } float lo = st.moveSpeedThreshold; float speed01 = (refSpeed > lo + 0.0001f) ? Mathf.Clamp01((speed - lo) / (refSpeed - lo)) : (speed > lo ? 1f : 0f); diff --git a/Assets/WL/Island/WLIslandGateFlow.cs b/Assets/WL/Island/WLIslandGateFlow.cs index 9fd6ac3d5..5472479a6 100644 --- a/Assets/WL/Island/WLIslandGateFlow.cs +++ b/Assets/WL/Island/WLIslandGateFlow.cs @@ -95,6 +95,10 @@ namespace WL.Island // farmReHideDelaySeconds 간격으로 3회 더 훑는다(이미 꺼진 것은 건너뛴다 · 값 0 이면 무동작). if (cfg.hideIslandFences != 0 && WLIslandBridge.Runner != null) WLIslandBridge.Runner.StartCoroutine(Co_ReHideFences(cfg, scene)); + // 2026-09-15 PD 「에러 나는 부분 수정」 — 섬에서 원본 일꾼(WorkerActor · Goblin_Baby)이 DropItemInfo 없이 + // 매 프레임 NullReference 를 냈다(실측 199회/3초) → 나타나는 즉시 끈다(처음 20초는 0.2 s · 이후 3 s 간격). + if (WLIslandBridge.Runner != null) + WLIslandBridge.Runner.StartCoroutine(Co_HideWorkers(scene)); HookIslandActivation(cfg, scene); @@ -451,6 +455,23 @@ namespace WL.Island runner.StartCoroutine(Co_ReHide(cfg, isl)); } + public static int WorkersHidden; + + static IEnumerator Co_HideWorkers(Scene scene) + { + float t = 0f; + while (t < 600f) + { + if (!scene.IsValid() || !scene.isLoaded) yield break; + var ws = Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None); + for (int i = 0; i < ws.Length; i++) + if (ws[i] != null && ws[i].gameObject.activeSelf) { ws[i].gameObject.SetActive(false); WorkersHidden++; } + float wait = t < 20f ? 0.2f : 3f; + t += wait; + yield return new WaitForSeconds(wait); + } + } + static IEnumerator Co_ReHideFences(WLIslandSettings cfg, Scene scene) { float wait = Mathf.Max(0.5f, cfg.farmReHideDelaySeconds);