Commit graph

18298 commits

Author SHA1 Message Date
furo dadb142f4e Add cl_race_ghost_alpha, add title for ghost settings. 2023-10-27 20:56:57 +02:00
furo b90995da06 Add option to always save ghosts, not only personal bests. 2023-10-27 20:55:35 +02:00
furo dc439a804b Ghost browser UI Improvements
- Use Refresh icon instead of text.
- Add button to open ghost directory.
- Button to (de)active all ghosts.
- Grey out ghosts that failed to load.
2023-10-27 20:55:33 +02:00
furo 4f6ce37b3a Add date column to ghost browser 2023-10-27 20:51:19 +02:00
furo c743ed5848 Increase MAX_ACTIVE_GHOSTS from 8 to 256 2023-10-27 20:51:19 +02:00
furo c79e4c2de5 Add option to disable ghost map hash check. 2023-10-27 20:51:17 +02:00
Robert Müller d167f0042a
Merge pull request #7371 from furo321/conf-argument-completion
Add argument completion for `reset`, `toggle`, `access_level`
2023-10-27 17:50:18 +00:00
Dennis Felsing 80cccaaae9
Merge pull request #7362 from furo321/SvRegionalRankings
Add option to disable printing of regional rankings.
2023-10-27 16:42:23 +00:00
furo 686948e659 Remove m_ArgumentCompletionFlagmask 2023-10-27 18:12:37 +02:00
Dennis Felsing c325f830e5
Merge pull request #7373 from Robyt3/Client-Quitting-State-Fixes
Fix incorrect menu behavior when quitting/restarting
2023-10-26 22:41:40 +00:00
Robert Müller 68e481945b Fix incorrect menu behavior when quitting/restarting
Only consider `STATE_ONLINE` and `STATE_DEMOPLAYBACK` as ingame.

Closes #7178.
2023-10-26 21:41:03 +02:00
Robert Müller 7312721743 Remove redundant server browser refresh on client start
The `RefreshBrowserTab` function already does the respective `ServerBrowser()->Refresh(...)` calls.
2023-10-26 21:26:34 +02:00
Dennis Felsing 24b75d17e9
Merge pull request #7372 from Robyt3/Engine-Demo-Update-File-Check
Fix use of closed demo file when playback stopped due to error
2023-10-25 22:53:43 +00:00
Dennis Felsing ee543af004
Merge pull request #7369 from dobrykafe/pr-demo-extract-chat
Add new tool `demo_extract_chat`
2023-10-25 22:53:32 +00:00
dobrykafe ec0380e683 fix requested changes 2023-10-25 21:35:26 +02:00
Robert Müller 4845639a00 Fix use of closed demo file when playback stopped due to error
Check whether the demo file has been closed due to a playback error when calling `DoTick` in loops, to prevent crashes on operating systems with assertions for correct C library usage. On Windows, `warning: Invalid parameter passed to C runtime function` was printed to the debug console in this case.
2023-10-25 20:10:15 +02:00
furo adc36e8215 Add argument completion for reset, toggle, access_level 2023-10-25 19:00:12 +02:00
dobrykafe 579005b98a add new tool demo_extract_chat 2023-10-25 16:03:24 +02:00
Dennis Felsing 92206044d1
Merge pull request #7366 from furo321/SoundsDetail
Remove "Detail" from sound layers.
2023-10-25 09:21:05 +00:00
heinrich5991 9424be7a61
Merge pull request #7367 from Robyt3/Engine-Password-Config-Improvement
Bump maximum server password length from 128 to 256, refactoring
2023-10-24 20:09:25 +00:00
Robert Müller a0d154a841 Bump maximum server password length from 128 to 256
Ensure server password can fit username and password separated by colon, so there is no discrepancy where some passwords work in rcon but not for reserved slots.
2023-10-24 21:44:53 +02:00
Robert Müller 3116fb4bcf Fix ec_output_level default/min/max values, update description
To ensure that all `*_output_level` variables have the same default, minimum and maximum values.
2023-10-24 20:17:09 +02:00
Robert Müller f1e8d4bae3 Remove length limitation when packing server/rcon password
There is no need to limit the length of server password, rcon username, rcon password and rcon commands when packing them into their respective messages. The source buffers for these strings are already limited in length and the message packer ensures that the maximum packet size is not exceeded.
2023-10-24 20:10:42 +02:00
Robert Müller bade6f78fb Reduce duplicate code for sending messages for dummy
Add parameter `int Conn` to `SendInfo` and `SendReady` functions and use existing `SendEnterGame` function to reduce duplicate code for sending the same messages for main and dummy connections.
2023-10-24 20:10:18 +02:00
furo 18f389fb17 Remove "Detail" from sound layers. 2023-10-24 19:34:09 +02:00
Dennis Felsing 31031f5cc1
Merge pull request #7365 from Robyt3/Menus-Demo-Fixes
Fix crash when directly rendering demo after slicing, fix demo slice confirmation popup not being shown anymore
2023-10-23 22:00:06 +00:00
Robert Müller 61ff171fcd
Merge pull request #7364 from furo321/hookcollsize
Use correct max value for "Hook collision width" setting
2023-10-23 21:36:52 +00:00
Robert Müller 7c06553056 Fix crash when directly rendering demo after slicing
Use `m_aCurrentDemoSelectionName` and `m_DemolistStorageType` for the demo render popup instead of using `m_DemolistSelectedIndex`, which can be invalid when the demo render popup is not opened from the demo browser.

