Commit graph

19170 commits

Author SHA1 Message Date
heinrich5991 9858d4e3c1
Merge pull request #8000 from Robyt3/Serverbrowser-Has-Finishes-Fix
Add `has_finishes` attribute to community info
2024-02-20 19:54:07 +00:00
Robert Müller 386b00f18d Add has_finishes attribute to community info
Add mandatory Boolean attribute `has_finishes` to every community info, which specifies whether finishes can be shown for the community, regardless of whether any finishes are currently available for the player.

The community info must be adjusted when/before merging this, by adding the attribute `has_finishes` to every community object, with the value `true` for DDNet and `false` for all other communities.

Closes #7957.
2024-02-20 20:34:21 +01:00
Dennis Felsing 99c982e3e0
Merge pull request #7998 from Robyt3/Client-Skin-Loading-Refactoring
Validate skin names when loading, refactor skin loading
2024-02-19 22:56:58 +00:00
Robert Müller 86356c2c30
Merge pull request #7999 from heinrich5991/pr_ddnet_doeditbox_return
Add return value docs to `DoEditBox*`
2024-02-19 22:08:57 +00:00
heinrich5991 9a95f3b1fd Add return value docs to DoEditBox* 2024-02-19 22:51:55 +01:00
Robert Müller 8adfb2f2ec Fix unlikely cases of skin blood color being wrong
The check before calling `normalize` incorrectly excludes skins containing zero in any color component instead of excluding only skins with zero in all components. The check can be removed entirely, because it is already checked inside the `normalize` function whether the length of the `vec3` is zero, in which case a zero `vec3` will be returned.

For very large skins which use large color values in at least one component, the `int` used for calculating the blood color could overflow.
2024-02-19 22:09:59 +01:00
Robert Müller 4eb0ffd701 Validate skin names when loading, refactor loading
Prevent skins with invalid names from being loaded/downloaded.

Improve log messages when skins cannot be loaded.

Remove obsolete check for duplicate skins, as the storage handles duplicate files already.
2024-02-19 22:09:59 +01:00
Robert Müller 9a24cf4e10 Ensure placeholder skin always exists and has valid metrics
Instead of adding the placeholder skin to the list of skins only when no skins have been loaded, always create the placeholder skin and use it only when no other skin is available.

Use reasonable values for skin metrics of placeholder skin to improve its rendering.
2024-02-19 22:09:59 +01:00
Robert Müller 259ed751ad
Merge pull request #7997 from heinrich5991/pr_ddnet_client_empty
`ClientEmpty` → `ClientSlotEmpty`
2024-02-19 20:54:05 +00:00
heinrich5991 bf0f699b42 ClientEmptyClientSlotEmpty
Makes it clearer to me, didn't know what an empty client is supposed to
be.

