Commit graph

18925 commits

Author SHA1 Message Date
Dennis Felsing 94931fadc0
Merge pull request #7832 from Robyt3/Base-Localtime-Threadlocal
Ensure uses of `localtime` function are thread-safe
2024-01-21 10:36:31 +00:00
Dennis Felsing 0cceb786cc
Merge pull request #7836 from Robyt3/Windows-Logging-Virtual-Terminal
Improve Windows logger, add virtual terminal support
2024-01-20 17:36:00 +00:00
Robert Müller 4b8dabcf5d Improve Windows logger, add virtual terminal support
Use [virtual terminal processing](https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) for Windows console output when possible, using the existing async logger. Fallback to the old Windows logger when virtual terminal processing is not available. Do not set any logger when there is no console/file/pipe to output to.

This adds support for 24 bit RGB colors using ANSI escape codes (when Terminal emulator supports it) instead of only supporting 16 fixed colors.

Use the existing async logger also on Windows by converting the console standard output handle to an IOHANDLE. Avoid converting console output to UTF-16 by changing the console output codepage to UTF-8 and outputting that directly. Overall, this reduces the time until the loading screen first appears when launching the client from the console on Windows by around 70%, from 80-100ms down to 25ms.

Add support for `NO_COLOR` environment variable also on Windows.

Use the async logger also for writing output to files and pipes instead of using a Windows specific implementation for this, to reduce lags when redirecting the standard output.

Closes #3925. The client/server will not freeze anymore when entering selection mode in the console because we are using the async logger on Windows now.

Closes #1108. We were already using AIO on Windows to write the logfile, which was not causing any known issues. We are now also using AIO with the async loggers for console/files/pipes on Windows.
2024-01-20 18:19:08 +01:00
Robert Müller 93cbad485d
Merge pull request #7831 from BlaiZephyr/move-nameplate-button
moved nameplates from hud -> nameplates
2024-01-19 20:26:51 +00:00
Robert Müller c1a1720a08 Ensure uses of localtime function are thread-safe
On Windows, the result of the `localtime` function is thread-local, hence our uses of this function are already thread-safe.

On non-Windows, the `localtime` function is potentially not thread-safe, so the reentrant `localtime_r` function is used instead with a thread-local buffer for the result.

Closes #7788.
2024-01-19 21:26:50 +01:00
melon 5361637a55 fixed placement & spacing 2024-01-19 21:09:56 +01:00
melon abe6c1c4b5 moved nameplates from hud -> nameplates 2024-01-19 20:44:31 +01:00
Emir Marincic 432b4319f6
Merge pull request #7827 from ChillerDragon/pr_less_http_logs
Only log http requests if ``dbg_curl 1``
2024-01-19 10:14:22 +00:00
ChillerDragon e59c9a6450 Only log http requests if `dbg_curl 1`
closed #7823
2024-01-19 12:38:53 +08:00
Dennis Felsing c4135f117b
Merge pull request #7826 from Robyt3/Collision-Warning-Cleanup
Remove unnecessary check for entities close to map border
2024-01-18 22:39:40 +00:00
Robert Müller 6e4afd7c63 Remove unnecessary check for entities close to map border
When handling door and laser entities, all 8 adjacent tiles are checked for laser modifier tiles. When handling laser entities, the 8 tiles one further out are also checked for laser modifier tiles. If either of those 16 tiles is outside the map bounds, an error message was printed and the tiles are ignored. The error message is removed because it's unnecessary and misleading. Placing entities near or on the map border is not known to cause any issues.

Closes #7759.
2024-01-18 22:44:22 +01:00
Dennis Felsing 0bce368c77
Merge pull request #7824 from Robyt3/Client-FPS-Graph-Timebase
Add time scale to debug graphs for constant scrolling speed
2024-01-17 23:29:13 +00:00
Dennis Felsing e1ea4a00c3
Merge pull request #7825 from HiRavie/Grid
Allow finer editor grid
2024-01-17 23:28:30 +00:00
Ravie 69a74963ce Allow finer editor grid 2024-01-17 23:36:09 +01:00
Robert Müller 4be76f0d08 Add time scale to debug graphs for constant scrolling speed
Store X value (time) for all graph entries in addition to the Y value (FPS, prediction margin etc.). The `CGraph::Add` function adds values to the graph at the current time. The `CGraph::InsertAt` function allows specifying arbitrary X values, as long as the values are inserted in increasing order.

The entries are kept in a ringbuffer and old entries are recycled when it's full. The size of the ringbuffer is configurable for each graph, as the FPS graph needs significantly more buffer because values are added more often.

The scrolling speed of the graphs is fixed by specifying the maximum size of the window of values which should be displayed. For this purpose, a parameter is added to the `CGraph::Scale` function to specify the size of the window which should be rendered in the `CGraph::Render` function. For the FPS graph only the last second is rendered, so small spikes are still noticeable. For prediction and gametime margin graphs the last five seconds are rendered, which should result in a similar scrolling speed as before this change. The debug tuning graph is a special case, where the X values set manually and fixed to 0-127, same as before, instead of being based on the current time.

