Skip to content

Conversation

@calcastor
Copy link
Contributor

@calcastor calcastor commented Dec 3, 2025

  1. Only drop flag if it's removed as helmet if the current state is Carried; when we don't do this you can see that the flag is "dropped" twice in KotF: once when the match ends and then again after that, which is noticeable as duplicate messages.
  2. Don't bother sending the "Flag will respawn in n seconds" message if the match is over, and also don't bother showing the flag particle beam either, if the flag is in the Respawning state when the match is over.
  3. Don't send the flag pickup message to console twice; ChatManager.broadcastMessage and friends already do this.
  4. Send match winner message to console.

@calcastor calcastor force-pushed the more-flag-message-stuff branch 2 times, most recently from 464bdf1 to 20c13d9 Compare December 6, 2025 01:00
if (!isFlag(carrier.getInventory().getHelmet())) {
this.dropFlag();
if (isCurrent()) this.dropFlag();
}
Copy link
Member

Choose a reason for hiding this comment

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

i find it somewhat concerning that tickRunning as a whole is called if its not the current state, how is this happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure but this isn't the only place we guard dropFlag like this; we also do so in onEvent (InventoryClickEvent event) in Carried but with an additional guard of delegating it to a ScheduledExecutorService only for MatchPhase.RUNNING.

Looking at usages of tickRunning, it's called only if the match is running in BaseState and the rest of the usages are just supers in classes extending BaseState.

@calcastor calcastor force-pushed the more-flag-message-stuff branch from ad623ad to 5f080f8 Compare December 8, 2025 21:19
Signed-off-by: BT (calcastor/mame) <[email protected]>
Signed-off-by: BT (calcastor/mame) <[email protected]>
@calcastor calcastor force-pushed the more-flag-message-stuff branch from 5f080f8 to c50494c Compare December 10, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants