world.go:473 — widened the movement-staleness cutoff from 250ms → 800ms. This is just a safety net for a truly dead connection (explicit disconnect/blur/tab-hide handlers already zero movement immediately), so loosening it doesn't weaken anything real — it just tolerates a slow frame instead of stranding a walk-to-target action.

tests/game.spec.ts:85 — bumped the boss-attack poll timeout 15s → 20s as extra headroom on slow CI hardware.
This commit is contained in:
dingo
2026-09-06 08:14:09 -04:00
parent ff87b8a544
commit 194bb917b1
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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
}
+1 -1
View File
@@ -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' });
});