Closes #7347.
2023-10-23 23:30:20 +02:00
Robert Müller f32e8eb8de Fix demo slice confirmation popup not being shown anymore 2023-10-23 23:08:44 +02:00
furo 9b3f34a74f Use correct max value for "Hook collision width" setting 2023-10-23 22:49:51 +02:00
Robert Müller 565f9d1b59
Merge pull request #7363 from furo321/correct-chat-limit
Change chat input size to 256
2023-10-23 20:48:02 +00:00
furo 816fd751c7 Change chat input size to 256 2023-10-23 22:14:49 +02:00
Robert Müller fec7e89b00
Merge pull request #7356 from dobrykafe/pr-editor-stop-sound-preview
Editor: stop/pause sound previews
2023-10-23 16:52:32 +00:00
furo bf98eec518 Add option to disable regional rankings.
Set config to true in tests

Add test for `´sv_regional_rankings`
2023-10-23 14:02:22 +02:00
dobrykafe 35e5c114ba stop sound preview in more places 2023-10-23 12:50:59 +02:00
dobrykafe c304b3eef8 extract CEditor::OnDialogClose 2023-10-23 12:48:53 +02:00
Dennis Felsing 7a2004e836
Merge pull request #7360 from Robyt3/Engine-Host-Lookup-Split
Move `CHostLookup` to separate compilation unit and encapsulate member variables
2023-10-22 13:14:36 +00:00
Robert Müller bea7aea431 Encapsulate CHostLookup member variables
The host lookup job is currently only used for the DNSBL lookup on the server-side and in tests.
2023-10-22 13:38:56 +02:00
Robert Müller f8af7542c6 Move CHostLookup to separate compilation unit
The host lookup job and the engine interface are independent so they are moved to separate files.

The include of `engine.h` in `client.h` is therefore unnecessary and other includes also had to be adjusted because of this.

The variable `m_VersionServeraddr` is unused and therefore removed. The host lookup job is currently not used on the client-side.
2023-10-22 13:38:35 +02:00
Dennis Felsing 09978f3311
Merge pull request #7359 from Robyt3/Lineinput-IME-Alignment
Improve positioning of IME candidate window for multi-line text
2023-10-20 17:10:07 +00:00
Robert Müller 1fde694565 Improve positioning of IME candidate window for multi-line text
Previously, the IME candidate window was aligned with the top-right corner of the text bounding box (when rendering the text until the caret offset). This does not work correctly for text spanning multiple lines, causing the IME candidate window to be displayed at the X position of the longest line instead. Additionally, text clipping in the chat was not considered, as `CLineInput` is not aware of the clipping implemented in `CChat`, causing the IME candidate window to be moved up too far.

This is fixed by getting the correct rendered position of the caret offset using `m_CursorRenderedPosition`. Vertical alignment is also changed so only one line of text is considered, which makes the behavior more consistent with Windows' native IME candidate window and avoids larger changes in `CLineInput` to make it aware of clipping.
2023-10-20 17:51:01 +02:00
Dennis Felsing 5987d8d248
Merge pull request #7358 from Robyt3/Engine-Demo-Validation
Validate ticks when reading demo chunk headers, check for all file errors in demo player, show demo error popup
2023-10-19 21:48:47 +00:00
Robert Müller 0e4f174f78 Check for all file errors in demo player, show demo error popup
Handle the return values of all uses of the `io_read`, `io_skip` and `io_tell` functions in `CDemoPlayer`, to handle truncated demo files and other unexpected file reading and seeking errors during demo playback.

Show more detailed error message popups when demos cannot be loaded due to errors and when demo playback is stopped unexpectedly due to errors. Previously, only a generic message "Error loading demo" was shown when loading failed and no error message was shown when demo playback is stopped due to errors.
2023-10-19 21:48:04 +02:00
Robert Müller 92e2e17f0f Validate ticks when reading demo chunk headers
Add checks to ensure that the ticks read from demo chunk headers are in the valid range (cf. `MIN_TICK` and `MAX_TICK` constants). Playing demos with invalid ticks is prevented entirely, as the invalid ticks would cause issues in other places. The server never uses ticks outside the valid range, so invalid ticks should never occur in correctly recorded demos.

Additionally, checks are added to detect if a tickmarker chunk with a tick delta occurs before a tickmarker chunk defining an initial tick. The tick delta is only meaningful when an initial tick has already been defined, so if this is not the case the demo is also considered invalid.
2023-10-19 21:41:20 +02:00
Robert Müller 6951795619 Add title to engine warnings and make auto-hiding optional
Make the title of warnings adjustable, with the default title being "Warning" to preserve existing code.

Make auto-hiding configurable, so the automatic closing of warning popups after 10 seconds can be toggled.
2023-10-19 21:40:55 +02:00
Robert Müller 60807b5de9 Fix io_skip return type and documentation
The function returns 0 on success and -1 on error, as it delegates to `io_seek`, instead of returning the number of bytes skipped, which the documentation previously suggested. The return type is changed from `unsigned` to `int`, as this is also the type of `io_seek` and this better handles -1 as a return value.
2023-10-19 21:40:35 +02:00
dobrykafe 697bd8980d stop sound preview in more places 2023-10-18 14:47:47 +02:00
dobrykafe aafee689ca stop/pause sound previews 2023-10-18 13:27:31 +02:00
Dennis Felsing dad2c14abb
Merge pull request #7355 from Robyt3/Client-Graph-SmoothTime-Refactoring
Refactor `CGraph` and `CSmoothTime`, move to separate compilation units, minor fixes to graph rendering
2023-10-17 20:56:05 +00:00
Robert Müller 8fea5998aa Mark functions as const when possible 2023-10-17 20:27:58 +02:00