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

Fix morale decay check frequency #27803

Merged
merged 2 commits into from Jan 24, 2019
Merged

Fix morale decay check frequency #27803

merged 2 commits into from Jan 24, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jan 23, 2019

Summary

SUMMARY: Bugfixes "Fixes #27733 - Morale effects last 10x longer than they should"

Purpose of change

Fixes #27733

Describe the solution

Morale effect update check was running every minute ( 60 seconds ) , instead of every turn ( 6 seconds)
Now killing innocent decays over 2 days, as the effect says it should.
As to whether killing an innocent should decay over 2 days is really another issue! but this brings it in line with stated values.

Describe alternatives you've considered

N/A

Additional context

N/A

@KorGgenT
Copy link
Member

you forgot the last quote at the end of your summary line

@ghost
Copy link
Author

ghost commented Jan 23, 2019

you forgot the last quote at the end of your summary line

Thx

@ghost ghost changed the title fix morale decay check frequency Fix morale decay check frequency Jan 23, 2019
@ghost
Copy link
Author

ghost commented Jan 23, 2019

jenkins rebuild

@kevingranade
Copy link
Member

kevingranade commented Jan 23, 2019 via email

@Barhandar
Copy link
Contributor

If the rate limiter is intentional (by the way, reddit is reporting slowdown on recent builds without this PR), then it should decay morale by ten times as much; alternately, all morale durations need to be 1/10th the current values.

@AMurkin
Copy link
Contributor

AMurkin commented Jan 23, 2019

Isn't calendar::once_every( 1_turns ) always true? Especially in g->do_turn()?

@ghost
Copy link
Author

ghost commented Jan 23, 2019

Yep - reverted frequency to 1 per minute, but made update_morale process 10 turns worth every time. Avoid potential performance problems

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Mechanics: Character / Player Character / Player mechanics labels Jan 23, 2019
@ZhilkinSerg
Copy link
Contributor

by the way, reddit is reporting slowdown on recent builds without this PR

Changed renderer in graphic settings to anything else than software

@kevingranade kevingranade merged commit ca7031a into CleverRaven:master Jan 24, 2019
@ghost ghost deleted the morale_fix branch January 25, 2019 16:25
@ifreund ifreund mentioned this pull request Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moral effects last 10x as long as they should
5 participants