Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SelectedUnitsHandler be a bit smarter about updating. #1825

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saurtron
Copy link
Collaborator

Work done

  • Don't set selectionChanged or possibleCommandsChanged when nothing actually changed.

Remarks

  • Should be safe but setting as draft for now so it can be tested well.

@saurtron saurtron changed the title Make SelectedUnitsHandler be a bit smarter about deciding when it needs to update. Make SelectedUnitsHandler be a bit smarter about updating. Dec 17, 2024
rts/Game/SelectedUnitsHandler.cpp Outdated Show resolved Hide resolved
possibleCommandsChanged = true;
selectedGroup = -1;
unit->isSelected = false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like how unit->isSelected was hard-guaranteed false previously. I'd keep something like else assert(!unit->isSelected);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants