Align reload test with multiplayer authority

This commit is contained in:
Admin 2026-09-21 01:59:17 +00:00
parent c320792a9c
commit 07c805ea7e

View File

@ -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\)/);
});