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 wrong formating to "Vote Delay Minutes" when delay above 60s #1009

Merged
merged 4 commits into from May 12, 2019

Conversation

@PlayBoy31
Copy link
Contributor

PlayBoy31 commented May 11, 2019

See #1007

PlayBoy31 added 2 commits May 11, 2019
@asherkin

This comment has been minimized.

Copy link
Member

asherkin commented May 11, 2019

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

@KyleSanderson

This comment has been minimized.

Copy link
Member

KyleSanderson commented May 11, 2019

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

This comment has been minimized.

Copy link
Contributor Author

PlayBoy31 commented May 11, 2019

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 added 2 commits May 12, 2019
@PlayBoy31

This comment has been minimized.

Copy link
Contributor Author

PlayBoy31 commented May 12, 2019

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
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.