CC #7968
2024-02-19 21:36:21 +01:00
Dennis Felsing e342cd43ab
Merge pull request #7996 from bencie/undeep-unfreeze
Unfreeze on rcon undeep
2024-02-19 17:04:19 +00:00
bencie 2240380b0e Unfreeze on rcon undeep 2024-02-19 17:45:30 +01:00
archimede67 4760ff71c7
Merge pull request #7991 from Robyt3/Client-Loading-Indicators
Render loading message/indicator for vote options and rcon commands
2024-02-18 19:03:23 +00:00
archimede67 8a98e70172
Merge pull request #7992 from furo321/no-cmdlist-rcon
Don't tell user about `/cmdlist` in rcon when using an unknown command.
2024-02-18 18:15:02 +00:00
furo 19796cdce4 Don't tell user about /cmdlist in rcon when using an unknown command. 2024-02-18 18:42:22 +01:00
Robert Müller ce81f7b45f Render loading message/indicator when receiving rcon commands
Render a progress spinner and message in the remote console while receiving rcon commands.
2024-02-18 18:15:33 +01:00
Robert Müller 1d0bb0dfcf Render loading message/indicator when receiving vote options
Render a progress spinner and message on the "Change settings" tab while receiving vote options.
2024-02-18 18:11:58 +01:00
Edgar e041c0a870
Merge pull request #7977 from dobrykafe/pr-expire-invites
Expire team invites on player disconnect
2024-02-18 15:24:01 +00:00
Edgar ea0827b5bd
Merge pull request #7987 from dobrykafe/pr-showfps-render
Don't show fps during demo render
2024-02-18 15:23:16 +00:00
Edgar f7b3cc7179
Merge pull request #7988 from Robyt3/Editor-Button-Refactoring
Refactor editor button functions: replace/remove `DoButton_File`, `DoButton_ButtonDec/Inc` and `DoButton_Menu`
2024-02-18 15:22:08 +00:00
Edgar 0c7015bdf8
Merge pull request #7990 from Robyt3/Client-Console-Minor-Refactoring
Minor refactoring of console rendering
2024-02-18 15:21:12 +00:00
Robert Müller ca56aa0b4a Replace DoButton_Menu with DoButton_Ex
This adds highlighting color when hovering the main menu buttons (File, Tools, Settings), which was previously missing for these buttons. This also reduced duplicate code.

Extract font size for menu buttons into constant `MENU` in new namespace `EditorFontSizes`.
2024-02-18 15:56:19 +01:00
Robert Müller 0da1743143 Avoid while loop for calculating console Y offset 2024-02-18 13:14:02 +01:00
Robert Müller bb650b85c4 Minor refactoring of console rendering variables
Remove temporary variables. Mark variables as `const` when possible. Avoid duplicate calculations. Use `bool` instead of `int`.
2024-02-18 13:12:20 +01:00
Robert Müller af99f5ba57 Replace DoButton_ButtonDec/Inc with DoButton_FontIcon/Ex
Use `DoButton_FontIcon` with `FONT_ICON_MINUS`/`FONT_ICON_PLUS` consistently instead of using `DoButton_ButtonDec/Inc` with text labels `+`/`-`.

For yes/no buttons, use `DoButton_Ex` and specify the button corners explicitly instead of using `DoButton_ButtonDec/Inc`.
2024-02-18 12:32:51 +01:00
Robert Müller 929765e95e Remove unused DoButton_File 2024-02-18 12:32:46 +01:00
dobrykafe 3ad0e233ee dont show fps during demo render 2024-02-18 04:01:40 +01:00
Dennis Felsing 8d2de4b8c2
Merge pull request #7984 from Robyt3/Editor-Layer-Lockup-Fix
Fix editor UI locking up when dragging groups/layers quickly
2024-02-17 22:29:05 +00:00
Robert Müller aded3f70a2 Fix editor UI locking up when dragging groups/layers quickly
Reset dragging operation when the dragged button has been unset and reset dragged button when operation has been reset, to prevent the editor from being stuck in either of two inconsistent states. This could be reproduced easily by clicking very quickly while moving the mouse up and down over the groups/layers list.

Do not call `CheckActiveItem` on a UI element (the dragged button) which might not be in view, as this prevents the UI from detecting the invalid active item, when groups/layers are dragged very far and quickly outside the scrollregion.

Closes #6855.
2024-02-17 13:14:13 +01:00
Robert Müller 886b417ed4
Merge pull request #7983 from archimede67/editor-fix-quads-2
Editor: fix quad snapping when grid is enabled
2024-02-17 09:42:59 +00:00
Robert Müller a720bb0c29
Merge pull request #7976 from ChillerDragon/pr_ed_hover_tiles_vector
[vector] Move select layer to editor component
2024-02-17 09:34:28 +00:00
Corantin H 87155d4a82 Fix logic for preferring grid over quad snapping 2024-02-17 10:16:09 +01:00
ChillerDragon 9134e31800 Move select layer to editor component
closed #7943
closed #7612
2024-02-17 12:06:04 +08:00
Dennis Felsing 1bc11c517d
Merge pull request #7981 from Robyt3/Http-Cancel-New-Jobs-On-Shutdown
Abort new HTTP requests immediately when shutting down `CHttp`
2024-02-16 18:07:02 +00:00
Robert Müller c729ccad32 Abort new HTTP requests immediately when shutting down CHttp
Immediately cancel new HTTP requests instead of enqueuing them when already shutting down `CHttp`. Otherwise, `CChooseMaster` may wait forever for HTTP requests to be completed while the client is shutting down, if `CHttp` was shutdown while `CChooseMaster` is not waiting for an existing HTTP request.

