From 07c805ea7e33ecf64509ce08474bf32ac975d360 Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 21 Sep 2026 01:59:17 +0000 Subject: [PATCH] Align reload test with multiplayer authority --- tests/wiring.test.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/wiring.test.mjs b/tests/wiring.test.mjs index 38f8248..1a7a2fa 100644 --- a/tests/wiring.test.mjs +++ b/tests/wiring.test.mjs @@ -178,7 +178,8 @@ test('player firing and reload HUD share one reload duration source', async () = const source = await read('src/game-v4.js'); assert.match(source, /this\.playerBroadsideReloadMs = PLAYER_BROADSIDE_RELOAD_MS/); - assert.match(source, /this\.time\.now - this\.lastPlayerShot\[broadside\] < this\.playerBroadsideReloadMs/); + assert.match(source, /const reloadMs = multiplayerOnline \? PLAYER_BROADSIDE_RELOAD_MS : this\.playerBroadsideReloadMs/); + assert.match(source, /this\.time\.now - this\.lastPlayerShot\[broadside\] < reloadMs/); assert.match(source, /Math\.max\(1, this\.playerBroadsideReloadMs\)/); });