Skip to content

Fix wrong formating to "Vote Delay Minutes" when delay above 60s #1009

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

Merged
merged 4 commits into from
May 12, 2019
Merged

Fix wrong formating to "Vote Delay Minutes" when delay above 60s #1009

merged 4 commits into from
May 12, 2019

Conversation

PlayBoy31
Copy link
Contributor

See #1007

@asherkin
Copy link
Member

Unless I'm being silly, shouldn't the % just be / here?

@KyleSanderson
Copy link
Member

We still want it to wrap around 60 as that's our current unit of time. FormatTime is likely the most correct fix here.

@PlayBoy31
Copy link
Contributor Author

FormatTime is not appropriate and a time stamp must be used

Some solutions:

  1. limit sm_vote_delay to 3600 seconds to cover the only corner case
  2. or move function int FormatTimeDuration(char[] buffer, int maxlen, int time) from nextmap.sp to another place (maybe in timers.inc as stock) and use FormatTimeDuration to format the delay on basevotes.sp and funvotes.sp

@PlayBoy31
Copy link
Contributor Author

Unless I'm being silly, shouldn't the % just be / here?

Ok corrected as your suggest

@asherkin asherkin merged commit 6addc5c into alliedmodders:master May 12, 2019
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.

3 participants