Not directly caused by #7962, but it made it more likely to happen.

Closes #7980.
2024-02-16 17:33:50 +01:00
archimede67 aae674897a
Merge pull request #7975 from ChillerDragon/pr_ed_wasd_speed
[editor] Increase WASD pan speed when holding down shift
2024-02-16 12:50:10 +00:00
Dennis Felsing 467c497514
Merge pull request #7979 from Robyt3/Client-Entities-Mod-Fixes
Fix entities textures not being built for non-DDNet/DDRace types, fix assertion due to double-free of transparent texture
2024-02-15 22:31:04 +00:00
Robert Müller fdf427db15 Fix entities textures not being built for non-DDNet/DDRace types
The combined entities texture for all layers except the switch layer was only built when the gametype has a front, speedup, tele or tune layer, which is only the case for servers declaring DDNet or DDRace type in their gameinfo. Now this entities layer is always built, as the game layer is always present.
2024-02-15 21:51:53 +01:00
dobrykafe 5dc8fe81e3 expire team invites on player disconnect 2024-02-15 21:37:51 +01:00
Robert Müller ab3445967d Fix assertion due to double-free of transparent texture
The transparent texture is reused for multiple entity layers and should never be unloaded.
2024-02-15 20:49:55 +01:00
Dennis Felsing f8c9a11c03
Merge pull request #7978 from Robyt3/Editor-Layer-Selector-UI-Handling
Cleanup select layer UI element handling
2024-02-14 23:21:44 +00:00
Robert Müller 0a776b9062 Cleanup select layer UI element handling
Expose UI element ID for the main map editor as member variable so the select layer by tile funtionality can correctly be enabled when the map editor is the hot item.
2024-02-14 22:03:25 +01:00
ChillerDragon 7ec182b498 Increase editor pan speed when holding down shift 2024-02-14 08:43:21 +08:00
Dennis Felsing 5cb37c2e4a
Merge pull request #7974 from Robyt3/Menus-Tabs-Tooltips
Add tooltips for all icon-based menu and browser tabs
2024-02-13 23:51:30 +00:00
Robert Müller 639a5879a6 Add tooltips for all icon-based menu and browser tabs 2024-02-13 22:26:28 +01:00
Robert Müller 6c27894a63
Merge pull request #7973 from ChillerDragon/pr_ed_igfx
Remove indirect Graphics() access in BrushSelecting()
2024-02-13 21:03:17 +00:00
Dennis Felsing 754cb2eee8
Merge pull request #7972 from Robyt3/Base-Documentation-Shell-OS-etc
Document all shell, OS, secure random and related functions
2024-02-13 08:48:03 +00:00
ChillerDragon 2f2b8f32fa Remove indirect Graphics() access in BrushSelecting() 2024-02-13 16:01:18 +08:00
Robert Müller 73011529cd Document all shell, OS, secure random and related functions
Add/update doxygen comments for all `shell_*`, `os_*`, `secure_*`, `cmdline_*`, `windows_*` and related functions.

Move `open_link` and `open_file` declarations to shell group, to the same relative position as their function definitions.
2024-02-12 23:05:21 +01:00
Dennis Felsing 76aeb8e781
Merge pull request #7969 from bencie/add-deep-solo
Add /solo and /deep as practice commands
2024-02-12 16:40:30 +00:00