From a47f6e02c0ce5f7b28cc7a976ad53c6f25ed76ea Mon Sep 17 00:00:00 2001 From: Wind-Explorer Date: Fri, 9 Jan 2026 00:15:00 +0800 Subject: [PATCH] freeze pet when pet menu is opened --- src/routes/scene/components/DesktopPet.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/scene/components/DesktopPet.svelte b/src/routes/scene/components/DesktopPet.svelte index 9c25dbd..20c7a8c 100644 --- a/src/routes/scene/components/DesktopPet.svelte +++ b/src/routes/scene/components/DesktopPet.svelte @@ -63,7 +63,9 @@ // 100ms per frame for the animation loop if (timestamp - lastFrameTimestamp > 100) { lastFrameTimestamp = timestamp; - updatePosition(targetX, targetY, window.innerWidth, window.innerHeight); + if (!isPetMenuOpen) { + updatePosition(targetX, targetY, window.innerWidth, window.innerHeight); + } } animationFrameId = requestAnimationFrame(frame);