fix(camera): 전투 진입 시 StS2 고정 카메라 재적용(KickCombatCamera)

회귀: 로비 follow(ConfineCameraArea=false)로 푼 공유 카메라가 전투맵에서 플레이어 중심으로 보임 — MapCamera의 1회성 true-set으론 재confine 안 됨. StartCombat에서 플레이어가 전투 위치(-6) 정착 후 false→true '킥'(0.2s)으로 재confine해야 StS2(플레이어 좌·몬스터 우) 복원(맵 로드 시점엔 텔레포트/낙하 중이라 바운드 오계산). data/camera.json 값 사용, 로비 follow 불변.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 23:26:55 +09:00
parent efa32d0a8f
commit 44010e0fce
2 changed files with 37 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -95,6 +95,9 @@ for (const t of ['combat', 'elite', 'boss', 'shop', 'rest', 'treasure']) {
}
if (!/^[0-9a-f]{32}$/.test(NODEICONS.background || '')) throw new Error('[gen-slaydeck] nodeicons.json background RUID 누락/형식오류');
// 전투 카메라 고정값(StS2: 플레이어 좌·몬스터 우). KickCombatCamera가 StartCombat에서 재confine에 사용.
const CAM = JSON.parse(readFileSync('data/camera.json', 'utf8'));
const RELICS = JSON.parse(readFileSync('data/relics.json', 'utf8'));
if (!RELICS.relics[RELICS.startingRelic]) throw new Error(`[gen-slaydeck] startingRelic 없음: ${RELICS.startingRelic}`);
for (const id of RELICS.relicPool) {
@@ -3437,7 +3440,25 @@ self:ApplySoulUnlocks()
self:RenderPotions()
self:TeleportToActMap()
self:ShowMap()`),
method('KickCombatCamera', `local cam = nil
local lp = _UserService.LocalPlayer
if lp ~= nil then cam = lp.CameraComponent end
if cam == nil then cam = _CameraService:GetCurrentCameraComponent() end
if cam ~= nil then cam.ConfineCameraArea = false end
_TimerService:SetTimerOnce(function()
local cc = nil
local lp2 = _UserService.LocalPlayer
if lp2 ~= nil then cc = lp2.CameraComponent end
if cc == nil then cc = _CameraService:GetCurrentCameraComponent() end
if cc ~= nil then
cc.ZoomRatio = ${CAM.zoomRatio}
cc.CameraOffset = Vector2(${CAM.cameraOffsetX}, ${CAM.cameraOffsetY})
cc.ScreenOffset = Vector2(${CAM.screenOffsetX}, ${CAM.screenOffsetY})
cc.ConfineCameraArea = true
end
end, 0.2)`),
method('StartCombat', `self:ShowState("combat")
self:KickCombatCamera()
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/Result", false)
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false)
self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false)