Skip to content

Clamp domination tick interval and log clamping#601

Open
themuffinator wants to merge 1 commit intomainfrom
codex/add-upper-bound-to-dominationtickinterval
Open

Clamp domination tick interval and log clamping#601
themuffinator wants to merge 1 commit intomainfrom
codex/add-upper-bound-to-dominationtickinterval

Conversation

@themuffinator
Copy link
Owner

Summary

  • add an upper bound to the domination tick interval and log when server clamps out-of-range values
  • update domination tests to capture log output and verify both minimum and maximum interval clamping
  • document stub functions with headers for clarity in the domination test suite

Testing

  • cmake -S . -B build (fails: repository has no CMakeLists.txt)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +291 to +295
g_domination_tick_interval_storage.value = -1.0f;
g_domination_tick_interval_storage.integer = -1;
const GameTime minimumInterval = DominationTickInterval();
assert(minimumInterval == kDominationMinScoreInterval);
assert(!g_comPrintMessages.empty());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Minimum interval test asserts unreachable clamp

The new minimum clamp assertions will always fail: DominationTickInterval() only uses g_domination_tick_interval when its value is positive (lines 26–32 of g_domination.cpp), so setting the cvar to -1 falls back to the 1 s default and never hits the minimum clamp/log path. The expectations here that the interval equals kDominationMinScoreInterval and that a "minimum" log was emitted are therefore unreachable, breaking this test every run.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant