Commit graph

5225 commits

Author SHA1 Message Date
Peakies d40038c679 remove unnecessary variables and loop 2024-02-07 02:31:06 +03:30
Robert Müller 78997e55d9 Ensure correct HTTP request state when getting result
Add assertions to ensure that the HTTP request result data and SHA256 are available when getting them instead of returning `nullptr` and `SHA256_ZEROED` when they are not.

Rename `CHttpRequest::Sha256` function to `ResultSha256`.
2024-02-05 21:58:01 +01:00
Peakies 6b7c8f1a28 fix switch screen and blackscreen on opengl + window borderless 2024-02-05 20:58:22 +03:30
Robert Müller bf3622e8f1 Fix and simplify check for maximum number of favorite communities
Because of incorrect index/size math, two favorite communities were removed when exceeding the maximum number of three favorite communities instead of only one. The check can be simplified because the maximum number of favorite communities can never be exceeded, so at most the first element needs to be removed from the vector.

Closes #7935.
2024-02-05 17:50:50 +01:00
Robert Müller f0deb129c0 Write DDNet info file only when it changed
Avoid many writes to disk each time the DDNet info is downloaded, i.e. each time the refresh button is pressed in the server browser, by first loading the DDNet info into memory and only writing it to disk when it differs from the current DDNet info based on the SHA256 hash.

The SHA256 is now also used to track whether the DDNet info was modified for the community filters and icons instead of using the current time for this purpose.

Closes #3941.
2024-02-04 23:29:11 +01:00
Robert Müller 535400d8a8 Initialize HTTP later on client launch, show message box on error
Initialize the HTTP client (start the HTTP thread) after initializing the network client instead of during the client interface construction. This ensures that config variables have been loaded already and the log output level is set correctly. This also means all library initialization log messages appear together in one block when starting the client.

Show an error message box and stop launching when the HTTP client could not be initialized, instead of launching but not being able to perform any HTTP requests, which causes bug reports about the serverlist being empty.
2024-02-04 23:29:05 +01:00
Robert Müller d6a20f271b Improve some variable names in CHttp 2024-02-04 23:29:05 +01:00
Robert Müller 987acfbba7 Use more specific log levels for HTTP requests 2024-02-04 23:27:40 +01:00
Robert Müller 6c6f058a8c Cleanup HTTP request cleanup
Ensure with assertion that file is closed when `CHttpRequest` is destructed.

Remove unnecessary assignments in destructor.
2024-02-04 23:25:56 +01:00
Robert Müller 48fad83681 Remove hard-coded commands from client-side
Both console and chat commands are sent to clients dynamically with respective messages, so the static lists of commands were only used for servers not making use of these messages. Instead of assuming potentially incorrect console and chat commands on those servers, the lists will now be empty for those servers.

Move the command registration from the `ddracecommands.h` and `ddracechat.h` header files to the `CGameContext::RegisterDDRaceCommands` and `CGameContext::RegisterChatCommands` functions and delete the header files. The `CHAT_COMMAND` and `CONSOLE_COMMAND` macros are removed, because they only add unnecessary indirection now. The strings `CHAT_COMMAND` and `CONSOLE_COMMAND` are simply replaced with `Console()->Register` and semicolons are added at the end of the lines.

Closes #7665.
2024-02-04 13:16:04 +01:00
Robert Müller 7c9b1fbbb4 Add tabs for favorite communities, separate country/type filters
Support adding up to three communities as favorites in the server browser. Favorites can be changed with favorite buttons which are shown in the community filter on the Internet and Favorites tabs. The commands `add_favorite_community` and `remove_favorite_community` are added to change the favorite communities via the console and for saving the favorite communities to the config file. For the favorite communities, additional tabs using the communities' icons are shown in the server browser next to the Internet, LAN and Favorites tabs. Each community tab shows only the servers from the respective community, hence the community filters UI is not shown on the community tabs but only on the Internet and Favorites tabs. The country and type filters on community tabs cover only the countries and types from the respective community. Favorite communities are added from left to right. When more than three favorite communities are added, the oldest (leftmost) favorite community will be removed from the list.

When starting the client for the first time, i.e. with `cl_show_welcome 1`, the DDNet tab will be created as the only favorite community and selected initially. The community, country and type filters are unset when starting for the first time, so the Internet tab now shows all servers per default.

When starting with a `ui_page` for a favorite community that is not configured, the page is reset to the Internet tab. This also affects those who upgrade from versions with the old DDNet and KoG tabs. The server browser is now also correctly updated when changing `ui_page` via the console.

