tagpro-game / tagpro-issues

Public repository to report and review TagPro bugs, enhancements and suggestions.
15 stars 4 forks source link

[Bug] Clock enters negative numbers #203

Closed RonSpawnson closed 8 years ago

RonSpawnson commented 9 years ago

If a game ends and all time runs out, the clock goes to negative numbers. This looks unprofessional but should be a quick fix (check your bounds before deducting the clock past 0).

If we can ever open source the game I'd be happy to submit a pull request to look into it further.

Picture demonstrating the bug: http://i.imgur.com/0zDiaZ7.jpg

NewCompte commented 9 years ago

I think this is the result of flooring instead of rounding the time left. We often get the the "end" socket when the client-side code is a few ms below 0.

RonSpawnson commented 9 years ago

Thanks for the response NewCompte. I was assuming something like this was happening.

Seems like my proposed solution of bounds checking on the client should be able to resolve this issue. After flooring the time left, you could check if it is less than 0 and if so, change it to zero.

Nick-Riggs commented 8 years ago

Duplicate: https://github.com/tagpro-game/tagpro-issues/issues/161