Commit graph

15653 commits

Author SHA1 Message Date
Pioooooo 3f676794f6 Add rcon commands (un)infinite_jump, practice commands /(un)infjump 2024-10-05 21:21:13 +08:00
ChillerDragon 161adf967e Remove null pointer mem copy
Closed https://github.com/ddnet-insta/ddnet-insta/issues/175
2024-10-05 10:32:17 +08:00
Dennis Felsing dd82b1e25d
Merge pull request #9111 from timakro/pr-add-missing-practice-commands
Add practice commands /totele(cp), /(un)livefreeze, /(un)endless
2024-10-04 23:14:02 +00:00
Tim Schumacher 38d297f367 Add practice commands /totele(cp), /(un)livefreeze, /(un)endless 2024-10-05 00:47:53 +02:00
Dennis Felsing fa285811fa
Merge pull request #9110 from Robyt3/Datafile-Reader-Assertions
Add assertions to `CDataFileReader` checking if file open/closed
2024-10-04 22:34:28 +00:00
Dennis Felsing d51a726129
Merge pull request #9047 from timakro/pr-add-invincible-mode
Add invincible mode
2024-10-04 22:05:09 +00:00
Robert Müller e63d7386be Remove unused datafile reader variable in dummy_map tool 2024-10-04 21:12:54 +02:00
Robert Müller a3b2146a16 Add assertions to CDataFileReader checking if file open/closed
When the datafile is closed, only the `CDataFileReader::Open` and `CDataFileReader::Close` functions may be called. All other functions will now assert instead of returning some default-values if no file is open. The `CDataFileReader::Open` function will now assert if the file is already open instead of implicitly closing the previous one.
2024-10-04 21:12:21 +02:00
Tim Schumacher 5457e8fc3b Render sparkling trail for invincible players 2024-10-04 19:41:30 +02:00
Dennis Felsing a56e5324d8
Merge pull request #9106 from ChillerDragon/pr_break_peer
Break early in peer matching
2024-10-04 07:06:39 +00:00
ChillerDragon 11047d1b80 Break early in peer matching 2024-10-04 14:46:33 +08:00
dobrykafe 184f07a912 fix server settings command help text overwriting other tooltips 2024-10-03 21:55:07 +02:00
Dennis Felsing 29523e4972
Merge pull request #9102 from Jupeyy/pr_no_warning_fail
Don't emit a warning if no capable vulkan GPU was found
2024-10-03 11:37:39 +00:00
Jupeyy bbab3478f6
Don't emit a warning to the user if no capable vulkan GPU was found 2024-10-03 11:49:09 +02:00
heinrich5991 154b6d79f7
Merge pull request #9099 from infclass/ddnet-sound-channels
Use CHN_WORLD for MAPSOUNDWORLD and CHN_GLOBAL for MAPSOUNDGLOBAL
2024-10-03 09:22:52 +00:00
Jupeyy 47db90d8e9
Block AMD drivers from after 19.12.1 & before 22.4.1 2024-10-03 10:49:58 +02:00
Alexander Akulich 03a06a144d Use CHN_WORLD for MAPSOUNDWORLD and CHN_GLOBAL for MAPSOUNDGLOBAL
The whole idea behind custom sounds was to use them as replacement for
built-in sounds (depending on the gameplay). We have to use the same channels
instead of the MAP (aka 'ambient') channel to have the same volume for both
sets of messages.
Otherwise we have situation of players reporting 'no sound' because they have
`snd_ambient_volume 0` in the configs.

NETMSGTYPE_SV_MAPSOUNDGLOBAL is NETMSGTYPE_SV_SOUNDGLOBAL which uses map
assets as the sounds container. Use the same CSounds::CHN_GLOBAL to make
the sound messages equivalent.

NETEVENTTYPE_MAPSOUNDWORLD is NETEVENTTYPE_SOUNDWORLD which uses map assets
as the sounds container. Use the same CSounds::CHN_WORLD to make the sound
events equivalent.
2024-10-03 03:51:33 +03:00
Robert Müller f10d476964
Merge pull request #9091 from dobrykafe/pr-editor-ui-debug
Show UI debug info inside editor
2024-10-02 20:30:07 +00:00
dobrykafe 045738daf3 show ui debug info inside editor 2024-10-02 21:25:24 +02:00
KebsCS 21d378e4cb
Fix switch overlay text order 2024-10-02 17:25:14 +02:00
Robert Müller d3d4c187fb
Merge pull request #9059 from dobrykafe/pr-fix-drag-nav
Editor: fix click drag navigation selecting quads/sounds
2024-10-01 17:51:06 +00:00
ChillerDragon 547a9a0285 Explicitly set m_LastSetTeam to zero
It is compared to 0 in gamecontext.cpp but it is never explicitly set to 0.

