Commit graph

20727 commits

Author SHA1 Message Date
Robert Müller 3656c95eca Ensure commands executed via FIFO are valid UTF-8 2024-03-06 22:01:10 +01:00
Dennis Felsing b6689bc012
Merge pull request #8068 from heinrich5991/pr_ddnet_job_atomics
Fix race conditions in job state handling
2024-03-05 21:57:11 +00:00
heinrich5991 e7717f2265 Fix race conditions in job state handling
We want to change the state of the job from `STATE_QUEUED` to
`STATE_RUNNING`, but not from `STATE_ABORTED`. Previously, the code
usedd `exchange` to change the state and compared non-atomically
afterwards. This led to `STATE_ABORTED` being replaced by
`STATE_RUNNING` in a race. With `compare_exchange_strong`, this can no
longer happen.

Fixes #8044.
2024-03-05 20:55:44 +01:00
heinrich5991 819270c453
Merge pull request #8066 from Robyt3/Http-Error-Fixes
Fix HTTP client shutdown and deadlock on request error
2024-03-05 19:46:33 +00:00
Robert Müller 9323e18616 Fix HTTP client shutdown and deadlock on request error
Fix HTTP client effectively shutting down by entering the `ERROR` state when a request cannot be added. Now only the invalid request is aborted immediately. The `ERROR` state is now only entered when a curl function fails in a way where recovery is not possible.

Fix occasional deadlock when HTTP client is shutting down after entering the `ERROR` state, by also immediately aborting new requests when the HTTP client is already in the `ERROR` state.

Remove unused `CHttp::EState::STOPPING`.
2024-03-05 19:48:45 +01:00
Dennis Felsing f3de37d9d4
Merge pull request #8019 from heinrich5991/pr_ddnet_rename_variables
Rename all variables for strict camel-casing of abbreviations
2024-03-05 16:06:58 +00:00
heinrich5991 44bf0134f0
Merge pull request #8065 from dobrykafe/pr-solo-practice-bug
Fix practice mode not resetting after disconnect on solo servers
2024-03-05 15:20:34 +00:00
heinrich5991 17402cc43f Rename all variables for strict camel-casing of abbreviations
This is the strict version, ID → Id, UI → Ui, except DDNet which stays
DDNet.

This would fix #7750.

Done using a naive rename script (for bash, use `shopt -s globstar`):

```fish
sed -i \
	-e 's/\([a-z]_\?\)ID/\1Id/g' \
	-e 's/\([^ ]\)\<UI\>/\1Ui/g' \
	-e 's/UI()/Ui()/g' \
	-e 's/\<CUI\>/CUi/g' \
	-e 's/\([\ta-z.(&]\|[,=|] \)ID\>/\1Id/g' \
	-e 's/\<ID\>\([^ ").]\)/Id\1/g' \
	-e 's/\<ID\([0-9]\)/Id\1/g' \
	-e 's/\<ID\>\( [<=>:+*/-]\)/Id\1/g' \
	-e 's/int ID/int Id/g' \
	-e 's/\([a-z]_\?\)GPU/\1Gpu/g' \
	-e 's/\([a-z]_\?\)IP/\1Ip/g' \
	-e 's/\([a-z]_\?\)CID/\1Cid/g' \
	-e 's/\([a-z]_\?\)MySQL/\1Mysql/g' \
	-e 's/MySql/Mysql/g' \
	-e 's/\([a-xz]_\?\)SQL/\1Sql/g' \
	-e 's/DPMode/DpMode/g' \
	-e 's/TTWGraphics/TTwGraphics/g' \
	\
	-e 's/Ipointer/IPointer/g' \
	-e 's/\.vendorId/.vendorID/g' \
	-e 's/\.windowId/.windowID/g' \
	-e 's/SDL_GetWindowFromId/SDL_GetWindowFromID/g' \
	-e 's/SDL_AudioDeviceId/SDL_AudioDeviceID/g' \
	-e 's/SDL_JoystickId/SDL_JoystickID/g' \
	-e 's/SDL_JoystickInstanceId/SDL_JoystickInstanceID/g' \
	-e 's/AVCodecId/AVCodecID/g' \
	src/**/*.cpp src/**/*.h {datasrc,scripts}/**/*.py
git checkout -- src/engine/external
```