Track country and type filters for every community separately, to avoid filters resetting when switching between community tabs or changing the community filter. The commands `add_excluded_community`, `remove_excluded_community`, `add_excluded_country`, `remove_excluded_country`, `add_excluded_type` and `remove_excluded_type` are added to change the exclusion filters via the console and for saving the exclusion filters to the config file.

Render community filters above the toolbox (filter, info and friends) tabs when on the Internet and Favorites tab, so this setting is more visible and can be changed also when the other toolbox tabs are selected.

Add icon for the none community, based on the tee country flag color. This icon is hard-coded in the client, as the none community also is, so fetching the icon from the server would be inconvenient. Load community icons already when rendering the menu instead of only when rendering the server browser, so the icons are immediately available when using the start menu.

Find tutorial server by searching for community type "Tutorial" instead of searching for "(Tutorial)" in the server name.

Avoid cleaning favorite communities and filters when there are no communities, i.e. when the DDNet info failed to be loaded or does not contain any communities, to avoid losing all favorite communities and filters in this case.

Closes #7774.
2024-02-03 21:12:23 +01:00
Robert Müller a8f3b56850 Fix undefined behavior on loading empty PNG files
When empty PNG files are loaded, the `std::vector` for the file contents is resized to size 0, which results in undefined behavior when it is accessed with `front`.

When `io_tell` fails, i.e. returns `-1`, this was incorrectly cast to an `unsigned` and therefore caused a very large allocation and potentially crashes due to lack of memory.
2024-02-03 20:00:08 +01:00
heinrich5991 78bd4970be
Merge pull request #7909 from furo321/set-correct-name-size
Set correct size of name column in SQL table
2024-02-03 16:19:29 +00:00
furo 5378fdc20b Set correct size of name column in SQL table 2024-02-03 00:21:42 +01:00
heinrich5991 7f85922d75
Merge pull request #7872 from Robyt3/Client-Dummy-Config-Desc
Minor improvement of dummy config variable descriptions
2024-02-02 21:55:14 +00:00
heinrich5991 63e010b8e4
Merge pull request #7906 from furo321/limit-port-range
Set max limit for `sv_port` and `ec_port` to 65535
2024-02-02 21:53:27 +00:00
furo 2ed631b90a Set max limit for sv_port and ec_port to 65535 2024-02-02 22:08:56 +01:00
Robert Müller e8305ef111 Move CSnapIDPool to separate compilation unit 2024-02-02 20:33:43 +01:00
Dennis Felsing a7097f1ae7
Merge pull request #7884 from furo321/cmdlist
Tell the user about `/cmdlist` when using an unknown chat command.
2024-01-31 08:59:36 +00:00
furo a9df61e1dd Tell the user about /cmdlist when using an unknown chat command. 2024-01-31 00:27:38 +01:00
Robert Müller 2e35250401 Improve client/server launch log messages
Use error log level for error messages. Use info log level explicitly instead of using `dbg_msg`.

Log time taken for initialization in trace level message.
2024-01-30 20:45:23 +01:00
Robert Müller dd44c6cd4d Minor improvement of dummy config variable descriptions 2024-01-28 20:12:22 +01:00
Learath 31b3ac71c2 Fix client/server updates 2024-01-28 19:34:30 +01:00
Dennis Felsing d60852a020
Merge pull request #7868 from Learath2/dd_pr_updater
Fix updater issue. Close #7867
2024-01-28 12:37:42 +00:00
Learath 2470e7489d Fix updater issue. Close #7867 2024-01-28 12:50:54 +01:00
heinrich5991 dcdc66d1df
Merge pull request #7869 from furo321/testcmds-error
Add a error message for when testing commands aren't allowed
2024-01-27 17:59:51 +00:00
furo 633330bcd8 Add a error message for when testing commands aren't allowed 2024-01-27 18:18:32 +01:00
Robert Müller 5d7f2c6e1b Show error messages in console when add_demomarker fails
When there are too many demo markers already or when the previous demo marker is too close.
2024-01-27 13:26:08 +01:00
Robert Müller d5c7488480 Ensure client window is maximized and active after restarting
Add parameter to `shell_execute` to either start the process in the foreground or background on Windows. Previously, all processes were started in the background, because this is desired when starting the server from the client. However, this causes the graphics initialization to fail when restarting the client after updating or with the `restart` command when using Vulkan with windowed and windowed fullscreen mode.