```C++
if(pPlayer->GetTeam() == pMsg->m_Team || (g_Config.m_SvSpamprotection && pPlayer->m_LastSetTeam && pPlayer->m_LastSetTeam + Server()->TickSpeed() * g_Config.m_SvTeamChangeDelay > Server()->Tick()))
	return;
```
2024-10-01 15:25:17 +08:00
dobrykafe 7564a065c2 fix context menu showing up after canceling quad rotation 2024-09-30 23:56:59 +02:00
dobrykafe 2e77c4bd59 fix click drag navigation selecting quads/sounds 2024-09-30 22:46:56 +02:00
Robert Müller 65f118f840 Fix use of deprecated member variables in video recorder
Use the new `avcodec_get_supported_config` function instead of the deprecated `sample_fmts` and `supported_samplerates` members with libavcodec 61.13.100 and newer.

See 76eb3e5ff3/doc/APIchanges (L53-L56)

Closes #9085.
2024-09-30 21:59:47 +02:00
Robert Müller 7abeaf5600
Merge pull request #9078 from ChillerDragon/pr_browser_arrow_left_right
Arrow left and right in browser (internet/lan/favorites)
2024-09-30 13:23:46 +00:00
ChillerDragon 2b0fb83140 Arrow left and right in browser (internet/lan/favorites)
Closed #9038
2024-09-30 20:45:57 +08:00
ChillerDragon baeab0eaa9 Fix tabs being used in ascii art browser comment
Spaces are more portable if alignment matters
2024-09-30 14:07:17 +08:00
Dennis Felsing 5a893c8e52 Update credits 2024-09-29 13:42:17 +02:00
Dennis Felsing b32e7bea0a Version 18.7 (new scheme: nightly should have higher version than released)
Things that land in main now won't be part of 18.6 anymore
2024-09-29 11:41:55 +02:00
tobi 56f09e9d92 Add actually setting m_LastRescue variable 2024-09-28 23:25:05 +02:00
Robert Müller c573427609
Merge pull request #9054 from KebsCS/pr-rightclick-layer
Add right-click to solo editor layer
2024-09-28 18:04:10 +00:00
KebsCS cc2ce6ea9b
Add right-click to solo editor layer 2024-09-28 19:43:46 +02:00
Dennis Felsing 27e29a1ba7
Merge pull request #9045 from KebsCS/pr-smooth-spectating
Add smooth spectating
2024-09-28 11:55:01 +00:00
KebsCS 486de46f9d
Add custom editor entities 2024-09-27 22:07:57 +02:00
KebsCS e70aaf2fe8
Add smooth spectating 2024-09-27 14:19:52 +02:00
Dennis Felsing 2a64dac091
Merge pull request #9050 from ChillerDragon/pr_sql_convention
Cleanup sql worker request/result naming convention
2024-09-27 11:19:09 +00:00
Dennis Felsing 0628f74e64
Merge pull request #9049 from ChillerDragon/pr_rm_unused_sql_clientid
Remove unused m_ClientId from score worker
2024-09-27 11:11:42 +00:00
Dennis Felsing 205a7084a5
Merge pull request #9048 from KebsCS/pr-fix-spectate-closest
Fix SpectateClosest switching to random player
2024-09-27 11:11:00 +00:00
ChillerDragon 4c57f2d9f8 Fix 0.7 server favorites 2024-09-27 18:53:08 +08:00
ChillerDragon 82af705542 Cleanup sql worker request/result naming convention
There are two interfaces for score worker data:

There is ``ISqlResult`` and every class inheriting from it should have
the suffix ``Result``

Then there is ``ISqlData`` and every class inheriting from it should
have the suffix ``Data`` if it is data that should be written in an
INSERT statement. Or ``Request`` if it is used to perform a read
operation and will be used in a SELECT statament.

