characters invisible on human vs bot fight entrance fix
This commit is contained in:
@@ -49,6 +49,7 @@ const {
|
||||
roundCooldown, pendingChallengeData,
|
||||
applyChallenge, submitChoice, startHumanPolling, stopHumanPolling,
|
||||
startCooldown, clearChallenge, resetState: resetChallengeState, handleSSEChallenge,
|
||||
setEntrancePlaying,
|
||||
} = challenge
|
||||
|
||||
// Live scene state
|
||||
@@ -155,6 +156,10 @@ async function initLiveScene() {
|
||||
await ensureAudioContext()
|
||||
liveScene.startMusic()
|
||||
}
|
||||
// Let Kaplay register game objects before entrance (prevents invisible fighters)
|
||||
await new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))
|
||||
// Block challenges during entrance so the animation plays fully
|
||||
setEntrancePlaying(true)
|
||||
announceDeepIntro()
|
||||
try {
|
||||
await liveScene.playEntrance()
|
||||
@@ -163,6 +168,7 @@ async function initLiveScene() {
|
||||
}
|
||||
// Safety: ensure fighters are visible after entrance (prevents invisible characters on mobile)
|
||||
liveScene._resetPositions()
|
||||
setEntrancePlaying(false)
|
||||
}
|
||||
|
||||
liveLogItems.value.push(
|
||||
|
||||
Reference in New Issue
Block a user