Closes #6578.
2024-01-25 20:52:17 +01:00
Robert Müller c4d512d86e
Merge pull request #7687 from archimede67/editor-better-map-settings
Editor: better map settings input (autocomplete, validation)
2024-01-24 18:17:19 +00:00
Corantin H 0cd002e08c Various fixes to map settings handling 2024-01-23 20:15:30 +01:00
Corantin H aca398f3c9 Added dialog to fix invalid map settings on load 2024-01-23 20:13:57 +01:00
Corantin H 9cc8a28305 Better map settings input (autocomplete, validation) 2024-01-23 20:13:56 +01:00
Robert Müller 9c66a6a147 Remove unused parameter of SetWindowParams function
The `bool AllowResizing` parameter is only passed to other `SetWindowParams` functions but never used in the end, as whether or not resizing is allowed is separately determined based on the value of the `int FullscreenMode` parameter.
2024-01-23 17:49:55 +01:00
Robert Müller 797db31aa1 Fix countries/types filters excluding all servers
Instead of cleaning the countries/types filters based on all available communities' countries/types, only consider the countries/types of currently selected communities. Ensure countries/types are always cleaned when updating the server browser filter in the UI. This fixes that countries/types which are not available for the selected communities were still affecting the server filtering, causing no servers to be shown in some cases.

Closes #7847.
2024-01-22 22:30:15 +01:00
Samuele Radici 79cf3b4e17
Update config_variables.h
text error
2024-01-22 01:33:44 +01:00
Dennis Felsing fca6e0abe3
Merge pull request #7837 from Robyt3/Demo-Recorder-Improvements
Refactor demo recorder usage
2024-01-21 22:39:46 +00:00
Alexander Akulich d0f5ced546 Make http states a enum class and use it across the codebase 2024-01-22 01:06:59 +03:00
Robert Müller 9150f48562 Refactor demo recorder usage
To simplify the usage of the demo recorder, parameters are added to the `IDemoRecorder::Stop` function to control whether the demo file is removed or renamed when stopping the recording.

Ensure demo files of the replay recorder are always removed (except on crashes). The temporary replay demos were previously not removed when being disconnected from a server.

Fix auto demos being stopped and restarted when enabling replays in the settings menu. Now only the replay recorder is stopped/started when necessary.

Fix replay recorder being restarted when setting `cl_replay` variable with console without changing the value.

Remove unnecessary `CClient::m_ButtonRender` variable. Demo rendering is already stopped correctly when reaching the end of the demo without this additional variable.

Remove unused `CDemoRecorder::m_pMapData` variable.
2024-01-21 22:21:56 +01:00
Robert Müller b89e4e8770 Finish CHttpRequest::OnCompletion before updating State()
Ensure that the `CHttpRequest::OnCompletion` function has finished before updating the state which is visible to other threads. Otherwise, threads may try to access the result of a completed HTTP request, before the result has been initialized/updated in the `OnCompletion` function.

Fixes warning due to invalid texture width/height being shown for downloaded skins, because the texture was loaded before the image data was initialized. Closes #7818.

Regression from #7683. Before this, the `OnCompletion` function could also modify the HTTP request's state, which was used to check if loading the skin PNG failed. Instead of doing this, a separate check is added for the skin download task to check that the PNG was loaded successfully.
2024-01-21 14:53:33 +01:00
ChillerDragon e59c9a6450 Only log http requests if `dbg_curl 1`
closed #7823
2024-01-19 12:38:53 +08: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
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 bb3bd57c0e
Merge pull request #7683 from Learath2/dd_pr_curlmultifinal
Use curl-multi. Supersedes #5842
2024-01-15 21:54:24 +00:00
Learath2 f5910343e2 Fix CI 2024-01-14 15:37:44 +03:00
Dennis Felsing 8dee975d66
Merge pull request #7744 from Robyt3/Editor-Color-Palette-Pipette
Add color palette and pipette to editor
2024-01-13 22:55:16 +00:00
Robert Müller a873485643 Fix multi-line text selection not rendered correctly anymore
The `CTextCursor::m_LineCount` variable is only updated after the cursor is rendered. For calculating the selection quads we need to check `LineCount` instead, which is updated while the cursor is being rendered. Regression from #7733.
2024-01-13 23:21:13 +01:00
Learath2 bcf86d81f3 Fix CRegister 2024-01-13 15:28:53 +03:00
Robert Müller 89802396a7 Use icons for Internet, LAN and Favorites server browser tabs
Free up space for up to three more server browser tabs of the same size (on 5:4 resolutions), i.e. tabs for configurable communities.