The convention was mostly established alreay. In this commit the last
three classes that broke this convention got fixed.
2024-09-27 06:51:35 -04:00
ChillerDragon f2ec87d4e0 Remove unused m_ClientId from score worker 2024-09-27 06:51:15 -04:00
KebsCS 2646de0a7a Fix SpectateClosest switching to random player 2024-09-27 06:50:50 -04:00
Robert Müller 1021fdf7ae Consistently order I/O functions declarations and definitions 2024-09-27 11:17:41 +02:00
Robert Müller b18073a5cd Minor improvement of I/O functions documentation 2024-09-27 11:17:41 +02:00
Tim Schumacher c91be7b19f Add practice command /invincible to toggle invincible mode 2024-09-26 19:18:58 +02:00
Tim Schumacher b564110675 Make invincible players immune to freeze, death and teleport tiles and give them unlimited jumps
Specifically:
* Ignore freeze, deep freeze, deep unfreeze, live freeze, and live unfreeze tiles
* Ignore also the switched variants of those tiles
* Allow movement when deep and live frozen
* Ignore death tiles
* Ignore red tele, blue tele, red checkpoint tele, and blue checkpoint tele tiles
* Unlimited jumps
* Disable /rescue

Switches, doors, draggers, etc. are not disabled for invincible players in this patch
2024-09-26 19:18:52 +02:00
Tim Schumacher f51664e5ce Add rcon command "invincible" which does nothing yet
This commit adds the rcon command "invincible" which toggles the new m_Invincible variable on CCharacterCore. The feature is supposed to be an alterantive to super that is safe for /practice mode. The state of m_Invincible is synchronized to the client via the DDNetCharacter net object. Future commits will change checks for m_Super to check for m_Invincible as well in places where this is safe such as e.g. preventing freezing of the player. The ability to interact with players that are in other teams will remain exclusive to super.
2024-09-26 19:05:03 +02:00
Tim Schumacher a3e19fc39a Make CCharacter::SetSuper() idempotent
Specifically, SetSuper(false) followed by SetSuper(false) should not change teams. The following commit relies on this, but it is generally a good idea to remove this footgun.
2024-09-26 18:57:23 +02:00
Dennis Felsing 89474ae2b0
Merge pull request #9041 from bencie/tee-hover-tooltip
Show skin name as tooltip in friendlist and serverinfo
2024-09-26 01:42:00 +00:00
Dennis Felsing 525803a62b
Merge pull request #9043 from furo321/dont-reset-zoom
Don't reset zoom on team switch
2024-09-26 01:39:14 +00:00
furo 2dcbd5ecbb Don't reset zoom on team switch 2024-09-26 00:09:41 +02:00
bencie 36c3656883 Make cl_show_direction change alpha with cl_show_others_alpha 2024-09-25 18:19:45 +02:00
bencie 7de1d3058f Show skin name as tooltip in friendlist and serverinfo 2024-09-25 16:42:10 +02:00
dobrykafe 9630e1658c fix CFGFLAG_STORE commands not getting stored when executed from reset file 2024-09-25 14:32:55 +02:00
TsFreddie 18ff7f9a5f
Fix Leak IP check 2024-09-25 18:01:24 +08:00
Robert Müller cb4a66aba8
Merge pull request #9031 from ChillerDragon/pr_cfg_layer_selector
Add ``ed_layer_selector`` config to to toggle layer selector feature
2024-09-25 09:02:15 +00:00
ChillerDragon d123aa6741 Add `ed_layer_selector` config to to toggle layer selector feature
Closed #9029
2024-09-25 09:24:52 +08:00
Robert Müller 24ebb54971 Use OpenGL ES graphics backend per default on Android
As Vulkan crashes immediately on launch on a lot of Android devices (for around 15% of users that commented on the Android beta on Discord).

The previous usage of the OpenGL backend in the shortcuts was incorrect, as this backend is not strictly available on Android and the GLES backend should be used instead, as this is also what is displayed in the graphics settings.
2024-09-24 14:26:09 +02:00
Robert Müller 193b33b0d7
Merge pull request #9019 from furo321/center-pivot
Add "center pivot" for quads
2024-09-24 08:50:28 +00:00
Dennis Felsing 09203aee78
Merge pull request #9026 from ChillerDragon/pr_qas_add_layers
Add quick actions for adding sound, switch, front, tune, speedup and tele layers
2024-09-24 02:08:43 +00:00
ChillerDragon 32d247d2c7 Add quick actions for adding sound, switch, front, tune, speedup and tele layers 2024-09-24 09:48:35 +08:00
furo 2e10e2a9aa Add "center pivot" for quads 2024-09-24 03:17:46 +02:00
Robert Müller cc7aa4cb8e Add volume parameter to sound play functions, fix unused volume
The functions of the client component `CSounds` had a volume parameter which was unused. In some cases, the wrong value (`0`, presumably for the flags) was passed as the volume, which is now changed to `1.0f`. The player ground skid sound was previously set to play only at `0.25f` volume though this parameter was unused, which is also changed to `1.0f` to preserve the historic behavior.

A parameter is added to the engine sound play functions to directly set the volume without having to acquire the lock again.

Fix sound position not being respected for hook hit and ground jump sounds as the position parameter was ignored in the `CSounds::PlayAndRecord` function. Add TODOs for issues with this function for demo recording.

Parameters are ordered consistently and default parameter values are removed.

