fix(scene): persist scene only after the client actually moves

The user's save was bricked by teleporting to entry 100000304: the client
offers it in the map but NREs in AdventurePhase._EnterStep1_InitializeMapInfo
while loading, and the server had already saved that scene - every login
then replayed the broken scene (stuck on the train-window loading screen).

- loadScene no longer calls SavePersistent; SceneEntityMove's 5s cadence
  persists the scene only once the client walks in it (the existing arena
  guard already kept challenge scenes out of the save)
- reset persistent to entry 102020107 (proven walkable in the 01:00/01:38
  sessions)
This commit is contained in:
CAtlas0784 committed 2026-10-07 02:39:41 +07:00
1 parent ebf313256f
commit 768baeb62a
3 files changed
+28 -8

No files matched your search

+17
View File
@@ -94,3 +94,20 @@ map-rotation mode ด้วย state ว่าง → พังตอน init
**Repo:** push ไปที่ https://github.com/CAtlas0784/GaC-hkrpg-GO.git แล้ว (main @ 29b16b5)
+ สร้าง branch `Test` และใช้ branch นี้ต่อ (ตามคำสั่ง user)
## รอบ 5 (02:32 session — ค้างหน้าโหลดหมุนๆ + รูปหน้าจอ train window)
**ประเด็นสำคัญที่เกือบหลอก:** ตารางเทียบ 4 session พบว่า 01:38 (exe 01:19) เดินได้ 466 moves
ทั้งที่ตอบ 4190/6827 ครบ — แสดงว่า MapRotation ไม่ใช่ตัวการหลัก
**ต้นเหตุจริง:** user วาปไป entry **100000304** ตอน 01:59 (client เสนอเองในแมพ แต่โหลดไม่ได้
จริง → NRE ที่ AdventurePhase.InitializeMapInfo) และ server **save ฉากพังนั้นทันที**
→ ทุก login หลังจากนั้นโหลดแมพพังซ้ำ (1418 หด 1998→1671 = คนละฉาก)
**แก้ 2 ชั้น:**
1. รีเซ็ต persistent กลับ entry 102020107 (แมพที่พิสูจน์แล้วว่าเดินได้ใน session 01:00/01:38)
2. **save-on-move**: loadScene(isEnterScene) แก้แค่ in-memory — persistent จะถูกเซฟโดย
SceneEntityMove (ทุก 5 วิ) เมื่อ client เดินได้จริงเท่านั้น → แมพพังไม่มีวัน brick save
(บังเอิญ arena-guard เดิมช่วยด้วย: ฉาก arena ไม่ถูกเซฟอยู่แล้ว)
**บทเรียน:** เทียบ log ต้องดู "ฉากที่โหลด" ด้วย — 1418 ต่างกัน = คนละ entry ไม่ใช่โค้ดพัง