Commit graph

17592 commits

Author SHA1 Message Date
Robert Müller 31737d81e7 Fix test filenames when using typed tests
Typed tests have test names like "TestName/0" and "TestName/1", which would result in invalid filenames. Replace the string after the first slash with the name of the typed test and use hyphen instead of slash.
2023-07-25 15:05:25 +02:00
heinrich5991 ec55e2ff90 test: Make it easier to generate multiple temporary filenames 2023-07-25 15:05:24 +02:00
Robert Müller b048abded5
Merge pull request #6913 from heinrich5991/pr_ddnet_fix_cmp0148
Fix CMP0148
2023-07-25 12:40:53 +00:00
heinrich5991 90f1a5456c Update downloaded version of GTest to 1.13.0 2023-07-25 13:18:36 +02:00
heinrich5991 8e04f6cf29
Merge pull request #6912 from sjrc6/pr-use-CFGFLAG_GAME
Execute CFGFLAG_GAME configs from map load on the client
2023-07-25 10:54:19 +00:00
heinrich5991 00a0e0e723 Fix CMP0148
https://cmake.org/cmake/help/latest/policy/CMP0148.html
2023-07-25 12:52:23 +02:00
Tater 4fe7aaa43f execute CFGFLAG_GAME configs on the client 2023-07-24 19:15:29 -05:00
heinrich5991 ee21fde231 Make default server start a little less noisy
Spam like the following is now hidden by the default config file:
```
[2022-06-16 01:55:22][console]: moderator access for 'left' is now enabled
[2022-06-16 01:55:22][console]: helper access for 'left' is now enabled
[2022-06-16 01:55:22][console]: user access for 'left' is now disabled
```

Also, the following were already converted to debug messages by #5904.
```
[2022-06-16 01:57:05][datafile]: loading data index=88 size=6159 uncompressed=875088
[2022-06-16 01:57:05][datafile]: loading data index=89 size=1481 uncompressed=972400
[2022-06-16 01:57:05][datafile]: loading data index=90 size=7199 uncompressed=972400
```
2023-07-24 23:43:44 +02:00
Robert Müller de3b2b170c
Merge pull request #6885 from Marmare314/envelope_zoom
Zoomable envelope editor
2023-07-24 21:22:27 +00:00
marmare314 d4110529e4 implement zoom and drag in envelope editor 2023-07-24 22:58:26 +02:00
heinrich5991 4f103d5a4c Revert "Allow server to redirect clients"
Discussion wasn't finished:
https://github.com/ddnet/ddnet/pull/6757#issuecomment-1648565562.

This reverts commit 9d2f4318d5.
2023-07-24 22:51:27 +02:00
heinrich5991 85566fbe92 Add separate log levels for each output
`stdout_output_level` for printing to stdout, `console_output_level` for
printing to local console and remote console and `loglevel` for the log
file.

Keep the old log level filters 0 for info and more severe, 1 for debug
and more severe and 2 for trace and more severe, introducing -1 for
warn, and -2 for error. -3 will show no log messages at all.
2023-07-24 22:43:05 +02:00
heinrich5991 e432dbb750
Merge pull request #6757 from ChillerDragon/pr_redirect
Allow server to redirect clients
2023-07-24 20:21:21 +00:00
heinrich5991 e6725a9668
Merge pull request #6907 from Robyt3/Editor-File-Save-Default-Value
Set default name when saving map under new name or as copy
2023-07-24 19:01:12 +00:00
Chairn 4c9cf9a401
Merge pull request #6910 from Robyt3/Graphics-Code-Scanning-Fixes
Fix "Multiplication result converted to larger type" alerts
2023-07-24 18:40:24 +00:00
Robert Müller 566324c1f8 Fix "Multiplication result converted to larger type" alerts
Introduced by #6899.
2023-07-24 20:06:08 +02:00
Robert Müller eb8619e104 Set default name when saving map under new name or as copy
When using "Save as" and "Save copy" set the default map name in the file dialog to the name of the current map.
2023-07-24 19:02:43 +02:00
heinrich5991 b528dcd4fe
Merge pull request #6904 from sjrc6/pr-use-local-inputs
Use local inputs for direction arrows and aim line toggle
2023-07-23 21:16:07 +00:00
Tater d2d273b6e0 Respect ALLOW_HOOK_COLL flag 2023-07-23 15:54:18 -05:00
Tater a998363978 Use local inputs for direction arrows and aim line toggle 2023-07-22 22:57:20 -05:00
Edgar d11048ad36
Merge pull request #6903 from Robyt3/Game-Console-Antistatic
Support selecting text in both consoles at the same time, refactoring
2023-07-22 19:25:10 +00:00
Edgar a75c98063a
Merge pull request #6900 from Robyt3/Envelope-Calculation-Accuracy
Fix inaccurate envelope calculation
2023-07-22 15:31:46 +00:00
Robert Müller e174c0bc08 Support selecting text in both consoles at the same time
Change static variables to member variables and move member variables from overall console class to the console instance class, so selection is tracked separately for console instances.
2023-07-22 13:49:53 +02:00
Robert Müller db62f5b189 Use IClient::GlobalTime instead of CConsole::TimeNow
Both functions track the time in seconds that has passed since some instant as a `float`. The specific start time is not relevant for calculations, therefore `IClient::GlobalTime` can be used instead of `CConsole::TimeNow`.
2023-07-22 13:46:58 +02:00
Robert Müller d02904feea Fix inaccurate envelope calculation
Use `double` instead of `int` to represent the time in milliseconds in envelope calculation.

This fixes step-ladder patterns appearing with bezier curves and artifacts appearing when two points are very close together in time.
2023-07-21 17:45:44 +02:00
Dennis Felsing 5c00dd3602
Merge pull request #6899 from Robyt3/Graphics-Buffer-Refactoring
Refactor graphics command buffer usage, texture index handling, misc.
2023-07-20 21:05:00 +00:00
Robert Müller 58927cdc8d Use size_t more in engine graphics 2023-07-20 21:58:17 +02:00
Robert Müller 78e23062c9 Add assertions for graphics command buffer allocation
When memory for a command or data in the command buffer cannot be allocated in `CGraphics_Threaded::AddCmd` and `CGraphics_Threaded::AllocCommandBufferData` the command buffer is cleared so it should always be possible to allocated memory successfully on the second try. Therefore assertions are added and the return values and inconsistent checks of the functions are removed.

The usage of `AddCmd` is simplified by automatically deriving an error message based on the type of the template parameter.
2023-07-20 21:58:17 +02:00
Robert Müller a96242b850 Extract CGraphics_Threaded::FindFreeTextureIndex function
To reduce duplicate code.
2023-07-20 21:58:16 +02:00
Robert Müller 3134d42ce6 Extract CGraphics_Threaded::FreeTextureIndex function
To reduce duplicate code.
2023-07-20 21:58:16 +02:00
Robert Müller b432feb9b0 Add assertion in CGraphics_Threaded::LoadTextureRawSub
To check for invalid texture handle.
2023-07-20 21:58:16 +02:00
Robert Müller 21bbc8be61 Improve filename length check for images
Only add assertion to prevent empty filename, as this causes Valgrind to crash.

Handle empty filename used for special null-image separately in gameclient.
2023-07-20 21:58:16 +02:00
Robert Müller e7d27ec6ed
Merge pull request #6898 from ChillerDragon/pr_init_goto_vars
Init variables used by goto_switch and goto_tele
2023-07-20 18:49:27 +00:00
ChillerDragon 1c023772f3 Init variables used by goto_switch and goto_tele 2023-07-20 20:26:15 +02:00
Robert Müller 69b5c62f04
Merge pull request #6895 from By622/patch-1
Update traditional_chinese.txt
2023-07-20 11:38:09 +00:00
By 19e36b6d04
Update traditional_chinese.txt 2023-07-20 16:51:08 +08:00
Dennis Felsing 2e39c23c78
Merge pull request #6896 from By622/patch-2
Update simplified_chinese.txt
2023-07-20 08:35:56 +00:00
By ee0f3b4033
Update simplified_chinese.txt 2023-07-20 16:11:59 +08:00
By 8c2d2247b3
Update traditional_chinese.txt 2023-07-20 15:56:35 +08:00
Robert Müller 946f792add
Merge pull request #6894 from Marmare314/issue-6787
keep selection when moving layers, fixes #6787
2023-07-19 13:44:33 +00:00
marmare314 972fc717a6 keep selection when moving layers fixes #6787 2023-07-19 15:24:00 +02:00
Robert Müller 9aa04d90f6
Merge pull request #6844 from Marmare314/selectable-quadpoints
Selectable quadpoints
2023-07-19 11:54:21 +00:00
marmare314 c9bd00b2ec make all quadpoints selectable with boxselect 2023-07-19 13:20:42 +02:00
heinrich5991 27b812287e
Merge pull request #6871 from Robyt3/UI-LastActiveItem-Cleanup
Remove usages of `CUI::LastActiveItem`
2023-07-19 10:54:07 +00:00
Robert Müller 3991d19966
Merge pull request #6887 from ChillerDragon/pr_goto_switch_tele
Add ``goto_switch`` and ``goto_tele``
2023-07-18 17:18:00 +00:00
heinrich5991 b221b35e10
Merge pull request #6890 from def-/pr-email
new email address
2023-07-18 14:14:42 +00:00
Dennis Felsing b07ecc5f9a new email address 2023-07-18 15:55:09 +02:00
ChillerDragon fb8d2a18d5 Add `goto_switch and goto_tele`
Set the clients view to a given teleporter or switch number
2023-07-18 14:34:51 +02:00
Dennis Felsing ff9bda9e2f
Merge pull request #6888 from Robyt3/Client-Animation-Fix
Fix ingame animations not using correct envelope points anymore
2023-07-18 11:20:42 +00:00
Robert Müller 6ee3928665 Fix ingame animations not using correct envelope points anymore
Add `CMapBasedEnvelopePointAccess::SetPointsRange` function so the start point and number of points that should be considered when using this envelope point storage can be configured. In the editor, this range always includes all points, as each envelope directly stores only its own points, so animations were rendered correctly there. However, all points are stored in one array when loading them from the map file (i.e. when rendering the map ingame), so the start point and number of points specified for the envelopes have to be considered when accessing their envelope points.

Closes #6886.
2023-07-18 12:43:31 +02:00