Commit graph

20691 commits

Author SHA1 Message Date
Dennis Felsing 6c5095203f
Merge pull request #8527 from Robyt3/Client-GenerateTimeoutCode
Extract `GenerateTimeoutCode` function to reduce duplicate code, avoid magic numbers for generating timeout code
2024-06-26 21:51:48 +00:00
Robert Müller 872052b5b2 Avoid magic numbers for generating timeout code 2024-06-26 22:01:29 +02:00
Robert Müller 04b37f2db7 Extract GenerateTimeoutCode function to reduce duplicate code 2024-06-26 21:53:53 +02:00
Dennis Felsing f21976b0ed
Merge pull request #8524 from ChillerDragon/pr_test_crc_overflow
Add tests for snapshot crc overflow
2024-06-26 15:07:14 +00:00
ChillerDragon b138cc9f13 Add tests for snapshot crc overflow 2024-06-26 20:36:52 +08:00
Dennis Felsing 1cf8761b44
Merge pull request #8522 from Yacinello-droid/patch-1
Update russian.txt
2024-06-25 22:00:11 +00:00
Dennis Felsing b0a1135de6
Merge pull request #8521 from Robyt3/Client-Loading-Improvements
Refactor client loading and loading screen, fix progress bar alignment when updating
2024-06-25 21:57:29 +00:00
Yacinello-droid 313f44ffbd
Update russian.txt 2024-06-26 02:42:29 +05:00
Robert Müller 877096f977 Fix alignment of progress bar while updating client
The progress bar was positioned relative to the updating message. Now the progress bar is always right-aligned with the other buttons.
2024-06-25 22:44:45 +02:00
Robert Müller e135145363 Ensure logged time covers whole CGameClient::OnInit function
Get start time as soon as possible and log time for gameclient initialization at the end of the `CGameClient::OnInit` function so this time measurement should cover the entire function.

Use `log_trace` and change spelling for consistency (`initialisation` -> `initialization`).
2024-06-25 22:44:22 +02:00
Robert Müller ab729e0346 Minor refactoring of client loading
Avoid duplicate `Localize` calls while loading.

Start component counters at 1 instead of 0 since the value was always incremented by 1 before being used.

Extract variable `NumComponents` and also use it for the special loading message, so it should consistently be shown only for the first component (i.e. the last component being initialized) also when more components will be added.
2024-06-25 22:43:21 +02:00
Robert Müller d1516a14a5 Refactor client loading screen rendering
Use `CUi::RenderProgressBar` function also for client loading, which means the filled progress bar background will also be rendered while loading.

Replace static variable `s_LastLoadRender` with member variable.

Encapsulate menu loading state in class `CLoadingState`.
2024-06-25 22:41:02 +02:00
Robert Müller 5f9d97a2aa Extract CUi::RenderProgressBar function 2024-06-25 22:40:58 +02:00
Dennis Felsing e29409de64
Merge pull request #8519 from Robyt3/Client-Browser-Refresh-UiPage-Fix
Fix browser not refreshing if `ui_page` is changed in start menu, refresh LAN tab after starting/stopping local server
2024-06-24 21:03:17 +00:00
Robert Müller 3947ba40b1 Refresh LAN tab after starting/stopping local server
After starting/stopping the local server from the main menu, refresh the LAN tab on its next activation, so it immediately shows/hides the started/stopped server without needing a manual refresh.

This is not a perfect solution, as the server would not show up when activating the LAN tab immediately after starting the server, because the server needs some time before it will respond to server info requests, but this works well enough unless the hotkeys are used.
2024-06-24 22:10:34 +02:00
Robert Müller 2974e5197e Fix browser not refreshing if ui_page is changed in start menu
When changing `ui_page` via the console while the start menu is active, the browser tab was not refreshed when clicking the Play-button, leading to the old server list being shown for the new browser tab.
2024-06-24 22:10:20 +02:00
Dennis Felsing 0f61b173a8
Merge pull request #8493 from furo321/practice-max-team-size
Don't check `sv_max_team_size` for teams in practice
2024-06-24 18:06:01 +00:00
furo 93bf7cbc59 Don't check sv_max_team_size for teams in practice 2024-06-24 18:21:42 +02:00
Dennis Felsing 248a24845e
Merge pull request #8513 from MilkeeyCat/pr_ddnet_fix_da_translations
Add context to translations & add removed translations
2024-06-23 18:32:01 +00:00
archimede67 62c3c4274d
Merge pull request #8514 from Robyt3/Updater-Cleanup
Minor cleanup of updater and HTTP client
2024-06-23 18:18:54 +00:00
archimede67 76b53d7b7a
Merge pull request #8515 from MilkeeyCat/pr_ddnet_fix_browser_settings_argument_highlighting
Correct arguments highlighting after removing entry
2024-06-23 18:02:43 +00:00
MilkeeyCat cdfe451880 fix: correct arguments highlighting after removing entry 2024-06-23 20:31:20 +03:00
MilkeeyCat 635f91be12 fix: add context to translations & add removed translations 2024-06-23 17:54:18 +03:00
Robert Müller 51b37aa240 Fix HTTP progress values being above 100 if total size is unknown
If the total download size is unknown (i.e. zero), return 0% instead of returning a very large value above 100%.
2024-06-23 16:08:54 +02:00
Robert Müller c4b9924b28 Use named enum EUpdaterState instead of int 2024-06-23 16:08:46 +02:00
Robert Müller 80ff5157d0
Merge pull request #8504 from MilkeeyCat/pr_ddnet_trim_strings_in_search_and_exclude_inputs
Trim Strings on Search/Exclude Filter & Add Tooltip
2024-06-23 13:13:31 +00:00
MilkeeyCat 31966d52a6 feat: trim strings in search & exclude inputs 2024-06-23 14:25:31 +03:00
Dennis Felsing 123a21bb01
Merge pull request #8510 from Robyt3/Sound-Sample-Fixes
Ensure sample indices are initialized also with sound disabled, faster map loading with sound disabled, fix map sound warning
2024-06-21 16:33:58 +00:00
Robert Müller 91cf20ced4 Faster map loading with sound disabled, fix map sound warning
Fix map sound loading warning being incorrectly shown when sound is disabled. Make map loading faster in this case by not unpacking the sound data and sound sources from the map at all if sound is disabled.

Closes #8450.
2024-06-21 17:38:56 +02:00
Robert Müller efa069ef80 Ensure sample indices are initialized also with sound disabled
The assertion of #8262 can be reproduced when sound is disabled or failed to be initialized, as the sample indices where not being initialized properly in these cases. It is still necessary to initialized them so sounds can be loaded in the editor also when sound is disabled.

The potential thread-safety issues of the `CSound::AllocSample` function are not yet resolved so the issue remains open.
2024-06-21 17:38:16 +02:00
Dennis Felsing 1457f42620
Merge pull request #8505 from Sedonya/patch-2
Update russian.txt
2024-06-20 05:28:25 +00:00
Dennis Felsing e7bd56544b Fix indentation 2024-06-20 13:10:51 +08:00
Sedonya_ 6153a8dc76
Update russian.txt 2024-06-20 03:19:23 +05:00
heinrich5991 f5d28f155a
Merge pull request #8499 from Robyt3/Client-Spectate-HUD-Cleanup
Remove `Spectate` label from HUD, show `Following {player}` instead
2024-06-18 20:07:11 +00:00
Robert Müller 908ebc65ee Remove Spectate label from HUD, show Following {player} instead 2024-06-18 21:49:06 +02:00
Dennis Felsing 7ee7ec6434
Merge pull request #8498 from Robyt3/Client-Console-Dump-Refactor
Move `CGameConsole::Dump` function to `CGameConsole::CInstance`
2024-06-18 02:25:59 +00:00
Robert Müller 6df4ff3a44 Move CGameConsole::Dump function to CGameConsole::CInstance
Avoid the `int Type` parameter by making `CGameConsole::Dump` a member function of `CGameConsole::CInstance`.

Use `log_*` functions instead of `IConsole` for logging.
2024-06-17 22:36:25 +02:00
Dennis Felsing 4b08c8cffb
Merge pull request #8494 from n0Ketchp/patch-19
Update spanish.txt
2024-06-16 00:34:53 +00:00
noKetchup ede5fe55d6
Update spanish.txt 2024-06-15 15:09:59 -04:00
Dennis Felsing 003a58cdc7
Merge pull request #8492 from BlaiZephyr/readme_help
update practice help text
2024-06-15 02:33:59 +00:00
meloƞ b05620d1eb update practice help text 2024-06-15 04:14:53 +02:00
Dennis Felsing 3d4a9af659
Merge pull request #8489 from Robyt3/UI-DoubleClick-Handling
Move double-click handling from engine input to UI, improve envelope editor double-click handling
2024-06-15 01:03:40 +00:00
Robert Müller 4852dc435d Move double-click handling from engine input to UI
Instead of relying on SDL to determine when a click is a double-click, implement double-click handling specifically for the UI, as double-clicks are only supposed to be used there. This allows us to ensure that double-clicks only activate UI elements if both clicks were performed on the same UI element. Previously, only the position of the second click was considered, so UI element would incorrectly activate when double-clicking close to them as long as the second click starts and ends on them.

Implementing double-clicking handling separately is also necessary to support double-clicking in the UI with touch events, as SDL does not provide the double-click information for touch events.

The newly added `CUi::DoDoubleClickLogic` function should be called after a UI element has been clicked. It will return `true` if the current click should be interpreted as a double-click, i.e. if the same UI element was clicked, the click was within 0.5 seconds of the previous click (the default duration for SDL and Windows) and the distance from the previous click is within 32 screen pixels (the default distance for SDL).
2024-06-14 23:34:38 +02:00
Robert Müller 264df1f035 Improve envelope editor double-click handling
Only handle the double-click on the envelope editor when the second click is released instead of when it is pressed down already.

Remove unnecessary UI element `s_BoxSelectId`, the temporary activation of which was causing the tooltip to be missing for one frame when clicking the envelope editor.
2024-06-14 23:24:23 +02:00
Jupeyy f061dfdc84
Merge pull request #8480 from TylerStocks1/master
Readd is not a word, Reload makes more sense and is easier readablility.
2024-06-14 12:44:04 +00:00
Dennis Felsing ec42dea161 Version 18.3 2024-06-14 13:09:57 +08:00
Dennis Felsing b422c3cb26
Merge pull request #8486 from Robyt3/Server-Tile-Handling-Fix
Fix tiles being handled in same tick for dead tees in some cases
2024-06-14 04:31:51 +00:00
Tyler Stocks 249c8572ae
Update popups.cpp 2024-06-14 01:04:19 +01:00
Robert Müller cf6296c170
Merge pull request #8350 from ChillerDragon/pr_fix_button_overlap_teams
Fix in game menu buttons overlapping on team based gametypes
2024-06-13 19:58:47 +00:00
Robert Müller fbb2243a05 Fix tiles being handled in same tick for dead tees in some cases
The `CGameControllerDDRace::HandleCharacterTiles` function can kill the tee if the conditions for starting the race are not satisfied when touching a start tile. In this case, no further tiles should be handled in the `CCharacter::HandleTiles` function, else the effects of those tiles being handled may incorrectly be applied after the tee has respawned.
2024-06-13 21:26:03 +02:00