The graph rendering is made much more efficient by precalculating when the vertex colors need to be updated, to avoid all unnecessary calls to `SetColorVertex`. Additionally, line items are bundled together in an array to avoid calling `LinesDraw` for every individual line item.
2024-01-17 20:43:19 +01:00
Robert Müller c90a52f51c Add CDynamicRingBuffer to avoid specifying size as template 2024-01-17 18:17:08 +01:00
heinrich5991 626b7ca805
Merge pull request #7795 from Robyt3/Menus-Browser-Tab-Icons
Use icons for Internet, LAN and Favorites server browser tabs, use star icon for favorite servers
2024-01-17 13:56:59 +00:00
heinrich5991 9bbceab2c4
Merge pull request #7814 from gerdoe-jr/stop-annoying-superteam
Don't warn about unfinishable map for super team
2024-01-17 13:55:07 +00:00
Dennis Felsing 7c4bde43b1
Merge pull request #7813 from gerdoe-jr/separate-cmds
Divide `/tp` into `/tpxy` and `/tpto`
2024-01-17 00:12:50 +00:00
Dennis Felsing 28cd6ad2a5 Fix style 2024-01-17 00:49:32 +01:00
Dennis Felsing 55c225726b
Merge pull request #7819 from Robyt3/Engine-Warning-Uninitialized
Fix warning title being uninitialized in some cases
2024-01-16 23:48:23 +00:00
Dennis Felsing 79bdd1a3bb
Merge pull request #7816 from Robyt3/Editor-Resize-Cursor-Alignment
Improve alignment of editor resize cursors
2024-01-16 23:47:09 +00:00
gerdoe-jr 1840519609
Check for characters wtih DDRACE_CHEAT instead of TEAM_SUPER 2024-01-16 23:16:19 +03:00
Vladislav Gerasimov c53e0af6ef
/tpto -> /tp and /teleport 2024-01-16 22:17:59 +03:00
Robert Müller 0512e65dbe Fix warning title being uninitialized in some cases
For some warnings a random title instead of the default title was shown because it was not initialized.
2024-01-16 20:12:25 +01:00
heinrich5991 2b6926b66f
Merge pull request #7817 from archimede67/editor-more-tooltips
Editor: add tooltips to recent features
2024-01-16 18:50:26 +00:00
Corantin H 12514360b7 Add editor tooltips to recent features
Add tooltip when drawing tele brush (tele numbers adjust).
Add tooltips when dragging quad points (alignment)
2024-01-16 19:31:01 +01:00
Robert Müller b4ceffdc83 Improve alignment of editor resize cursors
Center the resize (V/H) cursors on the mouse position instead of aligning the top-left with the mouse position. This feels better to use and is consistent with the behavior for example on Windows.
2024-01-16 19:12:01 +01:00
gerdoe-jr 40ed4bb98f
Check for super character in team, don't annoy them more than expected 2024-01-16 20:28:40 +03:00
gerdoe-jr 7df3330c06
Divide /tp into /tpxy and /tpto 2024-01-16 20:04:39 +03:00
heinrich5991 bb3bd57c0e
Merge pull request #7683 from Learath2/dd_pr_curlmultifinal
Use curl-multi. Supersedes #5842
2024-01-15 21:54:24 +00:00
heinrich5991 0f653b9b76
Merge pull request #7794 from ChillerDragon/pr_master_team_change
Report team changes to master when teams are on
2024-01-15 15:36:46 +00:00
Dennis Felsing b375d74083
Merge pull request #7808 from By622/patch-8
Update simplified_chinese.txt
2024-01-15 08:49:33 +00:00
Dennis Felsing a24d71eeed
Merge pull request #7807 from By622/patch-7
Update traditional_chinese.txt
2024-01-15 08:49:31 +00:00
Dennis Felsing 93d5ea5c7c
Merge pull request #7806 from rffontenelle/patch-3
Update brazilian_portuguese.txt
2024-01-15 08:49:29 +00:00
Dennis Felsing 93bc9ad149
Merge pull request #7805 from gerdoe-jr/patch-3
Update russian.txt
2024-01-15 08:49:27 +00:00
By 97360df89d
Update simplified_chinese.txt 2024-01-15 16:12:51 +08:00
By 9b2284da88
Update traditional_chinese.txt 2024-01-15 16:11:06 +08:00
Rafael Fontenelle 94b8b5dd10
Update brazilian_portuguese.txt 2024-01-15 00:42:16 -03:00
Vladislav Gerasimov 6e3e439983
Update russian.txt 2024-01-15 02:33:32 +03:00
Dennis Felsing 225b729199
Merge pull request #7804 from furo321/swedish-18.0
Update Swedish translations for 18.0
2024-01-14 22:43:30 +00:00
Dennis Felsing 7e73d3e3e2
Merge pull request #7803 from archimede67/fix-editor-undo-redo
Fix multiple editor undo/redo issues
2024-01-14 22:41:00 +00:00
Corantin H d2ea9cbcf1 Fix multiple editor undo/redo issues
Fixed crash when runing tool 'Remove unused envelopes' and trying to undo the addition of an envelope (#7738)
Fixed issues where undo/redo would not work properly when changing a layer's order or group property
Added missing action for changing the position of a sound source
2024-01-14 19:45:20 +01:00
furo c7fb6dda7f Update Swedish translations for 18.0 2024-01-14 18:54:55 +01:00
Robert Müller 11c1957434
Merge pull request #7799 from def-/pr-lang-18.0
Update translations for upcoming DDNet 18.0
2024-01-14 17:22:38 +00:00
Learath2 f5910343e2 Fix CI 2024-01-14 15:37:44 +03:00
Dennis Felsing 6ad92edd95
Merge pull request #7801 from archimede67/editor-fix-quads-edit
Restore ability to move/edit points of all selected quads
2024-01-14 11:20:04 +00:00
Dennis Felsing 835c759ae0 Update German translations 2024-01-14 12:12:30 +01:00
Corantin H a3115d76d2 Restore ability to move points of all selected quads 2024-01-14 11:09:12 +01:00
Dennis Felsing a9b0787623 Update translations for upcoming DDNet 18.0 2024-01-13 23:58:09 +01:00