Commit graph

20099 commits

Author SHA1 Message Date
Rafael Fontenelle baedadc1ef
Update brazilian_portuguese.txt 2024-07-17 12:05:10 -03:00
Andriy 17d102f9b8
Update Ukrainian l10n (18.4) 2024-07-17 18:01:30 +03:00
Robert Müller 45f9161d43 Disable "Run server" button and process functions on Android
Starting the server on Android is currently not possible because a) the server executable is currently not compiled for Android b) launching the server executable with `fork` and `exec` is not supported on Android and may result in strange bugs like broken networking.

Running the server in a background service or in a separate process by using `Runtime.getRuntime().exec` from Java code might be feasible, but this is currently too much effort and may be done in the future.

For now, the "Run server" button as well as the process related system functions are disabled via conditional compilation on Android, to prevent the networking bug that would otherwise be triggered by pressing the "Run server" button.
2024-07-17 16:48:17 +02:00
Dennis Felsing c8b25b6e5b
Merge pull request #8606 from def-/pr-libs
Update libraries
2024-07-17 12:31:45 +00:00
Robert Müller 06d16158ba
Merge pull request #8605 from MilkeeyCat/pr_remove_multiline_client_support
Remove multi line chat support
2024-07-17 12:12:49 +00:00
Dennis Felsing 04fba67005 Update libraries
SDL 2.26.5 -> 2.30.5
curl 8.0.1 -> 8.8.0
freetype 2.13.0 -> 2.13.2
sqlite3 3.41.2 -> 3.46.0
ffmpeg 6.0 -> 7.0.1
png 1.6.39 -> 1.6.43
2024-07-17 14:11:51 +02:00
MilkeeyCat 784333b2aa refactor: remove multi line chat support 2024-07-17 14:13:13 +03:00
Dennis Felsing 6e31f2cb43
Merge pull request #8604 from GokturkTalha/patch-9
Update Azerbaijanese translations
2024-07-17 07:18:33 +00:00
Dennis Felsing 287570f058
Merge pull request #8603 from GokturkTalha/patch-8
Update Turkish translations
2024-07-17 07:18:31 +00:00
Talha Aygün 91202eb4ed
Update Azerbaijanese translations 2024-07-17 02:24:38 +03:00
Talha Aygün 2a66f8cdd4
Update Turkish translations 2024-07-17 02:24:13 +03:00
archimede67 fdf13e3bf5
Merge pull request #8602 from Robyt3/Client-Ingame-Players-Skin-Tooltip
Show skin name as tooltip in ingame player list
2024-07-16 20:56:51 +00:00
Robert Müller 90c63746b4 Show skin name as tooltip in ingame player list 2024-07-16 20:38:47 +02:00
Robert Müller 51e47a6f5d
Merge pull request #8597 from def-/pr-transl-18.4
Update translations for upcoming 18.4
2024-07-16 16:52:48 +00:00
Dennis Felsing 3229a19fd5
Merge pull request #8601 from Robyt3/Client-Camera-ZoomAllowed-Function
Extract `CCamera::ZoomAllowed` function to reduce duplicate code
2024-07-16 16:49:40 +00:00
Dennis Felsing 22afa1770b Update German translations 2024-07-16 18:31:37 +02:00
Dennis Felsing 95eb509c93 Update translations for upcoming 18.4 2024-07-16 18:30:08 +02:00
Dennis Felsing 7197b815a1
Merge pull request #8599 from Robyt3/Spectate-UI-Input-Refactoring
Refactor spectator UI input handling
2024-07-16 16:29:07 +00:00
Robert Müller f574f759d4 Extract CCamera::ZoomAllowed function to reduce duplicate code 2024-07-16 18:06:22 +02:00
heinrich5991 02aec0db3b
Merge pull request #8600 from Robyt3/Scoreboard-Team-Name-Localization
Readd separate localization strings for `Red/blue team wins!`
2024-07-16 16:01:17 +00:00
Robert Müller 088f963c0d Readd separate localization strings for Red/blue team wins! 2024-07-16 17:40:57 +02:00
Robert Müller ed53b1c6dc Refactor spectator UI input handling
Use `IInput::KeyPress` instead of event callback for mouse presses. Remove subsequently unnecessary `m_Clicked` variable.
2024-07-16 17:12:58 +02:00
Robert Müller 846775c6b7 Avoid reusing Selected variable for different buttons 2024-07-16 17:12:48 +02:00
Robert Müller e8eb79e7fb Remove unused m_OldMouseX and m_OldMouseY variables 2024-07-16 17:12:45 +02:00
Dennis Felsing 3c43dcd636
Merge pull request #8596 from Robyt3/Android-Restart-App
Implement client restarting on Android
2024-07-16 13:43:51 +00:00
Robert Müller d4f47c2a55 Implement client restarting on Android
Restarting the client previously did not work, as the `shell_execute` function on Android uses `fork` which is not supported.

