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

#68633 Avoid duplicates in speed adjustments #70831

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

alef
Copy link
Contributor

@alef alef commented Jan 10, 2024

Summary

Bugfixes "Avoid duplicates in speed adjustments"

Purpose of change

Creature::effects can be altered by the debug menu, but Character::mod_speed_bonus is altered during a turn, so in the future. This is probably what created confusion, as by the note comment in previous code.

Describe the solution

I inverted the two loops so that I first fill the std::vector with the std::map.
Then I append speed_bonus_effects but using the std::map to avoid duplicates.

Describe alternatives you've considered

Testing

Only on Windows 10 SDL, under VS debugger. Using Debug menu to add frenzy effect, step through code and observe.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions labels Jan 10, 2024
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 10, 2024
@alef alef marked this pull request as ready for review January 10, 2024 21:40
@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 10, 2024
@Maleclypse Maleclypse merged commit dc3420d into CleverRaven:master Jan 14, 2024
@alef alef deleted the fix-68633 branch January 14, 2024 09:26
@Procyonae Procyonae added the 0.H Backport PR to backport to the 0.H stable release canddiate label May 20, 2024
@Procyonae Procyonae mentioned this pull request May 20, 2024
Maleclypse added a commit that referenced this pull request May 21, 2024
@Procyonae Procyonae added 0.H Backported and removed 0.H Backport PR to backport to the 0.H stable release canddiate labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.H Backported astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants