Commit graph

14846 commits

Author SHA1 Message Date
heinrich5991 44bf0134f0
Merge pull request #8065 from dobrykafe/pr-solo-practice-bug
Fix practice mode not resetting after disconnect on solo servers
2024-03-05 15:20:34 +00:00
heinrich5991 17402cc43f Rename all variables for strict camel-casing of abbreviations
This is the strict version, ID → Id, UI → Ui, except DDNet which stays
DDNet.

This would fix #7750.

Done using a naive rename script (for bash, use `shopt -s globstar`):

```fish
sed -i \
	-e 's/\([a-z]_\?\)ID/\1Id/g' \
	-e 's/\([^ ]\)\<UI\>/\1Ui/g' \
	-e 's/UI()/Ui()/g' \
	-e 's/\<CUI\>/CUi/g' \
	-e 's/\([\ta-z.(&]\|[,=|] \)ID\>/\1Id/g' \
	-e 's/\<ID\>\([^ ").]\)/Id\1/g' \
	-e 's/\<ID\([0-9]\)/Id\1/g' \
	-e 's/\<ID\>\( [<=>:+*/-]\)/Id\1/g' \
	-e 's/int ID/int Id/g' \
	-e 's/\([a-z]_\?\)GPU/\1Gpu/g' \
	-e 's/\([a-z]_\?\)IP/\1Ip/g' \
	-e 's/\([a-z]_\?\)CID/\1Cid/g' \
	-e 's/\([a-z]_\?\)MySQL/\1Mysql/g' \
	-e 's/MySql/Mysql/g' \
	-e 's/\([a-xz]_\?\)SQL/\1Sql/g' \
	-e 's/DPMode/DpMode/g' \
	-e 's/TTWGraphics/TTwGraphics/g' \
	\
	-e 's/Ipointer/IPointer/g' \
	-e 's/\.vendorId/.vendorID/g' \
	-e 's/\.windowId/.windowID/g' \
	-e 's/SDL_GetWindowFromId/SDL_GetWindowFromID/g' \
	-e 's/SDL_AudioDeviceId/SDL_AudioDeviceID/g' \
	-e 's/SDL_JoystickId/SDL_JoystickID/g' \
	-e 's/SDL_JoystickInstanceId/SDL_JoystickInstanceID/g' \
	-e 's/AVCodecId/AVCodecID/g' \
	src/**/*.cpp src/**/*.h {datasrc,scripts}/**/*.py
git checkout -- src/engine/external
```

I like this option because it presents clear rules.

Still needs fixups because of the naive replacement, I'd do this if we
want this merged.
2024-03-05 15:44:09 +01:00
dobrykafe d94d020c25 fix practice mode not resetting after disconnect on solo servers 2024-03-05 14:08:30 +01:00
heinrich5991 c15733eda3
Merge pull request #8063 from heinrich5991/pr_ddnet_register_error
Show error from masterserver in console
2024-03-04 23:08:25 +00:00
heinrich5991 12409e545c Show error from masterserver in console
Allows people to see why masterserver registering failed.
2024-03-04 21:58:30 +01:00
Robert Müller dd94da67fb Hide tune_zone command in local console
Prevent the `tune_zone` command from being shown and used in the local console, which could cause issues with prediction, by only registering it as a game setting but not as a client command. The command callback is still correctly called when map settings are loaded in the `CGameClient::LoadMapSettings` function.
2024-03-04 21:26:47 +01:00
Robert Müller bfa5bc2b3c Remove remaining hard-coded server commands from client-side
Followup for #7919.
2024-03-04 21:26:41 +01:00
heinrich5991 e851c78e47 Don't show the git revision twice in server log
Previously:
```
2024-03-03 12:17:40 I git-revision: 885ae7ecae
2024-03-03 12:17:40 I server: version 18.0.3 on linux amd64
2024-03-03 12:17:40 I server: git revision hash: 885ae7ecae
```
2024-03-04 16:50:45 +01:00
Dennis Felsing 70eca3869a
Merge pull request #8051 from dobrykafe/pr-serverbrowser-friends-sort
Add sorting by number of friends to the server browser
2024-03-04 07:27:48 +00:00
Robert Müller 6b3e16ea82 Fix client crash due to truncated skin name 2024-03-03 18:18:49 +01:00
dobrykafe 13f324ccf4 add sort by number of friends to server browser 2024-03-03 02:01:28 +01:00
Dennis Felsing c0e4a4c3f2
Merge pull request #8002 from dobrykafe/pr-change-info-countdown
Show countdown message in player/tee settings for `sv_info_change_delay`
2024-03-02 13:02:06 +00:00
Dennis Felsing 968d08c716
Merge pull request #8026 from Robyt3/Base-Threading-Error-Handling
Add assertions to all thread and semaphore functions
2024-03-02 13:00:58 +00:00
Dennis Felsing 5d070ec5c3
Merge pull request #8043 from Robyt3/Editor-Envelope-Point-Color-Fix
Fix editor crash when right-clicking bezier control points
2024-03-02 12:50:42 +00:00
Robert Müller 350acae56b
Merge pull request #8041 from Jupeyy/pr_small_alloc_fix_vk
Search __most__ fitting allocation, not _first_ fitting
2024-03-02 12:36:48 +00:00
Robert Müller 6895cdc343 Fix editor crash when right-clicking bezier control points
The color selection should only be shown for normal envelope points but not for bezier control points, because it always changes the previously selected normal envelope point. This caused the client to crash when right-clicking a bezier control point when no normal envelope point was previously selected.

Closes #8020.
2024-03-02 13:16:26 +01:00
Jupeyy ec39742017 Search __most__ fitting allocation, not _first_ fitting 2024-03-02 13:12:58 +01:00
Robert Müller 209a367ab2 Fix editor color picker when Vulkan image blitting used
When image blitting is supported by the Vulkan backend, the color picker was reading incorrect pixel values, because the offset positions for the blitting region are the positions of the top-left and bottom-right corners, but instead the top-left offset and size (width, height) were passed as arguments.

Closes #8040.
2024-03-02 12:32:11 +01:00
Robert Müller 52da715858 Minor refactoring of CClient::SetState
- Rename parameter `s` to `State`.
- Only print debug message if new state is different from old state.
- Reduce indentation.
2024-03-01 18:58:41 +01:00
Robert Müller dd09834f32 Always build switch entities layers
Only building the switch entities layer when the current map has a switch layer (#8011) also does not work, because the entities textures are cached for each type and not reloaded unless the entities are changed manually. First joining a server with a map that does not have a switch layer will cause the textures for the type of that server to be built without the switch entities layer, so the switch entities texture will be missing when joining a server of that type with a map that does have a switch layer.

Instead, the switch entities layer textures are always built now, so the cached entities textures are can be used on all maps of the respective server type. This is expected to slightly increase the total memory usage after joining multiple servers of different types. As before, tiles which are unused are masked unless `m_DontMaskEntities` is set.
2024-02-29 21:45:53 +01:00
bencie 26cc7dde2f Refactor 2024-02-29 18:37:39 +01:00
bencie 2868b3cdf6 Let users pick background entities map without file extensions 2024-02-29 18:13:50 +01:00
Robert Müller be9411b262
Merge pull request #8031 from dobrykafe/pr-emotional-tees
fix incorrect usage of `SvEmotionalTees`
2024-02-29 16:06:43 +00:00
dobrykafe d2b2071bda fix incorrect usage of SvEmotionalTees 2024-02-29 16:47:58 +01:00
dobrykafe 720572ddda make chat command arguments case-insensitive when possible 2024-02-29 01:17:11 +01:00
heinrich5991 9620a9d3d9
Merge pull request #8029 from Robyt3/Menus-RenderPopupFullscreen-Function
Extract `CMenus::RenderPopupFullscreen` function
2024-02-28 22:39:29 +00:00
Robert Müller 6080cffcbb Extract CMenus::RenderPopupFullscreen function
Improve readability of the `CMenus::Render` function by extracting the code for rendering the fullscreen popups into a separate function.
2024-02-28 22:53:51 +01:00
Robert Müller 8d774fa48c Define Windows header macros only once in CMakeLists.txt
Instead of defining the macro `WIN32_LEAN_AND_MEAN` and sometimes also the macro `_WIN32_WINNT` in each file that directly or indirectly includes `<windows.h>`, only define these macros once consistently in `CMakeLists.txt`.

Also define `NTDDI_VERSION`, which is the new macro to specify the minimum Windows version starting with Windows Vista. This macro needs to be defined in addition to old `_WIN32_WINNT` macro, according to the documentation.

See https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers
2024-02-28 21:40:28 +01:00
Robert Müller 4ceb376969 Add assertions to all thread and semaphore functions
Assert on failures in all `thread_*` and `sphore_*` functions on all operating systems instead of only printing log messages on Unix, as these functions are only expected to fail when used with incorrect arguments or in some cases when a dead-lock is detected.

On macOS, `sphore_wait` was not correctly calling `sem_wait` in a loop to repeat the wait operation if it is interrupted by a signal.

On Windows, the AIO tests were failing with the additional assertions. The maximum count that semaphores on Windows could be incremented to was previously, arbitrarily limited to 10000, which was causing the `ReleaseSemaphore` call to fail as the AIO semaphore is signaled 65536 times (for each write operation) in multiple of the AIO tests.
2024-02-27 22:14:56 +01:00
Robert Müller ecfc18d129 Minor refactoring of bezier curve evaluation
- Remove `ValidateFCurve` function because it's small and only used once.
- Remove unnecessary checks in `SolveBezier`, as all of these conditions are already checked before the function is called.
- Remove unnecessary double negation of `InTang` to improve readability.
- Use `double` literals for `double` comparisons instead of `float` literals.
- Fix comments.
2024-02-26 20:43:35 +01:00
Robert Müller 47a8156ca8 Fix inaccurate evaluation of bezier curve envelopes
There is no need to divide the times by 1000 when evaluating bezier curves, as all times are relative and the division adds significant inaccuracy, to the point where evaluation of bezier curves goes completely wrong in some cases.

Closes #8005.
2024-02-26 20:43:21 +01:00
Robert Müller cc1d43e5a0 Fix division by zero when envelope point times overlap
Effectively skip envelope points whose start time is equal to the start time of the next envelope point.
2024-02-26 20:43:12 +01:00
Robert Müller 5aab9969ce Fix first envelope line segment not being rendered in editor
Rendering was started with the second line segment after one time step has already passed.
2024-02-26 20:42:58 +01:00
Robert Müller 7c4d51f111
Merge pull request #8016 from dobrykafe/pr-save-replay-improve
Improvements regarding `save_replay`
2024-02-26 18:39:20 +00:00
dobrykafe 91349e4cae add error handling for CDemoEdit job 2024-02-26 18:44:11 +01:00
dobrykafe 268b79cb61 handle invalid filename for save_replay 2024-02-26 18:43:51 +01:00
Robert Müller 2258cbca57
Merge pull request #8007 from heinrich5991/pr_ddnet_vital_ping
Respond to pings sent as vital messages with vital pongs
2024-02-26 12:22:46 +00:00
Robert Müller 6cdfa35727 Allow background jobs to be aborted, refactoring
Add `IJob::Abortable(bool)` function which jobs can call to specify whether they can be aborted. Jobs are not abortable per default. Abortable jobs may have their state set to `IJob::STATE_ABORTED` at any point if the job was aborted. The job state should be checked periodically in the `IJob::Run` function and the job should terminate at the earliest, safe opportunity when aborted. Scheduled jobs which are not abortable are guaranteed to fully complete before the job pool is shut down. However, if the job pool is already shutting down, no additional jobs will be enqueue anymore and abortable jobs will immediately be aborted.

In particular, the sound loading, community icon loading, master chooser and host lookup jobs are specified as being abortable. Conversely, the jobs saving replay demos, editor maps and screenshots are expected to finish before the client is shut down.

When the client is quitting/restarting, it will now disconnect from the current server first, before saving the config, to ensure that any actions that happen on disconnect (demo recorders being stopped etc.) happen first. The shutdown message is rendered before disconnecting and waiting for background jobs to finish.

The HTTP client is now initialized later during server launch, after the network initialization. Error handling is added and the server stops if the HTTP client could not be initialized, same as the client.

The `RunBlocking` functions are removed, as they are not used anymore after curl-multi was added.

The function `IJob::Status` is renamed to `State` and `IJob::STATE_PENDING` is renamed to `STATE_QUEUED` for consistency with naming of the HTTP client.

The member variables of the engine interface are encapsulated and the `jobs.h` include is removed from `engine.h`, which removes transitive includes of `system.h`.

Documentation for all job and job pool API is added.
2024-02-25 17:03:45 +01:00
Jupeyy 6bfd565a7c
Merge pull request #7995 from edg-l/some_updates
update ci actions, update rust edition to 2021 since our MSRV covers it
2024-02-25 15:11:54 +00:00
Edgar 0e0ebe9aea
update ci actions, update rust edition to 2021 since our MSRV covers it 2024-02-25 15:55:10 +01:00
archimede67 95e51db753
Merge pull request #8014 from furo321/case-insenstive-command-chat
Make chat commands completion case-insenstive
2024-02-24 18:30:43 +00:00
furo f3a277c365 Make chat commands completion case-insenstive 2024-02-24 18:11:26 +01:00
Dennis Felsing 59a734ce3f
Merge pull request #8010 from Robyt3/Map-Envelope-Render-Refactoring
Improve envelope evaluation and validation
2024-02-23 23:07:22 +00:00
Robert Müller 835001058b Always build switch entities layer when map has switch layer
Instead of only building the switch entities when the server uses the DDNet/DDrace type. Fix switch entities not being shown anymore on servers which do not mask entities. Regression from #7979.
2024-02-23 21:37:46 +01:00
Robert Müller ab3c6c4353 Improve envelope evaluation and validation
Call `EnvelopeEval` functions directly instead of passing them and their arguments to `CRenderTools::RenderTilemap` and `CRenderTools::RenderTileRectangle`.

Only evaluate color envelopes for tiles layers once instead of separately for the opaque and transparent passes.

Only evaluate relevant number of envelope channels instead of always evaluating all channels.

Avoid unnecessary calculations by only evaluating position envelopes for quads which are not fully transparent.

Fully ignore layer color and envelope color for entities layers, as these cannot be specified in the editor and should not be changeable.

Remove duplicate and insufficient checks for invalid envelope index before calling `EnvelopeEval`. Instead, set the correct default for all channels before calling `EnvelopeEval` and only change the result on success. Now, white color will consistently be assumed for invalid color envelopes, zero positions and rotations for invalid position envelopes, and full volume for invalid sound envelopes.

Validate number of envelope channels to prevent crashes. When loading maps containing envelopes with invalid number of channels (not equal to 1, 3 or 4), the number of channels of these envelopes is reset to 4 and an error message is displayed, so the mapper can examine all channels' data and transfer it to another envelope if necessary. Closes #7985.
2024-02-23 19:24:34 +01:00
Robert Müller 040d7673c6 Remove dead code 2024-02-23 18:21:18 +01:00
Robert Müller 73c3636f3b Add color4_base::Multiply function 2024-02-23 18:21:17 +01:00
Robert Müller 7d7a45663f Improve layout of General settings page, refactoring
Use consistent margins for all settings pages and titles (except the Appearance settings, which will be covered in the future).

Fix checkbox UI element ID variable `s_LowerRefreshRate` not being `static`.

Improve readability of layout code.
2024-02-22 22:14:54 +01:00
heinrich5991 e69ea46982 Respond to pings sent as vital messages with vital pongs
Matching the requester allows "reliable" and "unreliable" pings.
"Reliable" pings suffer from re-sends, thus might not accurately reflect
the latency, "unreliable" pings might not arrive at all.
2024-02-22 11:18:12 +01:00
Robert Müller e50f8cfaa0 Fix client crash if cl_race_ghost_save_best 1 deletes last ghost
If the own ghost is the last element in the vector and deleted due to using the `cl_race_ghost_save_best 1` setting then the following accesses with index `Own` were out-of-bounds. Closes #8003.
2024-02-21 23:38:43 +01:00
Dennis Felsing 99ee3f4fb9
Merge pull request #8004 from furo321/teamcolors-fixes
Small fixes to `cl_chat_teamcolors`
2024-02-21 11:29:34 +00:00
furo da02be4a9f Remove cl_chat_teamcolors check from info messages. 2024-02-21 12:03:42 +01:00
furo ba3a6b4262 Enable cl_chat_teamcolors by default 2024-02-21 12:02:51 +01:00
dobrykafe 40329b7d2e show countdown in player/tee settings for sv_info_change_delay 2024-02-20 21:41:20 +01:00
heinrich5991 87f3740a61
Merge pull request #8001 from Robyt3/Http-Android-Fix
Fix incorrect variable used in Android-specific code
2024-02-20 20:29:14 +00:00
Robert Müller aa7a614c36 Fix incorrect variable used in Android-specific code
The function `curl_easy_setopt` expects a `CURL *`, but `pHandle` is a `void *`.
2024-02-20 21:11:26 +01: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
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
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
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
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
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
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
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
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
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
bencie 997fe8fa3b Add /solo and /deep as practice commands 2024-02-12 17:17:55 +01:00
Dennis Felsing c85be52409
Merge pull request #7968 from Robyt3/Server-Mod-Message-Fix
Make it less likely that antibot message is sent from random tees
2024-02-11 21:58:01 +00:00
Robert Müller be98c17738 Make it less likely that antibot message is sent from random tees
Instead of sending the message from the first client which is not ingame, choose the first client which is fully empty, to make it less likely that the message is sent from a currently connecting client.
2024-02-11 22:12:15 +01:00
Robert Müller f0e71219a9 Add placeholder country/type for servers without community
Add a country "none" with tee flag (code `-1`) and a type "None" for all servers without community.

Previously, the country and type for these servers was unset and their handling special-cased, so any non-empty country/type filter would exclude servers without country/type information. Now individual countries/types can be excluded without also excluding all servers without community.

Closes #7961.
2024-02-11 17:55:53 +01:00
Robert Müller e4e4227709 Fix filter excluding all items when right-clicking the only entry
It was possible to create a community/country/type filter excluding all entries when the list only contains one entry and right-click is used to deselect it.
2024-02-11 17:41:15 +01:00
Dennis Felsing 6d3bd36877
Merge pull request #7964 from ChillerDragon/pr_doc_ui_doeditbox
Document `DoEditBox()`
2024-02-11 14:47:47 +00:00
Robert Müller 8e2195ce16
Merge pull request #7963 from bencie/flag-search
Add flag search
2024-02-11 14:43:47 +00:00
bencie b5960f3fc3 Track filtered flags directly instead of their indices 2024-02-11 15:16:40 +01:00
ChillerDragon 74a9c39650 Document DoEditBox() 2024-02-11 17:47:02 +08:00
bencie 206a36a02a Add searchbar to flags tab in settings 2024-02-11 04:05:35 +01:00
Robert Müller 9d1ebe726c Quit client faster by aborting HTTP requests earlier
Shutdown `CHttp`, i.e. abort all HTTP requests, as early as possible when quitting/restarting the client, after the config has been saved but before shutting down the gameclient. Previously, this was delayed until the engine shutdown, so the requests would often finish entirely instead of being aborted by the callback.

Previously, HTTP requests being aborted due to `CHttp` shutting down were considered `EHttpState::ERROR`, which sometimes causes deadlocks during engine shutdown or destruction of `CHttp`. The state is now set to `ABORTED` by passing `CURLE_ABORTED_BY_CALLBACK` to `OnCompletionInternal`. The otherwise unused handling of internal errors is removed.
2024-02-10 22:38:42 +01:00
Robert Müller b2041f5703 Fix assertion due to incorrect HTTP request state
Previously, it was assumed `ResultJson` would return `nullptr` for HTTP requests which have been aborted or failed with an error, which would trigger the newly added assertion error "Request not done".
2024-02-10 22:38:10 +01:00
Robert Müller 399ba63a2c Fix incorrect check for aborted server list GET request result
The HEAD request result has already been checked above.
2024-02-10 22:37:54 +01:00
Corantin H 93120b83cf Call FlagModified only when property can affect automapper (fixes #7959)
Handle more cases for undoing auto automap
2024-02-10 12:15:28 +01:00
Dennis Felsing a7bbcf00a6
Merge pull request #7956 from archimede67/editor-fix-quads
Editor: fix several quads related issues
2024-02-09 23:13:30 +00:00
Robert Müller fe5b9d2dc9 Encapsulate CInfoMessages members 2024-02-09 21:35:35 +01:00
Robert Müller dda86b4624 Refactor info message creation
Add `CInfoMessages::CreateInfoMsg` function to create fully initialized info messages, to reduce duplicate code when creating info messages.
2024-02-09 21:35:14 +01:00
Robert Müller 4be56bb87d Refactor info message rendering
Improve readability of flag rendering code.

Add `ROW_HEIGHT` and `FONT_SIZE` constants.
2024-02-09 21:35:07 +01:00
Robert Müller 9295993190 Remove redundant text width calculation
Directly use the bounding box which has already been calculated for the text containers, instead of calculating the text width again for every info message text.
2024-02-09 21:34:45 +01:00
Robert Müller ebe60738d9 Refactor CInfoMessages::AddInfoMsg usage
Reduce duplicate code by moving screen remapping and validation of the info message into the `AddInfoMsg` function.

Check for valid kill message before creating text containers, so they are not created and deleted unnecessarily.

Assign info message type directly instead of passing it as a separate parameter.
2024-02-09 21:33:47 +01:00
Robert Müller 109b6bfb8e Refactor info message text container creation
Combine `CreateNamesIfNotCreated` and `CreateFinishTextContainersIfNotCreated` functions to `CreateTextContainersIfNotCreated` function to reduce duplicate code on usage.

Extract duplicate code for determining name color in info messages as lambda function.
2024-02-09 21:33:27 +01:00
Robert Müller 1683304acd Ensure skin info of finish messages is valid 2024-02-09 21:33:14 +01:00
Robert Müller 289b7b08c7 Ensure finish info messages are initialized
Closes #7913.
2024-02-09 21:33:04 +01:00
Robert Müller cb0af02eae Extract CTeeRenderInfo::Valid function 2024-02-09 21:32:56 +01:00
Robert Müller 4cb0bb2744 Split CInfoMessages::OnMessage into separate functions
Improve readability by splitting long `OnMessage` function into separate functions for each individual message.
2024-02-09 21:32:48 +01:00
Robert Müller e350ceeb16 Extract SSkinTextures::Unload function 2024-02-09 21:32:44 +01:00
Corantin H f9ba9d819b Add more const qualifiers to editor methods 2024-02-09 21:13:28 +01:00
Robert Müller fbc4181809
Merge pull request #7937 from Peakies/switch_screen_pr
fix switch screen and blackscreen on opengl + window borderless
2024-02-09 19:47:42 +00:00
Peakies e8809f11a3 rename Modes 2024-02-09 23:01:09 +03:30
Corantin H bd5149c48c Prevent brush placing when paning editor view 2024-02-09 19:57:48 +01:00
Corantin H 9e724950d0 Fix quad grid snapping
Check for grid alignment before aligning quads to other quads
2024-02-09 19:57:43 +01:00
Corantin H 419bebf7ff Add const qualifier to interface getters in editor.h 2024-02-09 19:48:29 +01:00
Robert Müller 837ecb8708
Merge pull request #7946 from ChillerDragon/pr_ed_switch
Add "View" button to switch drop down in editor
2024-02-09 16:43:25 +00:00
ChillerDragon 3fc10d4a6c Add "View" button to switch drop down in editor
This allows mappers to find switchers by number.

see #7931
2024-02-09 16:28:24 +08:00
Dennis Felsing 9187c296a0
Merge pull request #7952 from Robyt3/Server-Sixup-Killmessages
Show kill messages also for sixup clients
2024-02-08 22:53:54 +00:00
bencie 177e8f07f1 Fix broken parameter in MoveCharacter 2024-02-08 22:34:38 +01:00
Robert Müller c0da15737d Show kill messages also for sixup clients
For consistency between 0.6 and 0.7 clients, also show kill messages for 0.7 clients, now that DDNet client also supports finish messages.

Closes #5623.
2024-02-08 20:30:31 +01:00
Dennis Felsing 7dc446e086
Merge pull request #7942 from Robyt3/Client-SoundInit-Warning
Use generic client warning for failed sound init
2024-02-08 14:00:16 +00:00
Peakies 01503af071 clear codes 2024-02-08 15:31:57 +03:30
ChillerDragon 860a472d5c Cleanup editor object comments 2024-02-08 15:59:26 +08:00
Robert Müller e4ea04950a Use generic client warning for failed sound init
Simplify code by using generic warning system instead of hard-coding the warning.
2024-02-07 23:55:00 +01:00
Robert Müller 272c8095d0 Show warnings after client close instead of preventing quitting
Instead of preventing the client from quitting/restarting while a warning is shown in the menus, add warnings that should be shown after quitting/restarting (i.e. the warning when the config could not be saved) to a separate list and show these warnings using an OS message box after the client has been closed. Otherwise, the client is prevented from closing if a warning is shown without being automatically hidden, which causes the client to hang indefinitely in the CI.

The message boxes for warnings must be shown after the client has already been completely shutdown, otherwise the regular shutdown with the Vulkan backend crashes because showing the message box has already partially deinitialized the backend.

The quitting/restarting client state is now checked after updating the FIFO component, so quitting/restarting initiated via FIFO is effective immediately, although this should have little effect in practice.

For completeness, a log message is added also for the case that the config was saved successfully.

The GitHub CI seems to automatically confirm/disable OS message boxes, so they should not block workflows.
2024-02-07 22:11:44 +01:00
Peakies d40038c679 remove unnecessary variables and loop 2024-02-07 02:31:06 +03:30
bencie 4baaf4f410 style 2024-02-06 15:43:46 +01:00
bencie 68d559ea46 Change i[x] i[y] to f[x] f[y] 2024-02-06 15:35:23 +01:00
bencie 5b2c35dc36 Fixed a bug with /tpxy where the parameters didn't take floats or negative numbers 2024-02-06 15:28:33 +01:00
Peakies 6691e2affa exclude rust_version 2024-02-06 13:50:35 +03:30
Robert Müller 78997e55d9 Ensure correct HTTP request state when getting result
Add assertions to ensure that the HTTP request result data and SHA256 are available when getting them instead of returning `nullptr` and `SHA256_ZEROED` when they are not.

Rename `CHttpRequest::Sha256` function to `ResultSha256`.
2024-02-05 21:58:01 +01:00
Robert Müller c5c9e6c983
Merge pull request #7897 from bencie/editor-buttons
Added plus/minus buttons to numeric value selectors in editor
2024-02-05 18:58:58 +00:00
bencie bb7662c3dc Added plus/minus buttons to numeric value selectors in editor 2024-02-05 19:15:52 +01:00
Peakies 6b7c8f1a28 fix switch screen and blackscreen on opengl + window borderless 2024-02-05 20:58:22 +03:30
Robert Müller bf3622e8f1 Fix and simplify check for maximum number of favorite communities
Because of incorrect index/size math, two favorite communities were removed when exceeding the maximum number of three favorite communities instead of only one. The check can be simplified because the maximum number of favorite communities can never be exceeded, so at most the first element needs to be removed from the vector.

Closes #7935.
2024-02-05 17:50:50 +01:00
Dennis Felsing 68ee8a758b
Merge pull request #7923 from Robyt3/Http-DDNet-Info-Sha-Check
Write DDNet info file only when it changed, initialize HTTP later on client launch, show message box on error, refactoring
2024-02-05 12:31:06 +00:00
Dennis Felsing d93615ed80
Merge pull request #7929 from ChillerDragon/pr_ed_view_tele
Add "View" button to tele drop down in editor
2024-02-05 12:29:48 +00:00
Dennis Felsing 8214e26132
Merge pull request #7924 from furo321/keep-scroll-during-selection
Keep console scrolling position during text selection
2024-02-05 12:16:34 +00:00
Dennis Felsing e2d16e6f78
Merge pull request #7925 from dobrykafe/pr-appearance-nameplate
Name plate appearance tab cleanup
2024-02-05 12:15:17 +00:00
ChillerDragon c9a3836a29 Add "View" button to tele drop down in editor
This allows mappers to find teles by number.

Partially fixed #2194
2024-02-05 18:35:42 +08:00
Dennis Felsing 5ddf6aefa1
Merge pull request #7926 from dobrykafe/pr-hud-teamlock
Add team-lock indicator to HUD
2024-02-05 10:22:50 +00:00
Dennis Felsing 8d46d61b47
Merge pull request #7927 from ChillerDragon/pr_ed_select_tile_para
Add parallax to layer selector (closed #7612)
2024-02-05 10:22:25 +00:00
ChillerDragon 0a82a2e759 Add doc comment for CUIRect::Draw() 2024-02-05 16:43:52 +08:00
ChillerDragon cdf69372d3 Add parallax to layer selector (closed #7612)
Also closed #5010

Offset was already supported but parallax was ignored.
Now it looks at offset and parallax when ctrl+right clicking a tile.
2024-02-05 14:22:16 +08:00
dobrykafe 01d87707ef add team-lock indicator to hud 2024-02-05 02:26:48 +01:00
dobrykafe 958bb7493e name plate appearance tab cleanup 2024-02-05 01:25:15 +01:00
furo b121734e6f Keep console scrolling position during text selection 2024-02-04 23:57:05 +01:00
Robert Müller f0deb129c0 Write DDNet info file only when it changed
Avoid many writes to disk each time the DDNet info is downloaded, i.e. each time the refresh button is pressed in the server browser, by first loading the DDNet info into memory and only writing it to disk when it differs from the current DDNet info based on the SHA256 hash.

The SHA256 is now also used to track whether the DDNet info was modified for the community filters and icons instead of using the current time for this purpose.

Closes #3941.
2024-02-04 23:29:11 +01:00
Robert Müller 535400d8a8 Initialize HTTP later on client launch, show message box on error
Initialize the HTTP client (start the HTTP thread) after initializing the network client instead of during the client interface construction. This ensures that config variables have been loaded already and the log output level is set correctly. This also means all library initialization log messages appear together in one block when starting the client.

Show an error message box and stop launching when the HTTP client could not be initialized, instead of launching but not being able to perform any HTTP requests, which causes bug reports about the serverlist being empty.
2024-02-04 23:29:05 +01:00
Robert Müller d6a20f271b Improve some variable names in CHttp 2024-02-04 23:29:05 +01:00
Robert Müller 987acfbba7 Use more specific log levels for HTTP requests 2024-02-04 23:27:40 +01:00
Robert Müller 6c6f058a8c Cleanup HTTP request cleanup
Ensure with assertion that file is closed when `CHttpRequest` is destructed.

Remove unnecessary assignments in destructor.
2024-02-04 23:25:56 +01:00
Robert Müller 48fad83681 Remove hard-coded commands from client-side
Both console and chat commands are sent to clients dynamically with respective messages, so the static lists of commands were only used for servers not making use of these messages. Instead of assuming potentially incorrect console and chat commands on those servers, the lists will now be empty for those servers.

Move the command registration from the `ddracecommands.h` and `ddracechat.h` header files to the `CGameContext::RegisterDDRaceCommands` and `CGameContext::RegisterChatCommands` functions and delete the header files. The `CHAT_COMMAND` and `CONSOLE_COMMAND` macros are removed, because they only add unnecessary indirection now. The strings `CHAT_COMMAND` and `CONSOLE_COMMAND` are simply replaced with `Console()->Register` and semicolons are added at the end of the lines.

Closes #7665.
2024-02-04 13:16:04 +01:00
Dennis Felsing f0da0aa4a0
Merge pull request #7915 from Robyt3/Browser-Community-Tabs
Add tabs for favorite communities, separate country/type filters
2024-02-03 23:08:24 +00:00
dobrykafe 71779385be allocate more space for DoLine_ColorPicker label 2024-02-03 22:47:29 +01:00
Robert Müller 7c9b1fbbb4 Add tabs for favorite communities, separate country/type filters
Support adding up to three communities as favorites in the server browser. Favorites can be changed with favorite buttons which are shown in the community filter on the Internet and Favorites tabs. The commands `add_favorite_community` and `remove_favorite_community` are added to change the favorite communities via the console and for saving the favorite communities to the config file. For the favorite communities, additional tabs using the communities' icons are shown in the server browser next to the Internet, LAN and Favorites tabs. Each community tab shows only the servers from the respective community, hence the community filters UI is not shown on the community tabs but only on the Internet and Favorites tabs. The country and type filters on community tabs cover only the countries and types from the respective community. Favorite communities are added from left to right. When more than three favorite communities are added, the oldest (leftmost) favorite community will be removed from the list.

When starting the client for the first time, i.e. with `cl_show_welcome 1`, the DDNet tab will be created as the only favorite community and selected initially. The community, country and type filters are unset when starting for the first time, so the Internet tab now shows all servers per default.

When starting with a `ui_page` for a favorite community that is not configured, the page is reset to the Internet tab. This also affects those who upgrade from versions with the old DDNet and KoG tabs. The server browser is now also correctly updated when changing `ui_page` via the console.

Track country and type filters for every community separately, to avoid filters resetting when switching between community tabs or changing the community filter. The commands `add_excluded_community`, `remove_excluded_community`, `add_excluded_country`, `remove_excluded_country`, `add_excluded_type` and `remove_excluded_type` are added to change the exclusion filters via the console and for saving the exclusion filters to the config file.

Render community filters above the toolbox (filter, info and friends) tabs when on the Internet and Favorites tab, so this setting is more visible and can be changed also when the other toolbox tabs are selected.

Add icon for the none community, based on the tee country flag color. This icon is hard-coded in the client, as the none community also is, so fetching the icon from the server would be inconvenient. Load community icons already when rendering the menu instead of only when rendering the server browser, so the icons are immediately available when using the start menu.

Find tutorial server by searching for community type "Tutorial" instead of searching for "(Tutorial)" in the server name.

Avoid cleaning favorite communities and filters when there are no communities, i.e. when the DDNet info failed to be loaded or does not contain any communities, to avoid losing all favorite communities and filters in this case.

Closes #7774.
2024-02-03 21:12:23 +01:00
Robert Müller a8f3b56850 Fix undefined behavior on loading empty PNG files
When empty PNG files are loaded, the `std::vector` for the file contents is resized to size 0, which results in undefined behavior when it is accessed with `front`.

When `io_tell` fails, i.e. returns `-1`, this was incorrectly cast to an `unsigned` and therefore caused a very large allocation and potentially crashes due to lack of memory.
2024-02-03 20:00:08 +01:00
Robert Müller 7d0e9e86c1 Extract CMenus::DoButton_Favorite function
To render star-icon favorite button like for favorite skins.
2024-02-03 20:00:03 +01:00
heinrich5991 78bd4970be
Merge pull request #7909 from furo321/set-correct-name-size
Set correct size of name column in SQL table
2024-02-03 16:19:29 +00:00
Dennis Felsing f7ceae5d29
Merge pull request #7910 from furo321/editor-sync-toggle
Use toggle button instead of checkbox for "Sync envelope button".
2024-02-03 07:55:06 +00:00
Dennis Felsing 739e104fbb
Merge pull request #7863 from furo321/hookcoll-inaccurate
Scale angles using MousePos with zoom
2024-02-03 07:45:31 +00:00
Dennis Felsing cd9cd97f38 Version 18.0.3 2024-02-03 08:53:27 +01:00
furo f6d093987f Use toggle button instead of checkbox for "Sync envelope button". 2024-02-03 01:10:54 +01:00
furo 5378fdc20b Set correct size of name column in SQL table 2024-02-03 00:21:42 +01:00
heinrich5991 7f85922d75
Merge pull request #7872 from Robyt3/Client-Dummy-Config-Desc
Minor improvement of dummy config variable descriptions
2024-02-02 21:55:14 +00:00
heinrich5991 1337e522da
Merge pull request #7907 from archimede67/editor-fix-quads-crash
Editor: fix crash when changing layer with UP or DOWN while quad popup is opened
2024-02-02 21:53:58 +00:00
heinrich5991 63e010b8e4
Merge pull request #7906 from furo321/limit-port-range
Set max limit for `sv_port` and `ec_port` to 65535
2024-02-02 21:53:27 +00:00
Corantin H d988b92b38 Check selected quad index when rendering quad popup (fixes #7904) 2024-02-02 22:15:05 +01:00
furo 2ed631b90a Set max limit for sv_port and ec_port to 65535 2024-02-02 22:08:56 +01:00
Robert Müller e8305ef111 Move CSnapIDPool to separate compilation unit 2024-02-02 20:33:43 +01:00
Robert Müller c40d809282 Refactor skin refreshing in gameclient, fix crash in skin settings
Add `CGameClient::RefreshSkins` function to refresh skins. This function reloads all skins by calling `CSkins::Refresh` and then notifies all gameclient components about the skins being refreshed by calling the new `CComponent::OnRefreshSkins` function, so the components can properly invalidate their current skin texture handles. The existing `RefindSkins` functions are changed to `OnRefreshSkins`.

Additionally, `OnRefreshSkins` is overridden in `CMenus` to set the flag so the skin list will be updated before it is rendered the next time, to fix the client crashing when changing skin related config variables via the console. Closes #7891.
2024-02-01 20:41:10 +01:00
Dennis Felsing 2ed899a259
Merge pull request #7890 from Robyt3/Voting-Hud-Improvement
Improve voting HUD, refactoring
2024-02-01 08:41:58 +00:00
Dennis Felsing 3133676abb
Merge pull request #7889 from bencie/master
Fix inconsistencies in appearance settings
2024-02-01 08:41:50 +00:00
Dennis Felsing dea3d170f0
Merge pull request #7888 from heinrich5991/pr_ddnet_mastersrv_charset
Accept `charset=*` in `Content-Type` for masterserver
2024-02-01 08:10:44 +00:00
Robert Müller 1955905a19 Improve voting HUD
Reduce height and empty space and make margins consistent. Slightly increase width for better round corner drawing and to support longer vote descriptions.

Auto-scale description and reason labels and show ellipsis if they don't fit.

Show circular progress indicator for remaining vote time.
2024-01-31 23:09:31 +01:00
Robert Müller fa62d3c360 Close voting HUD when remaining seconds are negative
Ensure voting HUD disappears when it should, in case the server does not announce that the vote has ended correctly.
2024-01-31 23:09:31 +01:00
Robert Müller dfc2e80701 Move voting rendering from CHud to CVoting 2024-01-31 23:09:31 +01:00
bencie 0972dc2bbe Move Show chat checkbox to Chat tab 2024-01-31 21:45:09 +01:00
bencie f34a583a4e Remove redundant Show kill messages checkbox 2024-01-31 21:44:16 +01:00
Robert Müller df95ca74ec Extract CVoting::RemoveOption function 2024-01-31 21:06:11 +01:00
Robert Müller c1549635c6 Cleanup CVoting::RenderBars function
The functionality to draw text on the voting bars is never used, so the parameter `Text` is always `false`.

Remove unused variable `PassArea`. The remaining area of the voting bars is unused.
2024-01-31 21:05:03 +01:00
heinrich5991 1d638707b2 Accept charset=* in Content-Type for masterserver
You should generally not send a `charset=*` parameter for `Content-Type:
application/json` because no parameters are defined for it:
https://datatracker.ietf.org/doc/html/rfc7158#section-11.

Fixes #6955.
2024-01-31 20:34:21 +01:00
Dennis Felsing 984457a48e
Merge pull request #7887 from furo321/add-conchain-skin-cmds
Add console chain for refreshing skins
2024-01-31 09:00:45 +00:00
Dennis Felsing c3e3ac5732
Merge pull request #7885 from furo321/practice-improvements
Small improvements to practice
2024-01-31 09:00:18 +00:00
Dennis Felsing a7097f1ae7
Merge pull request #7884 from furo321/cmdlist
Tell the user about `/cmdlist` when using an unknown chat command.
2024-01-31 08:59:36 +00:00
furo 5179850dbd Add console chain for refreshing skins 2024-01-31 01:57:55 +01:00
furo d149ab60e8 Remove unused ConAccept function 2024-01-31 00:51:50 +01:00
furo ec70556577 Don't print the team cannot finish anymore message when team is already in practice 2024-01-31 00:47:19 +01:00
furo c1fe1b49fa Allow joining started teams that have practice enabled 2024-01-31 00:39:00 +01:00
furo a9df61e1dd Tell the user about /cmdlist when using an unknown chat command. 2024-01-31 00:27:38 +01:00
Dennis Felsing 7f42b3a082
Merge pull request #7883 from Teero888/master
CMenus::RandomSkin() adjustments
2024-01-30 23:06:09 +00:00
Teero888 e3dc26a81b fix msvc complaining 2024-01-30 22:28:55 +01:00
Teero888 fda6a6760c remove redundant get() call on smart pointer 2024-01-30 22:05:44 +01:00
Teero888 cef4358560 CMenus::RandomSkin() adjustments
+ Dont randomise colors if UseCustomColor is false
+ Use all instead of only vanilla skins when randomising
2024-01-30 21:46:04 +01:00
Robert Müller 2e35250401 Improve client/server launch log messages
Use error log level for error messages. Use info log level explicitly instead of using `dbg_msg`.

Log time taken for initialization in trace level message.
2024-01-30 20:45:23 +01:00
ChillerDragon 40633d800a Fix 0.7 armor being snapped as health
Closed https://github.com/ZillyInsta/ddnet-insta/issues/91
2024-01-30 19:47:04 +08:00
ChillerDragon f375f20ffc Fix clang warning and UB when there is no game layer
clang 14.0.6 shows this:

```
[ 98%] Building CXX object CMakeFiles/game-client.dir/src/game/generated/client_data7.cpp.o
In file included from /usr/include/c++/12/bits/stl_tempbuf.h:60,
                 from /usr/include/c++/12/bits/stl_algo.h:61,
                 from /usr/include/c++/12/algorithm:61,
                 from /home/chiller/Desktop/git/ddnet/src/base/math.h:6,
                 from /home/chiller/Desktop/git/ddnet/src/base/color.h:5,
                 from /home/chiller/Desktop/git/ddnet/src/game/editor/popups.cpp:4:
In function ‘void std::_Construct(_Tp*, _Args&& ...) [with _Tp = CEditorActionTileChanges; _Args = {CEditor*&, int&, int&, const char (&)[20], map<int, map<int, STileStateChange, less<int>, allocator<pair<const int, STileStateChange> > >, less<int>, allocator<pair<const int, map<int, STileStateChange, less<int>, allocator<pair<const int, STileStateChange> > > > > >&}]’,
    inlined from ‘static void std::allocator_traits<std::allocator<void> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = CEditorActionTileChanges; _Args = {CEditor*&, int&, int&, const char (&)[20], std::map<int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > >, std::less<int>, std::allocator<std::pair<const int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > > > > >&}]’ at /usr/include/c++/12/bits/alloc_traits.h:635:19,
    inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {CEditor*&, int&, int&, const char (&)[20], std::map<int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > >, std::less<int>, std::allocator<std::pair<const int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > > > > >&}; _Tp = CEditorActionTileChanges; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/12/bits/shared_ptr_base.h:604:39,
    inlined from ‘std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = CEditorActionTileChanges; _Alloc = std::allocator<void>; _Args = {CEditor*&, int&, int&, const char (&)[20], std::map<int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > >, std::less<int>, std::allocator<std::pair<const int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > > > > >&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/12/bits/shared_ptr_base.h:971:16,
    inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {CEditor*&, int&, int&, const char (&)[20], std::map<int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > >, std::less<int>, std::allocator<std::pair<const int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > > > > >&}; _Tp = CEditorActionTileChanges; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/12/bits/shared_ptr_base.h:1712:14,
    inlined from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {CEditor*&, int&, int&, const char (&)[20], std::map<int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > >, std::less<int>, std::allocator<std::pair<const int, std::map<int, STileStateChange, std::less<int>, std::allocator<std::pair<const int, STileStateChange> > > > > >&}; _Tp = CEditorActionTileChanges]’ at /usr/include/c++/12/bits/shared_ptr.h:464:59,
    inlined from ‘std::shared_ptr<typename std::enable_if<(! std::is_array< <template-parameter-1-1> >::value), _Tp>::type> std::make_shared(_Args&& ...) [with _Tp = CEditorActionTileChanges; _Args = {CEditor*&, int&, int&, const char (&)[20], map<int, map<int, STileStateChange, less<int>, allocator<pair<const int, STileStateChange> > >, less<int>, allocator<pair<const int, map<int, STileStateChange, less<int>, allocator<pair<const int, STileStateChange> > > > > >&}]’ at /usr/include/c++/12/bits/shared_ptr.h:1010:39,
    inlined from ‘static CUI::EPopupMenuFunctionResult CEditor::PopupGroup(void*, CUIRect, bool)’ at /home/chiller/Desktop/git/ddnet/src/game/editor/popups.cpp:450:85:
/usr/include/c++/12/bits/stl_construct.h:119:7: warning: ‘GameLayerIndex’ may be used uninitialized [-Wmaybe-uninitialized]
  119 |       ::new((void*)__p) _Tp(std::forward<_Args>(__args)...);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/chiller/Desktop/git/ddnet/src/game/editor/popups.cpp: In static member function ‘static CUI::EPopupMenuFunctionResult CEditor::PopupGroup(void*, CUIRect, bool)’:
/home/chiller/Desktop/git/ddnet/src/game/editor/popups.cpp:408:29: note: ‘GameLayerIndex’ was declared here
  408 |                         int GameLayerIndex;
      |                             ^~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-nullability-completeness’ may have been intended to silence earlier diagnostics
```

Which makes sense. GameLayerIndex is only set in a loop if a condition is met.
And then its value is recorded for the undo feature.

The condition should never be false. Because a game layer is a strict requirement for a functional map.
But I still decided to avoid using an assert or silent ignore.
If this breaks logs would be nice.
If this breaks the editor should not crash.
The editor should never crash or quit to not lose unsaved changes.
2024-01-30 11:16:46 +08:00
Robert Müller dd44c6cd4d Minor improvement of dummy config variable descriptions 2024-01-28 20:12:22 +01:00
Learath 31b3ac71c2 Fix client/server updates 2024-01-28 19:34:30 +01:00
Dennis Felsing d60852a020
Merge pull request #7868 from Learath2/dd_pr_updater
Fix updater issue. Close #7867
2024-01-28 12:37:42 +00:00
Dennis Felsing 33ffd0f052 Version 18.0.2 2024-01-28 13:38:58 +01:00
Learath 2470e7489d Fix updater issue. Close #7867 2024-01-28 12:50:54 +01:00
heinrich5991 dcdc66d1df
Merge pull request #7869 from furo321/testcmds-error
Add a error message for when testing commands aren't allowed
2024-01-27 17:59:51 +00:00
furo 633330bcd8 Add a error message for when testing commands aren't allowed 2024-01-27 18:18:32 +01:00
heinrich5991 e3732928a9
Merge pull request #7862 from Robyt3/Menus-Refactoring-Various
Various minor refactoring of menus
2024-01-27 13:08:55 +00:00
Robert Müller 83942f9a50
Merge pull request #7866 from heinrich5991/pr_ddnet_redundant_utf8_checks
Remove redundant UTF-8 checks
2024-01-27 13:03:45 +00:00
heinrich5991 8157ea4ce4
Merge pull request #7865 from Robyt3/Demo-AddDemoMarker-Error-Messages
Show error messages in console when `add_demomarker` fails
2024-01-27 12:56:50 +00:00
heinrich5991 c16afc60ec
Merge pull request #7864 from infclass/kaffeine/teeinfo-kitties
TeeInfo: Fix blue and limekitty eyes and feet 0.6 -> 0.7 mapping
2024-01-27 12:49:06 +00:00
heinrich5991 4f06f3a797 Remove redundant UTF-8 checks
We already check for valid UTF-8 while unpacking strings.
2024-01-27 13:43:04 +01:00
Robert Müller 5d7f2c6e1b Show error messages in console when add_demomarker fails
When there are too many demo markers already or when the previous demo marker is too close.
2024-01-27 13:26:08 +01:00
Jupeyy 349eb38ebf
Merge pull request #7859 from Robyt3/Windows-ShellExecute-Fixes
Ensure client window is maximized and active after restarting, refactoring
2024-01-27 11:27:40 +00:00
Alexander Akulich e0e37d7f7b TeeInfo: Fix blue and limekitty eyes and feet 0.6 -> 0.7 mapping 2024-01-27 02:00:16 +03:00
furo e14123164b Scale angles using MousePos with zoom 2024-01-26 23:12:47 +01:00
Robert Müller 2b2d3b8dd2 Add enum EServerControlTab 2024-01-26 21:39:11 +01:00
Robert Müller 8982da4a32 Refactor usages of CMenus::DoButton_MenuTab
Use `IGraphics::CORNER_NONE` instead of `0`.

Use `nullptr` instead of `NULL`.

Remove arguments identical to defaults.

Use loops for tab bars with several tabs.
2024-01-26 21:39:11 +01:00
Robert Müller 7854a277c7 Use IGraphics::CORNER_NONE for CUIRect::Draw function 2024-01-26 21:39:11 +01:00
Robert Müller f13888b2cc Move variable declarations closer to usages 2024-01-26 21:39:11 +01:00
Robert Müller 53b5b3bc98 Remove unused m_Spacer variable 2024-01-26 21:39:11 +01:00
Robert Müller eb2aea22b8 Remove redundant condition
The function `CMenus::RenderInGameNetwork` is only called when the client has `STATE_ONLINE` so this condition is always `true`.
2024-01-26 21:39:11 +01:00
Robert Müller 350c1fc860 Remove temporary variable and rename parameter 2024-01-26 21:39:11 +01:00
Robert Müller a49ee14cb0 Remove unused return value of menus render functions 2024-01-26 21:39:11 +01:00
Robert Müller bd7ee904c0 Remove unused PAGE_SYSTEM enum literal 2024-01-26 21:39:11 +01:00
heinrich5991 70743331de
Merge pull request #7861 from furo321/toggle-infomessages
Store info messages even if they aren't enabled
2024-01-26 19:45:46 +00:00
furo d94c0384a6 Store infomessages even if they aren't enabled 2024-01-26 20:20:20 +01:00
Robert Müller d5c7488480 Ensure client window is maximized and active after restarting
Add parameter to `shell_execute` to either start the process in the foreground or background on Windows. Previously, all processes were started in the background, because this is desired when starting the server from the client. However, this causes the graphics initialization to fail when restarting the client after updating or with the `restart` command when using Vulkan with windowed and windowed fullscreen mode.

Closes #6578.
2024-01-25 20:52:17 +01:00
Robert Müller 4d206ffab3 Add documentation for shell_execute and kill_process functions 2024-01-25 20:24:07 +01:00
Robert Müller 725ebc929e Remove duplicate if branch 2024-01-25 20:23:53 +01:00
Robert Müller c4d512d86e
Merge pull request #7687 from archimede67/editor-better-map-settings
Editor: better map settings input (autocomplete, validation)
2024-01-24 18:17:19 +00:00
Robert Müller 1f8a60b8e1 Show extra "Reset filter" button when no servers match filter
Render an additional "Reset filter" button below the "No servers match your filter criteria" message to make it more obvious for new players how to restore the original view of servers, especially when the filter tab is not currently selected.
2024-01-23 20:20:32 +01:00
Corantin H 0cd002e08c Various fixes to map settings handling 2024-01-23 20:15:30 +01:00
Corantin H aca398f3c9 Added dialog to fix invalid map settings on load 2024-01-23 20:13:57 +01:00
Corantin H 9cc8a28305 Better map settings input (autocomplete, validation) 2024-01-23 20:13:56 +01:00
Robert Müller 6829cd6ef6
Merge pull request #7856 from archimede67/editor-undo-cleanup-game-times
Editor: made "Clean up game tiles" undoable
2024-01-23 18:34:14 +00:00
Corantin H af51fcccbb Editor: made "Clean up game tiles" undoable 2024-01-23 19:03:53 +01:00
Robert Müller 9c66a6a147 Remove unused parameter of SetWindowParams function
The `bool AllowResizing` parameter is only passed to other `SetWindowParams` functions but never used in the end, as whether or not resizing is allowed is separately determined based on the value of the `int FullscreenMode` parameter.
2024-01-23 17:49:55 +01:00
heinrich5991 a2c8869025
Merge pull request #7852 from Robyt3/Browser-Community-Filter-Fix
Fix countries/types filters excluding all servers
2024-01-23 08:56:34 +00:00
Dennis Felsing 4f18816b2b Version 18.0.1 2024-01-22 22:53:09 +01:00
Robert Müller 797db31aa1 Fix countries/types filters excluding all servers
Instead of cleaning the countries/types filters based on all available communities' countries/types, only consider the countries/types of currently selected communities. Ensure countries/types are always cleaned when updating the server browser filter in the UI. This fixes that countries/types which are not available for the selected communities were still affecting the server filtering, causing no servers to be shown in some cases.

Closes #7847.
2024-01-22 22:30:15 +01:00
Dennis Felsing 45ab8e911a
Merge pull request #7842 from k-i-o/patch-1
Update config_variables.h
2024-01-22 08:27:08 +00:00
Dennis Felsing de0bd3a78a Version 18.0 2024-01-22 09:29:47 +01:00
Samuele Radici 79cf3b4e17
Update config_variables.h
text error
2024-01-22 01:33:44 +01:00
Dennis Felsing 50dc9de991
Merge pull request #7839 from infclass/kaffeine/fix-move-restrictions-incapsulation
Character: Fix m_MoveRestrictions and m_Core incapsulation
2024-01-21 22:40:22 +00:00
Dennis Felsing fca6e0abe3
Merge pull request #7837 from Robyt3/Demo-Recorder-Improvements
Refactor demo recorder usage
2024-01-21 22:39:46 +00:00
Alexander Akulich d0f5ced546 Make http states a enum class and use it across the codebase 2024-01-22 01:06:59 +03:00
Robert Müller 9150f48562 Refactor demo recorder usage
To simplify the usage of the demo recorder, parameters are added to the `IDemoRecorder::Stop` function to control whether the demo file is removed or renamed when stopping the recording.

Ensure demo files of the replay recorder are always removed (except on crashes). The temporary replay demos were previously not removed when being disconnected from a server.

Fix auto demos being stopped and restarted when enabling replays in the settings menu. Now only the replay recorder is stopped/started when necessary.

Fix replay recorder being restarted when setting `cl_replay` variable with console without changing the value.

Remove unnecessary `CClient::m_ButtonRender` variable. Demo rendering is already stopped correctly when reaching the end of the demo without this additional variable.

Remove unused `CDemoRecorder::m_pMapData` variable.
2024-01-21 22:21:56 +01:00
Alexander Akulich 386935f5cf Character: Incapsulate m_MoveRestrictions and m_Core
Instead of leaking the m_MoveRestrictions to all classes which needs to
adjust the Character velocity, add a setter which takes into account those
restrictions.

The shotgun bug replication requires an access to the Velocity without the
restrictions applied (so we have to have this dirty setter).

Expose only *const* CCharacterCore to force the setters usage and prevent
incorrect write.
2024-01-21 20:59:50 +03:00
Robert Müller b89e4e8770 Finish CHttpRequest::OnCompletion before updating State()
Ensure that the `CHttpRequest::OnCompletion` function has finished before updating the state which is visible to other threads. Otherwise, threads may try to access the result of a completed HTTP request, before the result has been initialized/updated in the `OnCompletion` function.

Fixes warning due to invalid texture width/height being shown for downloaded skins, because the texture was loaded before the image data was initialized. Closes #7818.

Regression from #7683. Before this, the `OnCompletion` function could also modify the HTTP request's state, which was used to check if loading the skin PNG failed. Instead of doing this, a separate check is added for the skin download task to check that the PNG was loaded successfully.
2024-01-21 14:53:33 +01:00
Dennis Felsing 94931fadc0
Merge pull request #7832 from Robyt3/Base-Localtime-Threadlocal
Ensure uses of `localtime` function are thread-safe
2024-01-21 10:36:31 +00:00
Robert Müller 4b8dabcf5d Improve Windows logger, add virtual terminal support
Use [virtual terminal processing](https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences) for Windows console output when possible, using the existing async logger. Fallback to the old Windows logger when virtual terminal processing is not available. Do not set any logger when there is no console/file/pipe to output to.

This adds support for 24 bit RGB colors using ANSI escape codes (when Terminal emulator supports it) instead of only supporting 16 fixed colors.

Use the existing async logger also on Windows by converting the console standard output handle to an IOHANDLE. Avoid converting console output to UTF-16 by changing the console output codepage to UTF-8 and outputting that directly. Overall, this reduces the time until the loading screen first appears when launching the client from the console on Windows by around 70%, from 80-100ms down to 25ms.

Add support for `NO_COLOR` environment variable also on Windows.

Use the async logger also for writing output to files and pipes instead of using a Windows specific implementation for this, to reduce lags when redirecting the standard output.

Closes #3925. The client/server will not freeze anymore when entering selection mode in the console because we are using the async logger on Windows now.

Closes #1108. We were already using AIO on Windows to write the logfile, which was not causing any known issues. We are now also using AIO with the async loggers for console/files/pipes on Windows.
2024-01-20 18:19:08 +01:00
Robert Müller 93cbad485d
Merge pull request #7831 from BlaiZephyr/move-nameplate-button
moved nameplates from hud -> nameplates
2024-01-19 20:26:51 +00:00
Robert Müller c1a1720a08 Ensure uses of localtime function are thread-safe
On Windows, the result of the `localtime` function is thread-local, hence our uses of this function are already thread-safe.

On non-Windows, the `localtime` function is potentially not thread-safe, so the reentrant `localtime_r` function is used instead with a thread-local buffer for the result.

Closes #7788.
2024-01-19 21:26:50 +01:00
melon 5361637a55 fixed placement & spacing 2024-01-19 21:09:56 +01:00
melon abe6c1c4b5 moved nameplates from hud -> nameplates 2024-01-19 20:44:31 +01:00
ChillerDragon e59c9a6450 Only log http requests if `dbg_curl 1`
closed #7823
2024-01-19 12:38:53 +08:00
Robert Müller 6e4afd7c63 Remove unnecessary check for entities close to map border
When handling door and laser entities, all 8 adjacent tiles are checked for laser modifier tiles. When handling laser entities, the 8 tiles one further out are also checked for laser modifier tiles. If either of those 16 tiles is outside the map bounds, an error message was printed and the tiles are ignored. The error message is removed because it's unnecessary and misleading. Placing entities near or on the map border is not known to cause any issues.

Closes #7759.
2024-01-18 22:44:22 +01:00
Dennis Felsing 0bce368c77
Merge pull request #7824 from Robyt3/Client-FPS-Graph-Timebase
Add time scale to debug graphs for constant scrolling speed
2024-01-17 23:29:13 +00:00
Ravie 69a74963ce Allow finer editor grid 2024-01-17 23:36:09 +01:00
Robert Müller 4be76f0d08 Add time scale to debug graphs for constant scrolling speed
Store X value (time) for all graph entries in addition to the Y value (FPS, prediction margin etc.). The `CGraph::Add` function adds values to the graph at the current time. The `CGraph::InsertAt` function allows specifying arbitrary X values, as long as the values are inserted in increasing order.

The entries are kept in a ringbuffer and old entries are recycled when it's full. The size of the ringbuffer is configurable for each graph, as the FPS graph needs significantly more buffer because values are added more often.

The scrolling speed of the graphs is fixed by specifying the maximum size of the window of values which should be displayed. For this purpose, a parameter is added to the `CGraph::Scale` function to specify the size of the window which should be rendered in the `CGraph::Render` function. For the FPS graph only the last second is rendered, so small spikes are still noticeable. For prediction and gametime margin graphs the last five seconds are rendered, which should result in a similar scrolling speed as before this change. The debug tuning graph is a special case, where the X values set manually and fixed to 0-127, same as before, instead of being based on the current time.

The graph rendering is made much more efficient by precalculating when the vertex colors need to be updated, to avoid all unnecessary calls to `SetColorVertex`. Additionally, line items are bundled together in an array to avoid calling `LinesDraw` for every individual line item.
2024-01-17 20:43:19 +01:00
Robert Müller c90a52f51c Add CDynamicRingBuffer to avoid specifying size as template 2024-01-17 18:17:08 +01:00
heinrich5991 626b7ca805
Merge pull request #7795 from Robyt3/Menus-Browser-Tab-Icons
Use icons for Internet, LAN and Favorites server browser tabs, use star icon for favorite servers
2024-01-17 13:56:59 +00:00
heinrich5991 9bbceab2c4
Merge pull request #7814 from gerdoe-jr/stop-annoying-superteam
Don't warn about unfinishable map for super team
2024-01-17 13:55:07 +00:00
Dennis Felsing 7c4bde43b1
Merge pull request #7813 from gerdoe-jr/separate-cmds
Divide `/tp` into `/tpxy` and `/tpto`
2024-01-17 00:12:50 +00:00
Dennis Felsing 28cd6ad2a5 Fix style 2024-01-17 00:49:32 +01:00
Dennis Felsing 55c225726b
Merge pull request #7819 from Robyt3/Engine-Warning-Uninitialized
Fix warning title being uninitialized in some cases
2024-01-16 23:48:23 +00:00
Dennis Felsing 79bdd1a3bb
Merge pull request #7816 from Robyt3/Editor-Resize-Cursor-Alignment
Improve alignment of editor resize cursors
2024-01-16 23:47:09 +00:00
gerdoe-jr 1840519609
Check for characters wtih DDRACE_CHEAT instead of TEAM_SUPER 2024-01-16 23:16:19 +03:00
Vladislav Gerasimov c53e0af6ef
/tpto -> /tp and /teleport 2024-01-16 22:17:59 +03:00
Robert Müller 0512e65dbe Fix warning title being uninitialized in some cases
For some warnings a random title instead of the default title was shown because it was not initialized.
2024-01-16 20:12:25 +01:00
Corantin H 12514360b7 Add editor tooltips to recent features
Add tooltip when drawing tele brush (tele numbers adjust).
Add tooltips when dragging quad points (alignment)
2024-01-16 19:31:01 +01:00
Robert Müller b4ceffdc83 Improve alignment of editor resize cursors
Center the resize (V/H) cursors on the mouse position instead of aligning the top-left with the mouse position. This feels better to use and is consistent with the behavior for example on Windows.
2024-01-16 19:12:01 +01:00
gerdoe-jr 40ed4bb98f
Check for super character in team, don't annoy them more than expected 2024-01-16 20:28:40 +03:00
gerdoe-jr 7df3330c06
Divide /tp into /tpxy and /tpto 2024-01-16 20:04:39 +03:00
heinrich5991 bb3bd57c0e
Merge pull request #7683 from Learath2/dd_pr_curlmultifinal
Use curl-multi. Supersedes #5842
2024-01-15 21:54:24 +00:00
heinrich5991 0f653b9b76
Merge pull request #7794 from ChillerDragon/pr_master_team_change
Report team changes to master when teams are on
2024-01-15 15:36:46 +00:00
Corantin H d2ea9cbcf1 Fix multiple editor undo/redo issues
Fixed crash when runing tool 'Remove unused envelopes' and trying to undo the addition of an envelope (#7738)
Fixed issues where undo/redo would not work properly when changing a layer's order or group property
Added missing action for changing the position of a sound source
2024-01-14 19:45:20 +01:00
Learath2 f5910343e2 Fix CI 2024-01-14 15:37:44 +03:00
Corantin H a3115d76d2 Restore ability to move points of all selected quads 2024-01-14 11:09:12 +01:00
Dennis Felsing 8dee975d66
Merge pull request #7744 from Robyt3/Editor-Color-Palette-Pipette
Add color palette and pipette to editor
2024-01-13 22:55:16 +00:00
Dennis Felsing 3b10500e99
Merge pull request #7797 from Robyt3/Chat-Render-Improvements
Various minor refactoring of chat rendering, fix chat background size
2024-01-13 22:54:36 +00:00
Robert Müller a873485643 Fix multi-line text selection not rendered correctly anymore
The `CTextCursor::m_LineCount` variable is only updated after the cursor is rendered. For calculating the selection quads we need to check `LineCount` instead, which is updated while the cursor is being rendered. Regression from #7733.
2024-01-13 23:21:13 +01:00
Robert Müller d897573acc Fix chat background width calculation when scoreboard is open
The chat background width was too small when the scoreboard is open and the message text begins on a different line than the player name.
2024-01-13 22:41:50 +01:00
Robert Müller 4fded18644 Calculate chat message height using text render function 2024-01-13 22:41:42 +01:00
Robert Müller df12d586f4 Remove unnecessary default argument for TextEx 2024-01-13 22:41:38 +01:00
Robert Müller 5b2ef36fc3 Remove unnecessary temporary variables 2024-01-13 22:41:36 +01:00
Robert Müller 9b24820fd9 Fix potentially incorrect chat background for censored messages
The censored message was not being considered when calculating the size of chat messages.
2024-01-13 22:40:57 +01:00
Robert Müller 3e61d0dadc Extract local variable Line 2024-01-13 22:40:41 +01:00
Learath2 bcf86d81f3 Fix CRegister 2024-01-13 15:28:53 +03:00
Robert Müller 7544f97786 Use star icon for favorite servers, tweak favorite star color
Use yellow-orange star icon to mark favorite servers in the server browser instead of using the heart icon. The heart icon is now only used for servers with friends.

Tweak color of the star icon used for skin favorites so it's slightly more orange instead of pure yellow.
2024-01-13 13:00:31 +01:00