Use different colors to highlight tuning parameters when using `dbg_tuning`:
- red: value changed globally
- blue: value changed only in current zone
- green: value changed globally but reset to default by tune zone
- grey: value unchanged globally and in current zone
In addition to this, with `dbg_tuning 1` the unchanged parameters and the velramp graphs are not shown anymore. With `dbg_tuning 2` all parameters and graphs are shown as it was previously the case with `dbg_tuning 1`.
The position of the debug information is adjusted so it overlaps less with the HUD. When many tuning parameters are shown, the parameters now wrap to another column instead of extending beyond the height of the screen.
Headers are also added to each column.
Also show current tune zone.
Show value on every line instead of having some lines without a value.
Improve labels.
Reduce duplicate code and improve readability.
Saves were deleted without the team getting its state when /load and
/save both happened during mysql server not reachable.
Before this fix, the saves were only in the DDNet log output for
recovery, not in any database anymore.
`Write::BACKUP_FIRST` is 0 so always false, so the previous code
didn't harm other code paths (especially `Write::NORMAL`).
The saves were tried to retrieve two times from the database, therefore
at the second time it didn't exist anymore. One time erroneously in
`Write::BACKUP_FIRST` and the second time in `Write::NORMAL_FAILED`.
Fixes#6924
The server does not allow adding more than `MAX_VOTE_OPTIONS` vote options, so the client will now also refuse to add more options than that.
Supersedes #6930.
Replace skyline-based texture atlas algorithm with a rectangle packing algorithm that tracks empty atlas sections using `std::vector`s. The algorithm is very loosely inspired by https://github.com/TeamHypersomnia/rectpack2D.
Increases texture atlas utilization from ~70% to ~90-94%, i.e. less space in the atlas is unused.
Decreases the computational time to find suitable free regions in the atlas by factor 40x-164x (depending on atlas dimension and utilization). In absolute numbers, the computational time necessary for a glyph being added to the atlas is decreased from 0.0556ms-0.4679ms to 0.0013ms-0.0051ms (depending on atlas dimension and utilization).
The memory usage for the texture atlas algorithm increases from a maximum of ~128 KB to a maximum of ~3 MB.
The `Translate` function modifies the first argument, so the client ID keeps changing when the function is being used in a loop. Additionally, calling `Translate` manually is not necessary for messages, as client IDs in messages are already automatically translated when using `SendPackMsg`. Both faults can cause emoticons to appear on the wrong players when the emote spamprotection limits emotes to nearby players.
This still works
$ ./DDNet "connect 127.0.0.1"
But now also this works
$ ./DDNet "connect tw-0.6+udp://ger10.ddnet.org:8303"
2023-07-16 14:07:50 I engine: running on unix-linux-amd64
2023-07-16 14:07:50 I client: starting...
2023-07-16 14:07:50 I client: version 17.1.1 on linux amd64
2023-07-16 14:07:50 I client: git revision hash: 7f100e2620
2023-07-16 14:07:50 I client: connecting to 'tw-0.6+udp://ger10.ddnet.org:8303'
2023-07-16 14:07:50 I host_lookup: host='ger10.ddnet.org' port=8303 3
2023-07-16 14:07:51 I client: connected, sending info
When quitting or restarting the client, clear the screen and render a message "Quitting. Please wait…" or "Restarting. Please wait…" respectively.
Previously the last frame would keep getting shown while the client is busy with cleanup tasks. Rendering a final message before the client window stops being updated provides a cleaner user experience.