Duplicate code in the `CSounds` play functions is reduced by reusing the `PlaySample`/`PlaySampleAt` functions.
2024-09-23 21:48:23 +02:00
Robert Müller 986916400d Use vec2s for sound positions
Simply usage and readability of sound functions by using `vec2`s instead of two separate `float`s for positions.
2024-09-23 20:10:19 +02:00
Robert Müller e0e1ef8001 Fix incorrect channel panning value after changing volume
Fix incorrect panning value (`1.0f`) being set for GUI and Global sound channels after sound volume is changed, whereas the panning value is initialized to `0.0f`. Now the panning value is set to `0.0f` consistently. This should not have had any effect, as GUI and Global sounds do not have a position which would be affected by the panning value.
2024-09-23 18:10:06 +02:00
Robert Müller 6c6fd86d1d Remove unnecessary initialization of sound listener position
The initial value is already the zero-position and the listener position is always set while online.
2024-09-23 18:09:55 +02:00
ChillerDragon 12113c1c01 Add `dbg_sql` config to hide non error sql logs
The default option is on. So nothing in the logging output changes.
But users now have the option to set ``dbg_sql 0``
which hides all the sql logging unless there is an error.
2024-09-23 12:31:37 +08: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
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
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
Learath db0c83d433 Ban compromised old versions 2024-09-21 16:07:12 +02:00
Robert Müller e1a21f5a08 Fix toggle command always setting value to 1
Regression from #8971.
2024-09-20 14:35:14 +02: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
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
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
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
dobrykafe 9b1a6ac26b better lan page no servers found message 2024-09-18 21:41:54 +02:00
Dennis Felsing 5407db0236
Merge pull request #8987 from Robyt3/Client-Skins-Randomize-Function
Move `CMenus::RandomSkin` function to `CSkins::RandomizeSkin`
2024-09-18 16:28:00 +00:00
Robert Müller 96cc8c5830 Move CMenus::RandomSkin function to CSkins::RandomizeSkin
This function is independent from the menus and this also makes it consistent with the `CSkins7::RandomizeSkin` function.
2024-09-18 17:36:42 +02:00
Robert Müller 45808841ac Localize Hz unit of refresh rate settings 2024-09-18 17:20:31 +02:00
Dennis Felsing 78d702d3b7
Merge pull request #8981 from ChillerDragon/pr_qa_md
Add quick action "Map details"
2024-09-18 13:04:09 +00:00
Dennis Felsing cbc21fab4a
Merge pull request #8984 from ChillerDragon/pr_qa_afl
Add quick action "Add front layer"
2024-09-18 13:03:00 +00:00
ChillerDragon 3781f95190 Add quick action "Add front layer" 2024-09-18 20:07:00 +08:00
ChillerDragon 32e8bb1f05 Add quick action "Map details" 2024-09-18 19:27:39 +08:00
Robert Müller a2e0ab2dbe
Merge pull request #8973 from furo321/improve-annoucements
Various improvements to announcements
2024-09-18 10:34:53 +00:00
Robert Müller 255694c061
Merge pull request #8975 from furo321/android-save-minimized
Save the config file when the app is minimized on Android
2024-09-18 10:29:09 +00:00
furo b475c67039 Various improvements to announcements 2024-09-18 12:16:29 +02:00
furo a266cd2f70 Save the config file when the app is minimized on Android 2024-09-18 12:10:25 +02:00
Robert Müller 2c77e79061
Merge pull request #8980 from ChillerDragon/pr_fix_team_colors_sixup
Fix 0.7 client team colors (Closed #8977)
2024-09-18 09:51:35 +00:00
ChillerDragon 46c5344d71 Fix 0.7 client team colors (Closed #8977) 2024-09-18 16:50:23 +08:00
Dennis Felsing 96ad30eb21
Merge pull request #8978 from ChillerDragon/pr_spamprot
Describe what sv_spamprotection covers
2024-09-18 06:42:21 +00:00
ChillerDragon 7192bbf397 Fix 0.7 client flag sounds being duplicated when dummy is connected
Closed https://github.com/ddnet-insta/ddnet-insta/issues/127
2024-09-18 10:40:36 +08:00
ChillerDragon 984845b2a9 Describe what sv_spamprotection covers 2024-09-18 09:40:09 +08:00
dobrykafe 9d7b476c33 better alignment of upper and lower separators 2024-09-17 23:26:18 +02:00
Robert Müller aa5a24abc4 Improve color config variable handling
- Add separate `CFGFLAG_COLLIGHT7` for 0.7 color config variables, which use `61/255` as darkest lighting value. In comparison, `CFGFLAG_COLLIGHT` uses `0.5` darkest lighting, so the color values being shown for 0.7 color variables were incorrect. Closes #8775.
- Pass darkest lighting as parameter directly instead of using `bool`s to avoid duplicating the logic.
- Add `ColorHSLA::DARKEST_LGT7` constant to replace existing `CTeeInfo::ms_DarkestLGT7` and `CSkins7::DARKEST_COLOR_LGT` constants.
- Round color components before printing them in config variable command handler, as color components are generally also rounded before being packed and before rendering.
- Remove default value of `ColorHSLA::UnclampLighting` function, to avoid incorrect usage.
2024-09-17 12:27:10 +02:00
Dennis Felsing 217103a0ee
Merge pull request #8968 from furo321/command-hint
Add autocompletion hint for chat commands
2024-09-17 07:09:36 +00:00
furo d86b510291 Add autocompletion hint for chat commands 2024-09-17 01:08:49 +02:00
Dennis Felsing 4f352d95d4
Merge pull request #8967 from dobrykafe/pr-fix-add-layers
Fix undo/redo for adding layers
2024-09-16 21:44:04 +00:00
dobrykafe 8f93b63b6a fix undo/redo for adding layers 2024-09-16 21:01:05 +02:00
Robert Müller e69e7d87c2
Merge pull request #8966 from furo321/reload-censorlist
Add `reload_censorlist` to reread `censorlist.txt`
2024-09-16 16:30:04 +00:00
furo e8e52a8b66 Add reload_censorlist to reread censorlist.txt 2024-09-16 18:07:28 +02:00
Robert Müller 3d746099fa Refactor image loading, saving and manipulation
Move `CImageInfo` from `engine/graphics.h` to own file `engine/image.h`. Also add 2-component image format to `CImageInfo::EImageFormat` for completeness, to replace the separate `EImageFormat` in `image_loader.h` with `CImageInfo::EImageFormat`.

Move `SetPixelColor`/`GetPixelColor` functions from editor to `CImageInfo` as member functions.

Replace `IGraphics::CopyTextureBufferSub` and `IGraphics::CopyTextureFromTextureBufferSub` functions with more versatile `CImageInfo::CopyRectFrom` function.

Make `IGraphics::LoadSpriteTexture` function more efficient by avoiding a copy of the image data by using the `LoadTextureRawMove` function. Remove unnecessary delegate function `CGraphics_Threaded::LoadSpriteTextureImpl` and temporary buffer `m_vSpriteHelper`.

Move `CEditorImage::DataEquals` function to `CImageInfo::DataEquals`. Use `mem_comp` to compare image data for more efficiency, instead of comparing each pixel individually.

Add another `IGraphics::LoadPng` function that loads image directly from memory and also handles the pnglite incompatibility warnings. This function will be used for more efficient loading of downloaded skin in the future.

Add convenience functions to load/save PNGs from/to `IOHANDLE` to reduce duplicate code when loading and saving images especially in the tools. These functions explicitly only allow loading images in RGBA and RGB format. Move general purpose image loading and saving functions to class `CImageLoader`.

Add more convenient `CByteBufferReader` and `CByteBufferWriter` classes for reading from and writing to a byte buffer while keeping track of the read/write position to replace existing `SImageByteBuffer`.

Extract `ConvertToGrayscale` utility function to reduce duplicate code when creating grayscale versions of skins, start menu images and community icons.

Move and rename `ConvertToRGBA` static function from graphics to `ConvertToRgba` in `image_manipulation.h/cpp`. Add `ConvertToRgbaAlloc` convenience function which allocates the target buffer. Add ``

Add `DilateImage`, `ResizeImage` and `ConvertToRgba` convenience functions that directly accept a `CImageInfo` argument that will be modified.

Remove unnecessary image size limitation in `map_replace_image` tool, which would only be relevant for 0.7 compatible maps. Adjust the maximum allowed image width/height in `map_convert_07` tool to be consistent with the actual limit that the 0.7 client has when loading images (`1 << 13 == 8192`).

Add doxygen comments for `CImageInfo`.

Pass `CImageInfo` by reference consistently, instead of sometimes passing a pointer.

Cleanup image loading and saving code. Improve error handling.
2024-09-16 17:49:18 +02:00
Robert Müller 5212d1d7ce Rename variables with PNG to Png 2024-09-16 15:45:30 +02:00
Dennis Felsing 67eb609452
Merge pull request #8964 from furo321/fix-dragger-crash
Fix crash while attached to dragger during `hot_reload`
2024-09-16 13:06:01 +00:00
furo ad0fc8898f Fix crash while attached to dragger during hot_reload 2024-09-16 13:52:49 +02:00
Robert Müller 0a3a095479
Merge pull request #8958 from dobrykafe/pr-filter-skin-parts
Make 0.7 skin filter apply to skin parts
2024-09-16 08:45:12 +00:00
ChillerDragon ac0621a062 Fix name in chat not being highlighted (Closed #2190)
The message "xfoo foo" did not highlight for player "foo" now it does.
2024-09-16 12:39:35 +08:00
Dennis Felsing 20cb02048d
Merge pull request #8957 from Robyt3/Client-Binds-Composite-Chat-Console-Menus-Fix
Fix composite binds that open chat, console or menus
2024-09-15 21:43:19 +00:00
Dennis Felsing a5138c078e
Merge pull request #8949 from MilkeeyCat/pr_fix_color_speed_values
Fix colored speed values after connecting to a server
2024-09-15 21:42:02 +00:00
dobrykafe bf442a9f95 make 0.7 skin filter apply to skin parts 2024-09-15 23:11:11 +02:00
Robert Müller 0d93b1add7 Fix composite binds that open chat, console or menus
Events with flag `FLAG_RELEASE` must always be forwarded to all components so keys being released can be handled in all components also after some components have been disabled.

Closes #8901.
2024-09-15 14:54:03 +02:00
KebsCS 3fd0062fb7
Add mouse click functionality in spectator mode 2024-09-15 14:34:00 +02:00
Dennis Felsing 0f12044fcd
Merge pull request #8956 from Robyt3/UI-Scrollbar-Rail-HotItem
Fix scrollbar rail clicking being active while popups open
2024-09-15 10:21:41 +00:00
Robert Müller 8f2c288698 Fix scrollbar rail clicking being active while popups open
Scrollbars are now also set as the hot item when the rail is hovered and the rail clicking function is now only enabled for the scrollbar that is the hot item.

Closes #8954.
2024-09-15 11:45:22 +02:00
MilkeeyCat 9963a3e3db Pass color to RenderMovementInformationTextContainer function 2024-09-15 12:40:17 +03:00
Dennis Felsing 4b6f2e22a8
Merge pull request #8955 from furo321/url-master-parsing
Don't allow URLs without port from the masterserver
2024-09-15 09:28:43 +00:00
furo 7bbd51cf73 Don't allow URLs without port from the masterserver 2024-09-15 11:04:48 +02:00