Skip to content

Conversation

@evanpelle
Copy link
Collaborator

Description:

In 1v1s some players were getting spawned sniped if they didn't expand fast enough.

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

evan

@CLAassistant
Copy link

CLAassistant commented Jan 24, 2026

CLA assistant check
All committers have signed the CLA.

@evanpelle evanpelle changed the base branch from main to v29 January 24, 2026 23:37
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Walkthrough

Refactors spawn immunity threshold into a configurable value via defaultSpawnImmunityDuration(), updates client timer to use it, and shortens matchmaking polling delay from 10000 ms to 7000 ms.

Changes

Cohort / File(s) Summary
Configuration interface & default
src/core/configuration/Config.ts, src/core/configuration/DefaultConfig.ts
Adds defaultSpawnImmunityDuration(): Tick to Config. DefaultConfig implements it (returns 100 ticks = 10s) and spawnImmunityDuration() now falls back to this method instead of a hard-coded value.
Client immunity timer
src/client/graphics/layers/ImmunityTimer.ts
Replaces hard-coded threshold (50) with dynamic defaultSpawnImmunityDuration() and keeps existing early-return when using default immunity. Adds clarifying comment.
Server matchmaking timing
src/server/Worker.ts
Reduces matchmaking polling delay in startMatchmakingPolling() from 10000 ms to 7000 ms.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🛡️ A timer once fixed, now learns to bend,

Configured softly, defaults to defend.
Ten ticks of mercy, clear and bright,
Matchmaking quicker — ready for the fight.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: increasing the default spawn immunity duration from 5 seconds to 10 seconds, which is the primary modification across the configuration and immunity timer files.
Description check ✅ Passed The description explains the business reason for the change (preventing spawn-sniping in 1v1 matches) and relates directly to the technical changes made in the pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 24, 2026
@github-project-automation github-project-automation bot moved this from Triage to Final Review in OpenFront Release Management Jan 24, 2026
@evanpelle evanpelle dismissed coderabbitai[bot]’s stale review January 24, 2026 23:51

The merge-base changed after approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Final Review

Development

Successfully merging this pull request may close these issues.

3 participants