Remove the additional server browser icon tab on the right side. Remove the purely visual Demo and News tabs which were only shown when the respective page is already active. Instead, always show all server browser tabs when offline.
2024-01-13 12:47:11 +01:00
Learath2 6eb51239c9 Fix some clang-tidy issues and UB 2024-01-12 23:27:49 +03:00
Learath2 32e968335b Fix lots of weirdness in updater 2024-01-12 23:19:47 +03:00
Robert Müller 5e510cdbf4 Include limits instead of climits
Consistently use `std::numeric_limits` instead of `INT_MIN` and `INT_MAX`.
2024-01-11 22:24:37 +01:00
Robert Müller 3eeba01578 Remove duplicate cleanup when connecting
The `IClient::Disconnect` function is always called at the beginning of the `IClient::Connect` function. The `IClient::Disconnect` function calls `IClient::DisconnectWithReason`, if the client is not already offline, which performs cleanup of temporary commands and demo recorders already, so the same cleanup in the `Connect` function is unnecessary. An assertion is added to ensure that the client was properly disconnected before connecting. Connecting while the client is already quitting or restarting is now prevented, as the client state cannot be changed once set to quitting or restarting.
2024-01-10 21:48:09 +01:00
heinrich5991 035cb6eab8
Merge pull request #7784 from ChillerDragon/pr_256_welcome
Increase sv_welcome to 256
2024-01-10 16:57:59 +00:00
ChillerDragon 21f6af9d38 Increase sv_welcome to 256 2024-01-10 17:39:24 +01:00
Robert Müller 80a52cae95 Avoid including zlib.h in header file
By adding `CDataFileWriter::ECompressionLevel` to replace usage of zlib internal compression levels in the `CDataFileWriter` API.

Use `std::numeric_limits<int>::max()` instead of `INT_MAX` in one case where the latter was only declared by the transitive zlib include. The `limits` header is already included and its use is more fitting for C++ code.
2024-01-09 19:36:41 +01:00
Dennis Felsing 0dc9495e80
Merge pull request #7781 from HiRavie/master
Improve text outlines
2024-01-09 10:58:08 +00:00
heinrich5991 9de11a5ecd
Merge pull request #7780 from Robyt3/Serverbrowser-Community-Update-Fix
Fix community not set for servers with missing server info
2024-01-08 21:26:34 +00:00
Robert Müller 6bdc73ad3d Fix community not set for servers with missing server info
The server community was only initialized when receiving server info. This caused servers for which no server info is received to be hidden when using the community filter. Now the community filter also works correctly for servers for which no ordinary server info is received, by initializing the community already when adding server entries to the list.

Closes #7776.
2024-01-08 22:07:24 +01:00
Ravie 2e44c02bbc Improve text outlines 2024-01-08 21:52:14 +01:00
Learath2 9b3ebf3f1b Remove debug statement, fix CI 2024-01-07 17:48:48 +03:00
Robert Müller a80d875e85 Improve error log messages when saving settings fails
Log separate messages for `io_sync` error, `io_close` error and general write errors.
2024-01-07 12:24:07 +01:00
Robert Müller 43b1e5cb1f Improve warning popup message when saving settings fails
The message was previously showing an incorrect filename.
2024-01-07 12:23:58 +01:00
Robert Müller 999119c60f Propagate unknown UUID-based map items in map tools
Adapt the `CDataFileReader::GetItem` function so it optionally also returns a `CUuid` for UUID-based map items, including for items with unknown UUIDs where the item type will be `-1`. Adapt the `CDataFileWriter::AddItem` function so it optionally also accepts a `CUuid` which will be used if the item type is `-1`.

The additional checks for invalid map item types in the map tools are removed again and instead the new UUID parameters are used so map items with unknown UUIDs are written back to maps correctly.

Closes #7701.
2024-01-06 21:25:15 +01:00
heinrich5991 c12835bc39 Group NETMSG_RCON_CMD_ADD 2024-01-05 18:10:57 +01:00
Dennis Felsing ca9c4f532a
Merge pull request #7757 from Robyt3/Graphics-LoadTexture-Move
Avoid copying texture memory when possible
2024-01-04 11:32:42 +00:00
Dennis Felsing 4f89a4d3fd
Merge pull request #7749 from archimede67/editor-fix-autosave-crash
Fix crash on editor autosave, add system method `timestamp_from_str`
2024-01-04 11:17:08 +00:00
Robert Müller abc7b602b2 Avoid copying texture memory when possible
Add separate `IGraphics::LoadTextureRawMove` function with non-`const` `void *pData` argument in addition to existing `LoadTextureRaw` function with `const void *pData` argument. The former function takes ownership of the data and avoids copying the texture data into an additional buffer, if the texture data is already in RGBA format. Non-RGBA texture data always needs to be converted and therefore also copied.