Now, the client is restarted by using an Android intent to restart the main activity. This is triggered by sending a user-defined message from the native code to the SDL main activity thread.
2024-07-16 12:52:19 +02:00
Robert Müller 78da9689f5 Add basic support for 128 players in scoreboard and spectator UI
Support showing up to 128 players in the scoreboard and the spectator UI. The 128 players are rendered in 3 columns of 43 players in the scoreboard and in 4 columns of 32 players in the spectator UI. Other lists like the server info (ingame and in the server browser) and the voting list already support showing any number of players.
2024-07-15 23:41:33 +02:00
Dennis Felsing 804e87a979
Merge pull request #8593 from Robyt3/Server-MaxClients-Fixes
Fix crashes with `dbg_dummies` and `sv_max_clients`, ensure that `sv_max_clients` can only be set when starting server
2024-07-15 13:26:38 +00:00
Robert Müller 37756aa389 Ensure that sv_max_clients can only be set when starting server
Changing the `sv_max_clients` config variable while the server is running does not change the maximum number of clients that can connect, as this is determined only once when the `CNetServer` is initialized. The reserved slot check and the calculation of the number of player slots for the `protocol7::CNetMsg_Sv_ServerSettings` message were using the `sv_max_clients` config variable directly, which was causing them to be out-of-sync with the real number of maximum clients.

Existing uses of the `sv_max_clients` config variable, except for the `CNetServer` initialization, are replaced with `MaxClients()`. The config variable `sv_max_clients` is now marked as read-only after reading the initial config and command line argument, so changing it via the remote console is not possible and shows an error message. The unnecessary conchain for `sv_max_clients` is removed.
2024-07-15 14:37:11 +02:00
Robert Müller 325e22d2de Fix crashes with dbg_dummies and sv_max_clients
Use the real number of maximum clients returned by the `MaxClients()` function instead of the `MAX_CLIENTS` constant to calculate the debug dummy client IDs to fix a crash when `sv_max_clients` is below `MAX_CLIENTS`.

Ensure the `dbg_dummies` value does not exceed the maximum number of clients.
2024-07-15 14:36:50 +02:00
Dennis Felsing b0f0292fc9
Merge pull request #8588 from Robyt3/Snapshot-Usage-Cleanup
Simplify usage of `IClient::SnapGetItem` function, remove unnecessary `IClient::SnapGetItem` function
2024-07-14 12:49:07 +00:00
Dennis Felsing 91c2e6ef80
Merge pull request #8589 from Learath2/pr_antibot_empty_addr
Reset and regenerate m_aPeerAddrStr appropriately
2024-07-14 12:30:04 +00:00
Learath ebd266c419 Reset and regenerate m_aPeerAddrStr appropriately
Hopefully fixes #8587
2024-07-14 14:11:19 +02:00
Robert Müller 2f6c3abc90 Remove unnecessary IClient::SnapItemSize function
The item data size is already returned by the `IClient::SnapGetItem` function and getting only the size is not currently useful, so the additional `IClient::SnapItemSize` function is unnecessary.
2024-07-14 13:18:30 +02:00
Robert Müller e9646ba157 Simplify usage of IClient::SnapGetItem function
Let the `IClient::SnapGetItem` function return an `IClient::CSnapItem` directly instead of passing it as a pointer. Add the item data pointer as a member variable to `IClient::CSnapItem` instead of returning it separately. Therefore, the separate data pointer of the class `CSnapEntities` is also not necessary anymore.