I like this option because it presents clear rules.

Still needs fixups because of the naive replacement, I'd do this if we
want this merged.
2024-03-05 15:44:09 +01:00
dobrykafe d94d020c25 fix practice mode not resetting after disconnect on solo servers 2024-03-05 14:08:30 +01:00
Dennis Felsing ca9f5dfcbe
Merge pull request #8064 from By622/patch-9
Update traditional_chinese.txt
2024-03-05 09:05:35 +00:00
By 888ac2f2d4
Update traditional_chinese.txt 2024-03-05 12:01:58 +08:00
heinrich5991 c15733eda3
Merge pull request #8063 from heinrich5991/pr_ddnet_register_error
Show error from masterserver in console
2024-03-04 23:08:25 +00:00
Dennis Felsing 3c6101ccb3
Merge pull request #8061 from dobrykafe/pr-czech-translations
Update Czech translations
2024-03-04 22:36:41 +00:00
heinrich5991 12409e545c Show error from masterserver in console
Allows people to see why masterserver registering failed.
2024-03-04 21:58:30 +01:00
heinrich5991 27467c658b
Merge pull request #8062 from Robyt3/Client-Command-Register-Cleanup
Remove remaining hard-coded server commands from client-side, hide `tune_zone` command in local console
2024-03-04 20:46:03 +00:00
Robert Müller dd94da67fb Hide tune_zone command in local console
Prevent the `tune_zone` command from being shown and used in the local console, which could cause issues with prediction, by only registering it as a game setting but not as a client command. The command callback is still correctly called when map settings are loaded in the `CGameClient::LoadMapSettings` function.
2024-03-04 21:26:47 +01:00
Robert Müller bfa5bc2b3c Remove remaining hard-coded server commands from client-side
Followup for #7919.
2024-03-04 21:26:41 +01:00
dobrykafe a8192c19a0 update czech translations 2024-03-04 20:43:47 +01:00
Dennis Felsing b88cdbf21e
Merge pull request #8055 from heinrich5991/pr_ddnet_no_duplicate_git_rev
Don't show the git revision twice in server log
2024-03-04 16:09:21 +00:00
heinrich5991 e851c78e47 Don't show the git revision twice in server log
Previously:
```
2024-03-03 12:17:40 I git-revision: 885ae7ecae
2024-03-03 12:17:40 I server: version 18.0.3 on linux amd64
2024-03-03 12:17:40 I server: git revision hash: 885ae7ecae
```
2024-03-04 16:50:45 +01:00
Dennis Felsing 7f08344aa8
Merge pull request #8054 from eghwand/turkish-1
Update turkish.txt
2024-03-04 10:15:22 +00:00
Dennis Felsing 93dc17a59f
Merge pull request #8052 from Bamcane/patch-5
Update simplified_chinese.txt
2024-03-04 10:04:57 +00:00
Egehan c0b5d089e2 Update data/languages/turkish.txt
Co-authored-by: Emir Marincic <learath2@gmail.com>
2024-03-04 10:48:26 +01:00
Egehan 545e4df438 Update data/languages/turkish.txt
Co-authored-by: Emir Marincic <learath2@gmail.com>
2024-03-04 10:48:26 +01:00
Egehan 8ecb7415d3 Update data/languages/turkish.txt
Co-authored-by: Emir Marincic <learath2@gmail.com>
2024-03-04 10:48:26 +01:00
Egehan f3113e5136 Update turkish.txt 2024-03-04 10:48:26 +01:00
甘竹 Bamcane 57985cd8bd Update simplified_chinese.txt 2024-03-04 10:47:55 +01:00
Dennis Felsing 65a880a468
Merge pull request #8059 from n0Ketchp/patch-17
Update spanish.txt
2024-03-04 09:47:51 +00:00
noKetchup dde7b8a624
Update spanish.txt 2024-03-04 06:30:02 -03:00
Dennis Felsing 70eca3869a
Merge pull request #8051 from dobrykafe/pr-serverbrowser-friends-sort
Add sorting by number of friends to the server browser
2024-03-04 07:27:48 +00:00
Dennis Felsing b6cb7b112d
Merge pull request #8050 from gerdoe-jr/patch-1
Update russian.txt
2024-03-03 22:47:12 +00:00
Dennis Felsing a3e6a2dc50
Merge pull request #8056 from def-/pr-try-python-fix-macos
Try to fix python macOS issue
2024-03-03 22:46:58 +00:00
Dennis Felsing b0e9f5172d Try to fix python macOS issue
Fixes: #8053
2024-03-03 23:18:38 +01:00
Emir Marincic b031b7bdaa
Merge pull request #8057 from Robyt3/Skin-Trunc-Crash-Fix
Fix client crash due to truncated skin name
2024-03-03 18:26:50 +01:00
Robert Müller 6b3e16ea82 Fix client crash due to truncated skin name 2024-03-03 18:18:49 +01:00
dobrykafe 13f324ccf4 add sort by number of friends to server browser 2024-03-03 02:01:28 +01:00
Vladislav Gerasimov a68eacf500
Update russian.txt 2024-03-03 03:33:31 +03:00
Vladislav Gerasimov 9409d2e0f1
Update russian.txt 2024-03-03 03:11:51 +03:00
Dennis Felsing 885ae7ecae
Merge pull request #8049 from rffontenelle/patch-4
Update brazilian_portuguese.txt
2024-03-02 22:32:31 +00:00
Dennis Felsing e63cebfc5d
Merge pull request #8048 from furo321/swedish-18.1
Update Swedish translations for 18.1
2024-03-02 22:18:35 +00:00
Rafael Fontenelle 82b27c85b7
Update brazilian_portuguese.txt 2024-03-02 16:19:23 -03:00
furo 6ab99c4760 Update Swedish translations for 18.1 2024-03-02 18:22:06 +01:00
Robert Müller 9346aa9ea8
Merge pull request #8045 from def-/pr-18.1-transl
Update translations for upcoming 18.1
2024-03-02 13:42:18 +00:00
Dennis Felsing 66cc7b5e5b Update translations for upcoming 18.1 2024-03-02 14:09:33 +01:00
Dennis Felsing c0e4a4c3f2
Merge pull request #8002 from dobrykafe/pr-change-info-countdown
Show countdown message in player/tee settings for `sv_info_change_delay`
2024-03-02 13:02:06 +00:00
Dennis Felsing 968d08c716
Merge pull request #8026 from Robyt3/Base-Threading-Error-Handling
Add assertions to all thread and semaphore functions
2024-03-02 13:00:58 +00:00
Dennis Felsing 5d070ec5c3
Merge pull request #8043 from Robyt3/Editor-Envelope-Point-Color-Fix
Fix editor crash when right-clicking bezier control points
2024-03-02 12:50:42 +00:00
Robert Müller 350acae56b
Merge pull request #8041 from Jupeyy/pr_small_alloc_fix_vk
Search __most__ fitting allocation, not _first_ fitting
2024-03-02 12:36:48 +00:00
Robert Müller 6895cdc343 Fix editor crash when right-clicking bezier control points
The color selection should only be shown for normal envelope points but not for bezier control points, because it always changes the previously selected normal envelope point. This caused the client to crash when right-clicking a bezier control point when no normal envelope point was previously selected.

Closes #8020.
2024-03-02 13:16:26 +01:00
Jupeyy ec39742017 Search __most__ fitting allocation, not _first_ fitting 2024-03-02 13:12:58 +01:00