The `LoadTextureRaw` function is split into smaller functions to share common code with the `LoadTextureRawMove` function. Alternatively to this, a flag `TEXLOAD_MOVE_DATA` could have been added to the existing `LoadTextureRaw` function, which would have required the use of `const_cast` to free the texture data.
2024-01-03 23:03:04 +01:00
Corantin H 3c9294321e Fix crash on editor autosave
Add system method `timestamp_from_str` and add tests.
Replace `int64_t` with `time_t` to be more consistent.
2024-01-02 23:38:41 +01:00
Robert Müller e27bf7b6c1 Fix crash in assertion handler after client/graphics destroyed
Unset the assertion handler before shutting down the kernel (including graphics) and client. Otherwise the assertion handler itself crashes when assertion errors happen after the graphics/client have been destroyed.
2024-01-02 19:20:57 +01:00
Dennis Felsing 3defe8eb0e
Merge pull request #7703 from BlaiZephyr/fix-cmake-warning
change cast of pointer to uintptr_t
2023-12-30 23:11:53 +00:00
melon 5d35cd8a66 change cast of pointer to uintptr-t 2023-12-30 22:54:47 +01:00
Robert Müller f5e7fa24d6 Add color palette and pipette to editor
Add color palette with up to 8 colors to editor toolbar. The palette colors work like regular color picker buttons, so they open a color picker popup on click and the value can be copied and pasted with Ctrl+Right click and Ctrl+Left click respectively. Less palette colors are shown when not enough space is available (with 5:4 resolutions).

Add color pipette which allows selecting any color displayed on the screen. Selecting a color with the pipette adds the new color to the palette and shifts the other colors to the right. The selected color is also copied to the clipboard immediately. The hotkey Ctrl+Shift+C is added to toggle the color pipette, which allows using the color pipette in popups and dialogs.

The implement this, the function `IGraphics::ReadPixel` and the command `SCommand_TrySwapAndReadPixel` are added to read a specified pixel's color from the backbuffer. Like the screenshot command, this command also requires a swap operation to be performed before the correct pixel color can be read with the Vulkan backend. The `ReadPixel` function therefore accepts a pointer to a `ColorRGBA` that will be filled after the next swap operation.

Closes #7430.
2023-12-30 13:17:30 +01:00
Robert Müller 661339cc64 Optimize allocation of sound sample indices
Replace linear search for free sample index with free list. This brings sound sample index allocation down to constant complexity independent of the number of allocated sounds. On average the time to allocate sound samples is reduced by around 75% (843µs down to 223µs). For perspective, the time to load all default sounds on client launch is reduced by around 15ms (although this does not significantly affect launch time due to threaded loading).
2023-12-29 13:07:04 +01:00
Robert Müller 87191a380e Use sound lock when setting/getting current time of sample
The lock needs to be owned when accessing the sound voices. Calling `IsPlaying` is redundant, as the loops effectively check whether the sample is playing.
2023-12-29 12:35:45 +01:00
Robert Müller 7a84a746e0 Add CSample::TotalTime function 2023-12-29 12:25:39 +01:00
Dennis Felsing 0f1171a501
Merge pull request #7741 from furo321/translate-racefinish
Use 0.7 translation layer for `Sv_RaceFinish` netmessage.
2023-12-29 08:00:19 +00:00
furo 1a94aa6d8a Use 0.7 translation layer for Sv_RaceFinish netmessage. 2023-12-29 08:33:36 +01:00
Robert Müller c9640459e4 Improve editor toolbar anim and grid buttons, add dropdowns
Add dropdown menus for changing animation and grid settings (i.e. animation speed and grid size) instead of conditionally showing more buttons for this directly in the menu bar. This frees up space in the menu bar, which is currently full on 5:4 resolutions.

The icons previously used for the default animation/grid buttons are now used for the main buttons that toggle animation/grid instead of using text.

Support setting lower animation speeds with the plus and minus buttons by adjusting the step size when the animation speed is low.

