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

회귀: 로비 follow(ConfineCameraArea=false)로 푼 공유 카메라가, 전투맵 MapCamera의 1회성 true-set으론 재confine 안 돼 전투에서 플레이어 중심으로 보임. 단순 true-set이 아니라 false→true '킥'을, 플레이어가 전투 위치(-6)에 정착한 StartCombat 시점에 0.2s 지연으로 실행해야 StS2(플레이어 좌·몬스터 우) framing이 복원됨(맵 로드 0.1s 시점엔 플레이어 텔레포트/낙하 중이라 confine 바운드가 잘못 계산). data/camera.json 값 사용. 로비 follow는 그대로.
This commit is contained in:
2026-06-15 23:24:09 +09:00
parent 6c35d959ac
commit ea0cab36bf
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) {
@@ -3435,7 +3438,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)