Consistently mark the snapshot items and data as `const`. The C-style cast to `void *` in the `IClient::SnapGetItem` function was previously implicitly casting away the `const` of the snapshot pointers.
2024-07-14 13:15:44 +02:00
Dennis Felsing 7014021909
Merge pull request #8585 from Robyt3/Tools-Demo-Extract-Chat-Snapshot-Cleanup
Cleanup snapshot member variables in `demo_extract_chat` tool
2024-07-13 22:10:28 +00:00
Robert Müller a31d6a571a Cleanup snapshot member variables in demo_extract_chat tool
Using `CSnapshotStorage::CHolder`s in the `demo_extract_chat` tool is not necessary, as only the member variable `m_pAltSnap` is being used in this tool. The regular snapshot data was copied into `m_pSnap` but never read. The other member variables were initialized but never read.
2024-07-13 22:51:31 +02:00
Dennis Felsing 9249b61f9f
Merge pull request #8582 from Robyt3/Android-Rust-Fix
Fix `--manifest-path` argument usage for Android build
2024-07-13 09:50:19 +00:00
Robert Müller 6c4b920f0a Fix --manifest-path argument usage for Android build
Whereas `cargo` expects the `--manifest-path` argument after the `build` command, `cargo ndk` only supports arguments being specified before the `build` command, which was causing the Android build to fail with:

```
error: Failed loading manifest
error: No such file or directory (os error 2)
```

Regression from #8557.
2024-07-13 11:31:40 +02:00
Dennis Felsing 888534e070
Merge pull request #8581 from Robyt3/Scoreboard-NonTeams-Blue-Size
Fix incorrect scoreboard size if blue team used without teams flag
2024-07-12 22:29:07 +00:00
Robert Müller e277131cf8 Fix incorrect scoreboard size if blue team used without teams flag
When `GAMEFLAG_TEAMS` is not set, only the players of the red team are rendered in the scoreboard, but the size of the scoreboard was incorrectly calculated based on the size of the larger team (red or blue), which should only be done when `GAMEFLAG_TEAMS` is set.
2024-07-12 21:44:16 +02:00
Dennis Felsing a21ff5b72e
Merge pull request #8578 from Robyt3/Gamecore-Cleanup
Minor cleanup of `gamecore.cpp/h`
2024-07-11 19:51:15 +00:00
Robert Müller 7cbfe1623d Avoid duplicate distance calculation
Add variable `NewVelLength` to avoid calculating `length(NewVel)` twice.
2024-07-11 18:02:51 +02:00
Robert Müller 660c1de8f2 Remove unnecessary use of this
The same variable `m_HookHitDisabled` is also being accessed without `this`.
2024-07-11 18:02:24 +02:00
Robert Müller 998adfcefc Remove redundant distance checks
The check `Distance > 0.0f` is redundant because the same check already exists in the outer if-statement and the variable `Distance` is never modified.

The check `D >= 0.0f` is redundant because mathematically any distance is greater or equal to zero.
2024-07-11 17:54:51 +02:00
Robert Müller aeee2f561d Remove dead code and obsolete TODO
It seems unlikely we that would want to introduce a variable to tweak the hook behavior at this point, so the TODO is removed.
2024-07-11 17:54:41 +02:00
Robert Müller 8e83049054
Merge pull request #8352 from ChillerDragon/pr_multi_cmd_helptext
Show help text when chaining multiple commands
2024-07-10 16:46:47 +00:00
heinrich5991 89992f2ce5
Merge pull request #8576 from def-/pr-mem-copy
Make FillAntibot faster
2024-07-10 13:24:15 +00:00
Dennis Felsing 108d0dc715 Make FillAntibot faster 2024-07-10 15:06:16 +02:00
Dennis Felsing fa9f7b46cd
Merge pull request #8574 from Learath2/dd_pr_antibot_netaddr
net_addr_str only once
2024-07-09 19:04:48 +00:00