Support setting arbitrary animation speed by text input.
2023-12-28 17:43:09 +01:00
Robert Müller 72019df288 More efficient text selection rendering
Render one quad for each line of the text selection instead of rendering one quad per selected character.

This increases the average FPS when the console is open and all text is selected by around 10% (from around 849 to around 943 FPS) (on my machine, in release mode).
2023-12-27 21:07:25 +01:00
Robert Müller 32373c0559 Fix color rendering being inconsistent with displayed color values
When normalizing color components in the engine graphics, round the components to the nearest integer instead of rounding down. Otherwise the color that is rendered in color pickers may be off by 1 in any of its RGB components from the color that the color picker displays as text (hex string and individual components). The slightly incorrect color can be confirmed by creating a screenshot or otherwise reading the backbuffer (planned editor pipette feature).

This should not change map rendering, since maps already store quantized RGBA values on which the rounding mode should have no effect. It may however slightly change appearance of colors in all other places (at most +1 in every RGB component).
2023-12-27 13:49:55 +01:00
Robert Müller 0a0e066535 Remove unused FlipImgData parameter from Vulkan backend
The parameter is always set to `false` so the code is unused.
2023-12-26 17:34:02 +01:00
Robert Müller c3689cd9b4 Remove unused VkBufferImageCopy Region variable
According to the Vulkan specification, the struct `VkBufferImageCopy` is used only for `vkCmdCopyBufferToImage` and `vkCmdCopyImageToBuffer`. The variable `Region` is only initialized but not passed to either of those functions.
2023-12-26 14:06:24 +01:00
Dennis Felsing a9c316055f
Merge pull request #7712 from furo321/rework-cfilecollection
Rework `CFileCollection`.
2023-12-26 08:02:40 +00:00
Dennis Felsing f12f789c3a
Merge pull request #7709 from furo321/server-demos-fixes
A few fixes and improvements to server-side auto demos.
2023-12-26 07:58:30 +00:00
furo 5b5ead8356 Rework CFileCollection.
- Use existing functions from `system.h`
- Use sorting from `<algorithm>`
- Don't recall `ListDirectory` for every removal, which caused the client to hang previously with a lot of files.
2023-12-26 03:31:06 +01:00
Robert Müller 4c223a0002 Improve text line spacing and console text selection
Consider line spacing to belong to the previous line when calculating and rendering text selection. Instead of handling spacing between entries separately in the console, also include line spacing for the last line in the height calculation. Pixel align the line spacing in addition to the font size, as previously some gaps between the entries were larger than others due to missing pixel alignment. This allows rendering the text selection in the console smoothly without any gaps between the console entries/lines.

Closes #7617.
2023-12-25 19:11:42 +01:00
furo b1f9137e34 Change path to demos/auto/server. Use same filename format as client. 2023-12-25 17:31:25 +01:00
furo 1c098c2941 Don't use the same demo recorder for auto and manual demos. 2023-12-25 17:29:39 +01:00
Robert Müller c31f82a9e9 Refactor graphics SetColor functions
Reduce duplicate code.

Replace `clampf` function with `NormalizeColorComponent` function that convert color component from `float` to `unsigned char`.

Use `size_t` instead of `int`.
2023-12-23 17:56:52 +01:00
Robert Müller 45ced1f499 Avoid duplicate calculation in QuadsTex3DDrawTL
Only calculate `CurIndex` value once outside of loop instead of calculating it every iteration.
2023-12-21 22:04:40 +01:00
Edgar 2b344f4a01
Merge pull request #7647 from Robyt3/Server-Votes-Config-Improvement
Improve vote config variable descriptions and value range
2023-12-20 10:41:17 +00:00
Learath 1f224344ec Format and bump fake curl 2023-12-18 23:02:00 +01:00
Learath d847b0f60c Fix double request, fix merge error 2023-12-18 22:42:25 +01:00
Learath 1dc8496470 Use curl-multi 2023-12-18 20:06:43 +01:00
Dennis Felsing 173345df74
Merge pull request #7673 from Jupeyy/pr_fix_ms_sample_accuracy
Fix multi sampling accuracy
2023-12-18 07:52:17 +00:00
Jupeyy caecb31751 Fix multi sampling accuracy 2023-12-17 10:39:28 +01:00
Dennis Felsing e689441d14
Merge pull request #7668 from Robyt3/Engine-Notifications-Interface
Add `INotifications` kernel interface
2023-12-16 23:17:18 +00:00