From 194bb917b1fecb92583b47dfbf5456ad55802113 Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 6 Sep 2026 08:14:09 -0400 Subject: [PATCH] =?UTF-8?q?world.go:473=20=E2=80=94=20widened=20the=20move?= =?UTF-8?q?ment-staleness=20cutoff=20from=20250ms=20=E2=86=92=20800ms.=20T?= =?UTF-8?q?his=20is=20just=20a=20safety=20net=20for=20a=20truly=20dead=20c?= =?UTF-8?q?onnection=20(explicit=20disconnect/blur/tab-hide=20handlers=20a?= =?UTF-8?q?lready=20zero=20movement=20immediately),=20so=20loosening=20it?= =?UTF-8?q?=20doesn't=20weaken=20anything=20real=20=E2=80=94=20it=20just?= =?UTF-8?q?=20tolerates=20a=20slow=20frame=20instead=20of=20stranding=20a?= =?UTF-8?q?=20walk-to-target=20action.=20tests/game.spec.ts:85=20=E2=80=94?= =?UTF-8?q?=20bumped=20the=20boss-attack=20poll=20timeout=2015s=20?= =?UTF-8?q?=E2=86=92=2020s=20as=20extra=20headroom=20on=20slow=20CI=20hard?= =?UTF-8?q?ware.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/game/world.go | 5 ++++- tests/game.spec.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/internal/game/world.go b/server/internal/game/world.go index b861856..f56516f 100644 --- a/server/internal/game/world.go +++ b/server/internal/game/world.go @@ -470,7 +470,10 @@ func (w *World) Advance(now time.Time, dt float64) { } } if c.Online { - if now.Sub(c.LastMove) > 250*time.Millisecond { + // A generous window: the client resends its move intent well under this on every + // rendered frame, but a slow/throttled frame (e.g. software-rendered CI) shouldn't + // zero out in-flight movement and strand a walk-to-target action mid-course. + if now.Sub(c.LastMove) > 800*time.Millisecond { c.MoveX = 0 c.MoveZ = 0 } diff --git a/tests/game.spec.ts b/tests/game.spec.ts index a6d6492..161c293 100644 --- a/tests/game.spec.ts +++ b/tests/game.spec.ts @@ -82,7 +82,7 @@ test('boss event is visible and accepts server-authoritative combat', async ({ p await page.getByRole('button', { name: 'Close display settings' }).click(); const hp = await page.evaluate(() => (window as any).__aeternalis.snapshot.world.bossHp); await page.getByRole('button', { name: 'Target Harbinger', exact: true }).click(); - await expect.poll(() => page.evaluate(() => (window as any).__aeternalis.snapshot.world.bossHp), { timeout: 15000 }).toBeLessThan(hp); + await expect.poll(() => page.evaluate(() => (window as any).__aeternalis.snapshot.world.bossHp), { timeout: 20000 }).toBeLessThan(hp); await expect(page.locator('#boss-bar')).toBeVisible(); await page.screenshot({ path: 'test-results/boss.png' }); });