Skip to content

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

Merged
asherkin merged 4 commits intoalliedmodders:masterfrom
PlayBoy31:master
May 12, 2019
Merged

Fix wrong formating to "Vote Delay Minutes" when delay above 60s#1009
asherkin merged 4 commits intoalliedmodders:masterfrom
PlayBoy31:master

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