[WL-816] 섬 콘솔 에러 2종 제거 — ① CameraMoveLead: 섬에서 PC 스탯 키(MOVSPD_Up) 없을 때 KeyNotFound → try/catch(기준 속도 0) ② 원본 일꾼(WorkerActor · Goblin_Baby) 섬 스폰 시 DropItemInfo 없어 매 프레임 NRE → 즉시 비활성 (PD 지시 · #816)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
70a3eb380f
commit
1dccc30861
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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<WorkerActor>(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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue