Commit graph

20585 commits

Author SHA1 Message Date
dobrykafe f4b2f49056 remove unnecessary dilate config 2024-09-24 05:06:04 +02:00
Dennis Felsing f9df4a85be
Merge pull request #9016 from def-/pr-rere
Revert banning old client versions
2024-09-22 14:55:10 +00:00
Dennis Felsing d51c6e65a7
Merge pull request #9015 from Robyt3/Style-Parameter-Class-Struct-Name-Fixes
Remove most clang-tidy parameter and class/struct name exceptions
2024-09-22 14:47:29 +00:00
Dennis Felsing 9c799e7394 Revert "Ban compromised old versions"
This reverts commit db0c83d433.
2024-09-22 16:36:31 +02:00
Dennis Felsing 804d85c7da Revert "Fix 0.7 clients being dropped"
This reverts commit e1b09787ae.
2024-09-22 16:36:26 +02:00
Dennis Felsing 97a84f9cbd
Merge pull request #8985 from ChillerDragon/pr_qa_dl
Add quick action "Delete layer"
2024-09-22 14:29:57 +00:00
Robert Müller 02a66b301a Remove clang-tidy class/struct name exceptions
- `struct EnvelopedQuad` --> `class CEnvelopedQuad`
- `struct MapObject` --> `class CMapObject`
2024-09-22 16:03:15 +02:00
Robert Müller fd33f0fc1a Remove most clang-tidy parameter name exceptions
- `maxModes` --> `MaxModesAvailable` (`MaxModes` is already used differently)
- `numModes` --> `NumModesInserted` (`NumModes` is already used differently)
- `mode` --> `Mode`
- `rgb` --> `Color`
- `png_ptr` --> `pPngStruct`
- `error_msg` --> `pErrorMessage`
- `warning_msg` --> `pWarningMessage`
- `sw` --> `SubWidth`
- `sh` --> `SubHeight`
- `lhs` --> `Lhs`
- `rhs` --> `Rhs`
- `object` --> `pObject`
- `index` --> `pIndex`/`Index`
- `array` --> `pArray`
- `string` --> `pString`
- `integer` --> `pInteger`
- `boolean` --> `pBoolean`
- `p` --> `pObj`
- `id` --> `Id`/`Index`
- `width` --> `Width`
- `height` --> `Height`
- `ownId` --> `OwnId`
- `xoff` --> `OffsetX`
- `yoff` --> `OffsetY`
- `pos0` --> `Pos0`
- `pos1` --> `Pos1`
- `fnMatchCallback` --> `pfnMatchCallback`
- `dx` --> `DeltaX`
- `dy` --> `DeltaY`
- `wx`, `wy` --> `WorldPos` (`vec2` instead of two `float`s)
2024-09-22 15:47:31 +02:00
Dennis Felsing ec768b2269
Merge pull request #9014 from Robyt3/Editor-External-Mapres-Error-Handling
Fix editor crashes when images/sounds cannot be loaded, fix editor crashes with external RGB images
2024-09-22 12:17:13 +00:00
Robert Müller 94a401226d Fix editor crashes when images/sounds cannot be loaded
Show error messages when loading maps, when exporting images/sounds and when embedding images, if images/sounds could not be loaded. Images and sounds not being loaded is supported so the editor can be used to fix maps by removing/replacing the images/sounds.

Saving maps is prevented if embedded images/sounds could not be loaded, as the data is required to save the map.
2024-09-22 11:24:33 +02:00
Robert Müller aea648e44d Fix incorrect image data used when loading external RGB image
The data of `ImgInfo` is freed by the preceding call to `ConvertToRgba`.
2024-09-22 11:24:25 +02:00
Robert Müller 3362b3688a Fix editor crash when saving external RGB images after embedding
Always convert image data to RGBA and dilate if enabled also for external images, as images may be embedded later and should therefore always be in RGBA format.
2024-09-22 11:04:50 +02:00
Dennis Felsing 3d8bb6f3b2
Merge pull request #9012 from ChillerDragon/pr_fix_sixup_drop
Fix 0.7 clients being dropped
2024-09-22 07:05:57 +00:00
ChillerDragon e1b09787ae Fix 0.7 clients being dropped 2024-09-22 14:47:09 +08:00
ChillerDragon 6a2afb6f60 Select previous layer after deletion 2024-09-22 13:15:38 +08:00
ChillerDragon e5fffb0ab8 Add quick action "Delete layer" 2024-09-22 13:12:20 +08:00
Dennis Felsing be74009fbf
Merge pull request #9007 from Learath2/pr_olddomain
Ban compromised old versions
2024-09-21 22:53:05 +00:00
Learath db0c83d433 Ban compromised old versions 2024-09-21 16:07:12 +02:00
Dennis Felsing b34edb64c0
Merge pull request #9005 from Robyt3/Client-Toggle-Fix
Fix `toggle` command always setting value to `1`
2024-09-20 13:12:22 +00:00
Robert Müller e1a21f5a08 Fix toggle command always setting value to 1
Regression from #8971.
2024-09-20 14:35:14 +02:00
Dennis Felsing 034e4971f8
Merge pull request #9003 from Robyt3/Editor-Prompt-Fix
Fix some editor quick actions not being clickable, small refactoring
2024-09-20 09:58:46 +00:00
Robert Müller 7b641526f9 Remove unnecessary Skip and DescColor variables 2024-09-20 11:00:06 +02:00
Robert Müller 9597241a4a Add margin between quick action label and description
Add a small margin between the label and the description, to make sure there is some spacing if both labels had the maximum length.
2024-09-20 11:00:06 +02:00
Robert Müller 30021839c7 Fix some editor quick actions not being clickable
Add separate UI element IDs for the quick action buttons in the prompt dialog, to ensure that the UI element IDs are different from the IDs used for the regular menu buttons. Otherwise, some buttons could not be activated with clicks because the menu button with the same ID was rendered first.

Closes #8998.
2024-09-20 10:59:56 +02:00
Dennis Felsing b6f80e5375
Merge pull request #8999 from dobrykafe/pr-listbox-qol
Add support for vertical arrow key navigation in multi-column listboxes
2024-09-20 07:26:10 +00:00
Dennis Felsing 5558a69e1c
Merge pull request #9001 from ChillerDragon/pr_dm_plus_colors
Change color of non standard vanilla gametypes
2024-09-20 07:00:23 +00:00
ChillerDragon b443b40f70 Change color of non standard vanilla gametypes 2024-09-20 08:34:31 +08:00
dobrykafe 582e9facab add support for vertical arrow key navigation in multi-column listboxes 2024-09-19 23:50:21 +02:00
Dennis Felsing 5189c18c3c
Merge pull request #8997 from Robyt3/Client-RenderTools-SelectSprite-Cleanup
Remove unused parameters of `SelectSprite` functions
2024-09-19 21:14:58 +00:00
Robert Müller 2c36a6bebf Remove unused parameters of SelectSprite functions
The `sx` and `sy` parameters are unnecessary, as they are always set to zero.

The checks in the `SelectSprite` functions are changed to assertions, as passing a wrong sprite ID is a programming error.
2024-09-19 21:59:14 +02:00
Dennis Felsing 6086a93bd6
Merge pull request #8995 from Robyt3/Snapshot-Builder-Size-Fix
Fix snapshot builder creating too large snapshots, do not add snap item if extended item type could not be added, fix snapshot handling when converting 0.7 demo snapshot fails
2024-09-19 14:49:21 +00:00
Edgar 14e2470780
Merge pull request #8994 from M0REKZ/pr_discord_mac
Enable mac arm64 Discord RPC
2024-09-19 14:33:57 +00:00
Robert Müller fd01e6c805 Fix snapshot handling when converting 0.7 demo snapshot fails
Only prevent demo recording of the snapshot instead of ignoring most of the snapshot by returning early when converting the snapshot for demo recording fails.
2024-09-19 16:24:19 +02:00
Robert Müller 2426d59ab5 Remove unnecessary checks in CSnapshotBuilder::Init7 function
The client now validates snapshots including their maximum size, so these additional checks for recording snapshots to demos are unnecessary.
2024-09-19 16:24:06 +02:00
Robert Müller ac9c66047c Extract pItem variable to avoid duplicate GetItem call 2024-09-19 16:24:03 +02:00
Robert Müller 9a380ff199 Do not add snap item if extended item type could not be added
The `CSnapshotBuilder::AddExtendedItemType` function can fail if the snapshot is already full. Previously, this was not handled, leading to `m_aExtendedItemTypes` being updated inconsistently with the real extended item types and the snap item being added without the extended item type. Now, the snap item is not added if its extended item type could not be added.
2024-09-19 16:23:44 +02:00
Robert Müller 67068ade90 Fix snapshot builder creating too large snapshots
The snapshot builder was only considering the size of the data and of the new item being created in the `NewItem` function but not the size of the `CSnapshot` class and the size of the offsets (one `int` for each item including the new one). This could lead to snapshots being too large, which could cause the server to crash when the snapshots were copied into buffers of size `CSnapshot::MAX_SIZE`. However, it should be unlikely for this to happen normally, as the maximum number of snap items (`CSnapshot::MAX_ITEMS`, which is `1024`) is usually reached before the maximum snapshot size.

Also check in the `CSnapshot::IsValid` function that the snapshot is not too large (`CSnapshot::MAX_SIZE`) and check that the number of items is not too large (`CSnapshot::MAX_ITEMS`).
2024-09-19 16:22:30 +02:00
Robert Müller a8424150a4
Merge pull request #8947 from KebsCS/pr-spectator-mouseclicks
Add mouse click functionality in spectator mode
2024-09-19 13:50:08 +00:00
Edgar 0c23eb0a8a
Merge pull request #8971 from Robyt3/Client-Color-Config-Handling
Improve color config variable handling
2024-09-19 13:46:11 +00:00
Edgar 5fa8fe0a4e
Merge pull request #8925 from M0REKZ/master
Add more gametype colors
2024-09-19 13:44:35 +00:00
Dennis Felsing ff9196d841
Merge pull request #8993 from heinrich5991/pr_ddnet_info_finishes
info: "finishes" shouldn't be under "icon" either
2024-09-19 13:42:15 +00:00
heinrich5991 4dcc565e5d info: "finishes" shouldn't be under "icon" either
Actually moving to those new paths shouldn't be done until we get a
breaking change of this JSON, as it would otherwise unnecessarily break
old clients.

Once a new endpoint is created, the backward compatibility can be
removed.
2024-09-19 15:22:50 +02:00
+KZ d89cd13e85 Enable mac arm64 Discord RPC 2024-09-19 10:07:40 -03:00
Dennis Felsing 66e8d1f726
Merge pull request #8982 from ChillerDragon/pr_qa_aq
Add quick action "Add quads layer"
2024-09-19 06:13:51 +00:00
Dennis Felsing be659b2f5d
Merge pull request #8983 from ChillerDragon/pr_qas_qas
Add quick actions for adding quads and sounds
2024-09-19 06:13:49 +00:00
ChillerDragon ec6ddc5ef7 Add quick action "Add quads layer" 2024-09-19 07:37:36 +08:00
ChillerDragon 5b9602f97f Add quick actions for adding quads and sounds 2024-09-19 07:34:00 +08:00
Dennis Felsing e72ace24f2
Merge pull request #8990 from dobrykafe/pr-editor-line-input
Editor: allow non-conflicting keybinds while line input is active
2024-09-18 21:48:07 +00:00
Dennis Felsing 16adc7d645
Merge pull request #8989 from dobrykafe/pr-lan-page-message
Change LAN tab 'No servers found' message to include port range
2024-09-18 21:27:28 +00:00
dobrykafe 9e8dfc720a editor: allow non-conflicting keybinds while line input is active 2024-09-18 23:15:09 +02:00