mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
48e53470cd
4581: Adjustable prediction margin r=def- a=trml This adds an option to adjust how early the client sends an input for a given tick. In vanilla this value is hardcoded to 10 milliseconds before the next tick, which is good for low-latency gameplay and/or when you have a stable connection, but sometimes it could perhaps be useful to increase the value, to either test something with a high ping (without having to joing a high-ping server or use on a 3rd party program like tc/netem), or for counteracting the effect of jitter and jumping ping. The last part comes at a tradeoff for higher ping though, and it also doesn't handle lag caused by packet loss, but it I have found it useful in some situations when playing race/solo/dummy with a bad connection. Since it's a bit experimental I only added it as an f1 option and not stored between sessions, and also added a gameinfo flag to only support it on servers that implement #1441. Edit: Also attempted to cleanup variable names for tick calculations in client.cpp slightly. ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [x] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [x] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 4590: Remove extra projectiles r=def- a=trml Aligns the code with vanilla, and cleans up things a bit (same as [ |
||
---|---|---|
.. | ||
client | ||
docs | ||
external | ||
server | ||
shared | ||
antibot.h | ||
client.h | ||
config.h | ||
console.h | ||
demo.h | ||
discord.h | ||
editor.h | ||
engine.h | ||
friends.h | ||
ghost.h | ||
graphics.h | ||
input.h | ||
kernel.h | ||
keys.h | ||
map.h | ||
masterserver.h | ||
message.h | ||
server.h | ||
serverbrowser.h | ||
sound.h | ||
sqlite.h | ||
steam.h | ||
storage.h | ||
textrender.h | ||
updater.h | ||
uuid.h | ||
warning.h |