Commit graph

13341 commits

Author SHA1 Message Date
dobrykafe cb29ad2b4f dont switch to editor if loading fails 2023-08-26 22:13:13 +02:00
dobrykafe 8957ae99bd remove whitespace 2023-08-26 19:44:53 +02:00
dobrykafe 5e923adcc9 fix map drag and drop 2023-08-26 18:14:13 +02:00
Dennis Felsing 23ed630a4e
Merge pull request #7065 from heinrich5991/pr_ddnet_teehistorian_antibot
Allow antibot to record data into teehistorian
2023-08-25 15:08:35 +00:00
heinrich5991 84948adad1 Allow antibot to record data into teehistorian 2023-08-25 14:26:09 +02:00
heinrich5991 548f2f6021
Merge pull request #7058 from Robyt3/Demo-Player-Pause-Indicator
Show indicator when pausing/unpausing in demo player
2023-08-25 11:55:03 +00:00
Robert Müller ec0522d58f Show indicator when pausing/unpausing in demo player
Render a pause/play icon in the center of the screen when pausing/unpausing while the menu is not active.

The icon fades in and out over 0.5 seconds and slightly increases in size over that time.

When starting demo rendering with initial pause, the pause indicator is rendered continuous until playback is first started, to ensure that the initial pause state is communicated clearly to the user. The initial pause indicator is not included in the rendered demo, but pausing and unpausing later during demo rendering will cause it to be included in the video, same as other UI elements. Closes #7044.

The config variable `cl_demo_show_pause` (`0/1`, default `1`) is added to hide the pause indicator entirely, for example to render a demo with multiple pauses without the indicator.

The pause indicator and also the existing speed indicator are not rendered (anymore) while the menu is active, as the menu already contains this information.
2023-08-25 13:29:17 +02:00
heinrich5991 b739c18a86
Merge pull request #7056 from Robyt3/Base-Number-Format-Optimization
Add `str_from_int` function
2023-08-25 11:16:00 +00:00
heinrich5991 1f13a693a5
Merge pull request #6744 from Zwelf/pr-fix-teehistorian-mapchange
Fix JoinVer and Join teehistorian chunks missing in some conditions
2023-08-25 11:15:43 +00:00
Dennis Felsing e4278479b0 Version 17.2.1 2023-08-25 09:17:11 +02:00
Zwelf e356d12fbf Fix teehistorian test comment 2023-08-25 00:42:54 +02:00
Zwelf 3c2d8afff6 Create new teehistorian event for player rejoin 2023-08-25 00:42:54 +02:00
Robert Müller dfe91705c1 Improve alignment of demo icon buttons 2023-08-24 20:54:50 +02:00
Robert Müller 6ff860a2d7 Add color4_base::WithMultipliedAlpha 2023-08-24 20:54:50 +02:00
Robert Müller d2c9750c65 Add str_from_int function
Add more efficient function for formatting integer values as strings.

A benchmark shows that using this function is significantly faster than using `str_format`. It is faster by a factor of 220 with Clang 15.0 O2 (https://quick-bench.com/q/BlNoLnlyqxipf4jvsFTUxKMHDJU) and by a factor of 11 with GCC 12.2 O2 (https://quick-bench.com/q/Fxf9lDCTqXBF4pIa_IyZ5R0IqYg).

This increases FPS in the editor by ~25% when many numbers are rendered for switch/tele/speedup/tune layers or with "Show Info" being enabled.

The additional static analysis for `std::to_chars` revealed that the wrong size was used in `CHud` for `aScoreTeam[TEAM_RED]` and `aScoreTeam[TEAM_BLUE]`.

This requires incrementing the macOS deployment target from 10.13 to 10.15.
2023-08-24 20:54:17 +02:00
Teero888 cd66a8c1d2
fix #7062 2023-08-23 20:56:23 +02:00
heinrich5991 1c8a67f6f9
Merge pull request #7049 from Robyt3/Sqlite-Error-Assertion
Fix assertion failure when SQLite connection fails, Remove unused `IDbConnection::Copy`
2023-08-23 15:38:39 +00:00
Robert Müller 040731095e Fix assertion failure when SQLite connection fails
When connecting to the SQLite database fails, e.g. because the `.sqlite` file is corrupted, the server would crash with the assertion "Tried connecting while the connection is in use" when a player joins and performs any action.

This is fixed by resetting the use-flag when connecting to the SQLite database fails, which is the same behavior as for the MySQL database connection.
2023-08-22 20:40:36 +02:00
Robert Müller bb147328c2 Remove unused IDbConnection::Copy 2023-08-22 20:40:36 +02:00
ChillerDragon 796d79ad5b Replace 0.7 serverinfo magic number with enum 2023-08-22 13:53:08 +02:00
Dennis Felsing 55789819a3
Merge pull request #7026 from ChillerDragon/pr_auth_unused
NETMSG_AUTH_CHALLENGE is not used in 0.6 or 0.7
2023-08-22 09:59:58 +00:00
ChillerDragon 87640d7857 NETMSG_AUTH_CHALLENGE is not used in 0.6 or 0.7 2023-08-22 10:31:16 +02:00
Dennis Felsing dc7366f7a4
Merge pull request #7048 from Robyt3/Editor-Saved-Brush-No-Clear
Don't clear saved brushes when loading another map
2023-08-19 23:05:31 +00:00
Robert Müller a325245397 Don't clear saved brushes when loading another map
It was not actually necessary to clear the brushes to prevent the crashes. The crashes were fixed by not storing the texture handles for the layers anymore.

Closes #7024.
2023-08-19 20:46:14 +02:00
Robert Müller 6633e9af1d Add button to reload entities background, improve DDNet menu layout
Add a button to manually reload the entities background map instead of automatically reloading it when it's changed. As the background map was only reloaded every 10 seconds, sometimes changing the background map quickly had no effect.

Improve the layout of the DDNet settings menu. Align labels and UI elements and reduce unused empty space.
2023-08-19 17:44:58 +02:00
Robert Müller 7c1a667486
Merge pull request #7046 from infclass/kaffeine/drop-rendering-paused-by-default
Remove cl_video_pause_on_start; reset the pause option on popup opened
2023-08-19 11:42:54 +00:00
Dennis Felsing ae12d8d9f6
Merge pull request #7045 from Robyt3/Loglevel-Variable-Fixes
Save console output variables again, improve descriptions
2023-08-19 11:20:24 +00:00
Alexander Akulich 29688fb499 Remove cl_video_pause_on_start; reset the pause option on popup opened 2023-08-19 13:51:38 +03:00
Robert Müller db1452d0a8
Merge pull request #6988 from Marmare314/envelope-scale
implement scaling for envelope editor
2023-08-19 09:49:17 +00:00
Robert Müller 6ba328dfdb
Merge pull request #7009 from Possseidon/dev/multi-view-team
Allow automatic multi-view for players in a team
2023-08-19 09:01:10 +00:00
Robert Müller bfe1175558 Save console output variables again, improve descriptions
As #6451 was partially reverted by #5434.
2023-08-19 10:53:47 +02:00
Dennis Felsing a44bd9d3e1 Shut down db connection pool (fixes #7036) 2023-08-17 14:35:58 +02:00
marmare314 23e2d9377d implement scaling for envelope editor 2023-08-16 15:06:41 +02:00
marmare314 fded5013eb Do not activate box selection when panning (fixes #7031 and #7030)
And do not pan while any other operation is in progress.
2023-08-16 12:17:06 +02:00
Dennis Felsing b52fa5e910
Merge pull request #7028 from Robyt3/Base-Str-Utf8-Offset-Functions
Add utility functions for converting UTF-8 bytes ↔ chars offsets
2023-08-15 21:10:38 +00:00
Zwelf d7164211e6 Rename OnClientEngineJoin and OnClientEngineDrop to make the name fit its usage 2023-08-15 22:22:42 +02:00
Zwelf b9458150e0 Fix JoinVer and Join teehistorian chunks missing in some conditions
vanilla 0.6 joins weren't recorded. Also after map change, for the
existing players these Join chunks were missing.  Just add these
message for existing players now and add OnClientEngineJoin in all
code paths with clients connecting.
2023-08-15 22:22:42 +02:00
Robert Müller af3870a64d Add utility functions for converting UTF-8 bytes ↔ chars offsets
Add `str_utf8_offset_bytes_to_chars` and `str_utf8_offset_chars_to_bytes` functions to base system to convert between byte and UTF-8 character offsets in UTF-8 strings.

Previously, this was separately implemented in the textrender and in the lineinput helper.

These textrender functions are entirely replaced by the new functions:

- `ITextRender::SelectionToUTF8OffSets` (by `str_utf8_offset_chars_to_bytes`)
- `ITextRender::UTF8OffToDecodedOff` (by `str_utf8_offset_bytes_to_chars`)
- `ITextRender::DecodedOffToUTF8Off` (by `str_utf8_offset_chars_to_bytes`)

These lineinput helper functions are reimplemented using the new functions:

- `CLineInput::OffsetFromActualToDisplay` (uses `str_utf8_offset_bytes_to_chars`)
- `CLineInput::OffsetFromDisplayToActual` (uses `str_utf8_offset_chars_to_bytes`)
2023-08-15 22:11:25 +02:00
Robert Müller 7168fb15d2 Move OnWindowResize listener to engine, handle editor
Register the `OnWindowResize` listener in the engine client instead of the game client and properly dispatch the event also to the editor, so text containers in the editor are cleared when the window is resized.

Closes #7018.
2023-08-15 20:17:27 +02:00
Robert Müller 5567c56d3a Reorder CClient interface pointers alphabetically 2023-08-15 19:47:52 +02:00
Robert Müller 15be3c3944 Remove unused m_DebugSoundIndex variable 2023-08-15 19:47:52 +02:00
Robert Müller f90e908c9d Reset text containers on language change
Fix text containers rendering broken text after the language is changed, as this cleared the glyph atlas without clearing the references to the glyph positions in the text containers. Now `OnWindowResize` is also called on language change to reset all text containers.

However, the glyph atlas is not cleared on normal window resize anymore, because this seems to be unnecessary.
2023-08-14 23:04:55 +02:00
Edgar 21d358434f
Merge pull request #7014 from Marmare314/mapview
Add CEditorComponent to moduralize editor
2023-08-14 08:44:31 +00:00
marmare314 77e36c5062 change interface and fix scalelength 2023-08-14 10:12:06 +02:00
marmare314 a46f320d24 remove unnecessary include 2023-08-14 09:03:03 +02:00
marmare314 7925f9fd45 format 2023-08-14 08:59:01 +02:00
marmare314 72b0fbfada format 2023-08-14 08:53:59 +02:00
marmare314 2bcfbae841 Add CEditorComponent to moduralize editor
Refactor CSmoothZoom and introduce CMapView
2023-08-14 08:36:02 +02:00
Possseidon 07e9c5a684 Allow automatic multi-view for players in a team 2023-08-13 15:38:36 +02:00
Dennis Felsing 255092ff92
Merge pull request #7003 from Robyt3/Scoreworker-Query-Size-Fix
Increase another SQL query buffer size
2023-08-12 21:24:07 +00:00