Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2019-07-28 00:00:00Z and 2019-07-29 00:00:00Z
@heinrich5991 that commit applies weapon inputs according to their intended/desired ticks instead of according to when they arrive to the server (which may be earlier than intended due to lag/jitter, and not always guaranteed to be in order)
if this code causes unwanted weapon switches I might have an idea why. the client only sends one input per tick (so normally inputs are guaranteed to be applied in order), but if an input arrives later than its intended tick (due to lag), the server will set the intended tick to the current tick. so if two inputs arrive late at the same time (originally intended for tick N-1 and N-2) they would both end up being applied at tick N. looking at the code it could be improved for this case, by applying them in the order they arrived (which is what the server would normally do before this commit) instead of their order in the array