Commit graph

10395 commits

Author SHA1 Message Date
Vladislav Gerasimov c53e0af6ef
/tpto -> /tp and /teleport 2024-01-16 22:17:59 +03: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
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
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
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
Robert Müller 89802396a7 Use icons for Internet, LAN and Favorites server browser tabs
Free up space for up to three more server browser tabs of the same size (on 5:4 resolutions), i.e. tabs for configurable communities.

Remove the additional server browser icon tab on the right side. Remove the purely visual Demo and News tabs which were only shown when the respective page is already active. Instead, always show all server browser tabs when offline.
2024-01-13 12:47:11 +01:00
ChillerDragon 78bc1f02f0 Report team changes to master when teams are on
https://github.com/ZillyInsta/ddnet-insta/issues/85
2024-01-13 18:33:30 +08:00
swarfeya 79bc3b2d3d use SetInitialAfk instead of SetAfk 2024-01-12 22:44:33 +01:00
swarfeya 495290e0b2 fix style 2024-01-12 22:04:08 +01:00
swarfeya 64a70ac7a7 Fix AFK being shown only for a split second when timing out 2024-01-12 22:01:25 +01:00
Learath2 6eb51239c9 Fix some clang-tidy issues and UB 2024-01-12 23:27:49 +03:00
Robert Müller 5e510cdbf4 Include limits instead of climits
Consistently use `std::numeric_limits` instead of `INT_MIN` and `INT_MAX`.
2024-01-11 22:24:37 +01:00
Robert Müller 80a52cae95 Avoid including zlib.h in header file
By adding `CDataFileWriter::ECompressionLevel` to replace usage of zlib internal compression levels in the `CDataFileWriter` API.

Use `std::numeric_limits<int>::max()` instead of `INT_MAX` in one case where the latter was only declared by the transitive zlib include. The `limits` header is already included and its use is more fitting for C++ code.
2024-01-09 19:36:41 +01:00
Chiller Dragon e36f2bf7bc
Fix comment grammar
Co-authored-by: Dennis Felsing <dennis@felsing.org>
2024-01-07 18:05:12 +01:00
ChillerDragon b10030391d Typo routine 2024-01-07 12:19:58 +01:00
Dennis Felsing fda996014b
Merge pull request #7767 from furo321/fix-hookcoll-spec
Fix hook collision line being incorrect while paused.
2024-01-07 00:15:23 +00:00
Robert Müller ce47d01998
Merge pull request #7761 from swarfeya/master
fix happy ddnet birthday broadcast (#7758)
2024-01-06 20:45:52 +00:00
furo e025c184af Fix hook collision line being incorrect while paused. 2024-01-06 20:45:14 +01:00
swarfeya a9b19ff2a7 Increment m_SentSnaps inside of FakeSnap() 2024-01-06 16:02:43 +01:00
Dennis Felsing c5d6389132
Merge pull request #7764 from heinrich5991/pr_ddnet_msg_groups
Group a couple of "list" messages
2024-01-05 18:34:39 +00:00
heinrich5991 ac041d7f34 Group CNetMsg_Sv_CommandInfo 2024-01-05 18:10:57 +01:00
heinrich5991 f81828e78e Group CNetMsg_Sv_VoteOptionListAdd 2024-01-05 18:10:57 +01:00
Robert Müller a55d49833e Use IStorage::FormatTmpPath function for editor map names 2024-01-05 17:46:26 +01:00
swarfeya d04cb7a36a actually fix happy ddnet message 2024-01-04 18:36:32 +01:00
Robert Müller 84f3bb5a4d Fix missing editor explanation for kill tile in front layer
The kill tile can also be used in the front layer and works as expected.
2024-01-04 17:42:53 +01:00
Robert Müller abc7b602b2 Avoid copying texture memory when possible
Add separate `IGraphics::LoadTextureRawMove` function with non-`const` `void *pData` argument in addition to existing `LoadTextureRaw` function with `const void *pData` argument. The former function takes ownership of the data and avoids copying the texture data into an additional buffer, if the texture data is already in RGBA format. Non-RGBA texture data always needs to be converted and therefore also copied.

The `LoadTextureRaw` function is split into smaller functions to share common code with the `LoadTextureRawMove` function. Alternatively to this, a flag `TEXLOAD_MOVE_DATA` could have been added to the existing `LoadTextureRaw` function, which would have required the use of `const_cast` to free the texture data.
2024-01-03 23:03:04 +01:00
Robert Müller c99d77ab84 Fix wrong selection in vote menu when selected player leaves
The selection in the kickvote/specvote menu was reset to the first player when the previously selected player leaves or if the filter string does not match it. Now the selection is cleared in these cases, to prevent players from accidentally starting kickvotes/specvotes on the wrong player.

Remove unnecessary `static` variable. Improve readability by not nesting post-increment in another statement.
2024-01-02 18:10:48 +01:00
ChillerDragon 81c43ded42 Explicitly set all 0.7 dmg event fields 2024-01-02 13:40:13 +01:00
Corantin H 454b4e4a1e Respect corners when doing edit box when rendering value selector 2023-12-31 12:07:21 +01:00
heinrich5991 04553d6798
Merge pull request #7706 from Robyt3/Menus-Player-Tee-Settings-Improvement
Improve player and tee settings menus
2023-12-30 22:51:44 +00:00
heinrich5991 fc825fb091
Merge pull request #7696 from ewancg/tp-coords
add x and y coords to /tp
2023-12-30 22:50:06 +00:00
Ewan Green 124bbc429a add x and y coords to /tp 2023-12-30 14:50:48 -07:00
Robert Müller f5e7fa24d6 Add color palette and pipette to editor
Add color palette with up to 8 colors to editor toolbar. The palette colors work like regular color picker buttons, so they open a color picker popup on click and the value can be copied and pasted with Ctrl+Right click and Ctrl+Left click respectively. Less palette colors are shown when not enough space is available (with 5:4 resolutions).

Add color pipette which allows selecting any color displayed on the screen. Selecting a color with the pipette adds the new color to the palette and shifts the other colors to the right. The selected color is also copied to the clipboard immediately. The hotkey Ctrl+Shift+C is added to toggle the color pipette, which allows using the color pipette in popups and dialogs.

The implement this, the function `IGraphics::ReadPixel` and the command `SCommand_TrySwapAndReadPixel` are added to read a specified pixel's color from the backbuffer. Like the screenshot command, this command also requires a swap operation to be performed before the correct pixel color can be read with the Vulkan backend. The `ReadPixel` function therefore accepts a pointer to a `ColorRGBA` that will be filled after the next swap operation.

Closes #7430.
2023-12-30 13:17:30 +01:00
Dennis Felsing 9c8a081692
Merge pull request #7743 from furo321/hookduration-07
Fix players on 0.7 becoming invisible when `m_HookTick` is negative.
2023-12-29 22:58:38 +00:00
furo a918c61de8 Fix players on 0.7 becoming invisible when m_HookTick is negative. 2023-12-29 22:39:42 +01:00
Dennis Felsing 0f1171a501
Merge pull request #7741 from furo321/translate-racefinish
Use 0.7 translation layer for `Sv_RaceFinish` netmessage.
2023-12-29 08:00:19 +00:00
furo 1a94aa6d8a Use 0.7 translation layer for Sv_RaceFinish netmessage. 2023-12-29 08:33:36 +01:00
Dennis Felsing ee2dd0ac1c
Merge pull request #7740 from Robyt3/UI-Mouse-Clamp
Fix mouse being outside of UI screen on right and bottom edges
2023-12-28 22:33:27 +00:00
dobrykafe 429b0c6fdb add restart button for restart warning label 2023-12-28 22:39:36 +01:00
Robert Müller 018529c683 Fix mouse being outside of UI screen on right and bottom edges
Ensure that the UI mouse position stays inside the UI screen rect. Previously, the mouse was not considered to be inside the UI screen when all the way at the right or bottom edge. This caused the map editor tooltip to not be shown when the mouse is all the way at the right side of the map editor view. This is a cleaner fix for #4553 which reverts the previous workaround from #6423.
2023-12-28 21:23:16 +01:00
Dennis Felsing 3820abaefb
Merge pull request #7739 from Robyt3/Editor-Toolbar-Anim-Grid-Icons
Improve editor toolbar anim and grid buttons, add dropdowns
2023-12-28 18:04:51 +00:00
Corantin H ffd7776147 Add cursor types and use resize cursor for dragbars 2023-12-28 18:35:23 +01:00
Corantin H c2ce2c9d1a Refactor editor dragbar, allow resize of layers panel 2023-12-28 18:35:22 +01:00
Robert Müller c9640459e4 Improve editor toolbar anim and grid buttons, add dropdowns
Add dropdown menus for changing animation and grid settings (i.e. animation speed and grid size) instead of conditionally showing more buttons for this directly in the menu bar. This frees up space in the menu bar, which is currently full on 5:4 resolutions.

The icons previously used for the default animation/grid buttons are now used for the main buttons that toggle animation/grid instead of using text.

Support setting lower animation speeds with the plus and minus buttons by adjusting the step size when the animation speed is low.

Support setting arbitrary animation speed by text input.
2023-12-28 17:43:09 +01:00
Dennis Felsing fedad1de6c
Merge pull request #7736 from archimede67/editor-fix-group-pos-props
Editor: fix group position properties not working correctly
2023-12-27 23:23:53 +00:00
Corantin H 3d606847fd Fix group position properties not working correctly 2023-12-28 00:03:28 +01:00
Corantin H 83540ade5c Fix duplicate layers in popup layer context
Clear layers from context before adding any layer, preventing layers from being kept in the vector until only a single layer is selected. Fixes #4978.
2023-12-27 23:11:52 +01:00
Dennis Felsing 15e6e5eeab
Merge pull request #7730 from archimede67/editor-fix-picker
Fix broken selection in editor
2023-12-27 17:38:57 +00:00
Dennis Felsing f93573c55a
Merge pull request #7732 from archimede67/editor-fix-append
Editor: improve append (fixes #7625)
2023-12-27 17:38:40 +00:00
Corantin H f3fc85cfbb Improve editor append (fixes #7625)
Fix broken editor append.
Check for image data when image names are identical. In such case, appended image is renamed until its name is unique.
2023-12-27 18:09:39 +01:00
Corantin H b949a7de21 Fix broken selection in editor 2023-12-27 17:41:19 +01:00
Dennis Felsing dfb6967a47
Merge pull request #7722 from archimede67/autocomplete-console-refactor
Refactor argument autocompletion in console
2023-12-27 15:01:06 +00:00
Dennis Felsing a149d28649
Merge pull request #7728 from archimede67/editor-differentiate-cp-tele
Editor: differentiate between normal and checkpoint teles
2023-12-27 14:45:37 +00:00
Corantin H 42771ac42f Refactor argument autocompletion in console
Allows autocompletion of specific argument instead of the first argument only
2023-12-27 15:43:56 +01:00
Corantin H 84c2168650 Differentiate between normal and checkpoint teles 2023-12-27 15:23:57 +01:00
Robert Müller 6cc42aa58c Fix slightly incorrect color components shown in color pickers
The individual color components were rounded down when being displayed on their own in color pickers, whereas the components are rounded to the nearest integer when packing the colors into the hex string. This was causing minor discrepancies between the color being displayed/saved as hex and the individual components. Rounding the components when packing is necessary to reduce the error when converting between color spaces.
2023-12-27 13:47:03 +01:00
Dennis Felsing 269f276fee
Merge pull request #7726 from archimede67/allow-panning-outside-container
Editor: allow panning outside initial container
2023-12-27 12:20:34 +00:00
Dennis Felsing e549e67c95
Merge pull request #7725 from archimede67/editor-automap-include-fix
Only include `layer_tiles.h` in `auto_map.cpp`
2023-12-27 12:05:32 +00:00
Corantin H 4e10d55b36 Allow panning outside initial container 2023-12-27 12:57:36 +01:00
Corantin H d3ff602f62 Only include layer_tiles.h in auto_map.cpp 2023-12-27 12:29:25 +01:00
Robert Müller 04f4305165 Improve player and tee settings menus
Add tabs to player and tee settings pages to switch between player (main) and dummy settings instead of using a checkbox for this, to improve the usability.

Improve layout of tee settings page, especially with 5:4 resolutions, where the eye selector previously overlapped with other UI elements. Decrease size of eye selector and make better use of empty space overall. Use more space for skin selector instead of showing empty space when "Use custom colors" is disabled.

Show favorite skin buttons also when hovering list items to make it easier to discover the feature. Add small highlight color to favorite skin buttons when hovering them.
2023-12-27 11:56:35 +01:00
Robert Müller 4c2dfa24db Improve performance when rendering map overlay texts
The text color was previously set and reset for every individual number being rendered for non-empty tele, speedup, switch and tune tiles. The color is the same for all tiles from each entities layer, so most of these `TextColor` calls are unnecessary. Now the text color is only set and reset once when rendering each entities layer.
2023-12-27 11:51:18 +01:00
Dennis Felsing 453bc0f66a
Merge pull request #7720 from MrBlubberBut/patch-2
Fix automatic hammer on release when cl_dummy_control is set to 1
2023-12-27 09:01:45 +00:00
Dennis Felsing 9828da6f3e Fix formatting 2023-12-27 09:45:10 +01:00
Dennis Felsing 751b2a4a93
Merge pull request #7721 from archimede67/editor-better-tele-text
Editor: improve text rendering inside tele tiles
2023-12-27 08:44:04 +00:00
Corantin H fcc095b675 Improve text rendering inside tele tiles in editor 2023-12-27 00:16:44 +01:00
Dennis Felsing 90596e51ee
Merge pull request #7719 from archimede67/editor-adjust-special-tiles-shortcut
Editor: add shortcut to adjust special tiles numbers
2023-12-26 22:13:02 +00:00
Corantin H 166b27fc27 Use ctrl+f when brush is not empty to replace tile numbers with next free 2023-12-26 20:42:42 +01:00
Corantin H 643cdf8717 Add shortcut to change tele, switch and tune number of current brush (#5400) 2023-12-26 20:17:36 +01:00
MrBlubberBut 32e187f18e
Fix automatic hammer on release when cl_dummy_control is set to 1
Let's say you have this bind:

```bind x +toggle cl_dummy_hammer 1 0```

and you set cl_dummy_control to 1.

When you press the bind i mentioned above, and then release, the dummy will hammer where he is looking (not at you). So, in total, there will be two hammers. One hammer when you press down the button and the dummy hammers towards you, and then another hammer when you release the button and the dummy hammers where he is looking.

This fixes it, and also makes sure it does not conflict with cl_dummy_copy_moves (as if it is enabled and cl_dummy_control is enabled, the dummy will not copy fire, hook, or jump) so I made sure it keeps this functionality as it's pretty cool.

This does not fix any other bugs yet, maybe I will fix those in the future but we'll see. Any bug you may encounter with this change is also probably present in the main branch, such as resetonswitch not working perfectly with dummy_control, but if you do find something different then let me know.
2023-12-26 13:59:06 -05:00
Dennis Felsing 8ce103f04f
Merge pull request #7717 from archimede67/editor-unused-tiles-popup
Show unused tiles warning popup for all entities layer
2023-12-26 18:29:35 +00:00
Dennis Felsing 53dba33c21
Merge pull request #7715 from infclass/kaffeine/pr
RenderTools: Add const/static method qualifiers
2023-12-26 18:24:25 +00:00
Corantin H e9958aca19 Show unused tiles warning popup for all entities layer 2023-12-26 19:11:36 +01:00
Alexander Akulich 43710fe541 Use CRenderTools::GetRenderTeeOffsetToRenderedTee via class name instead of instance
Fixes clang-tidy warning.
2023-12-26 21:08:50 +03:00
Corantin H 70d263a7d5 Remove ifs when drawing quads QoL buttons 2023-12-26 18:49:45 +01:00
Alexander Akulich 7e95d4be22 CGameClient::CClientData::Reset: Reset skin info 2023-12-26 19:37:21 +03:00
Alexander Akulich f396056425 CRenderTools: Mark some methods static and (some) const 2023-12-26 19:37:21 +03:00
Dennis Felsing f12f789c3a
Merge pull request #7709 from furo321/server-demos-fixes
A few fixes and improvements to server-side auto demos.
2023-12-26 07:58:30 +00:00
Dennis Felsing 03ce78f781
Merge pull request #7711 from Robyt3/Textrender-Selection-Fix
Improve text line spacing and console text selection
2023-12-26 07:58:14 +00:00
Dennis Felsing 0376f1cd2b
Merge pull request #7708 from furo321/ctrl-shift-z
Support `Ctrl + Shift + Z` as editor redo hotkey.
2023-12-26 07:55:15 +00:00
Robert Müller 4c223a0002 Improve text line spacing and console text selection
Consider line spacing to belong to the previous line when calculating and rendering text selection. Instead of handling spacing between entries separately in the console, also include line spacing for the last line in the height calculation. Pixel align the line spacing in addition to the font size, as previously some gaps between the entries were larger than others due to missing pixel alignment. This allows rendering the text selection in the console smoothly without any gaps between the console entries/lines.

Closes #7617.
2023-12-25 19:11:42 +01:00
Corantin H 5f6cec20c6 Fix infinite console scroll 2023-12-25 19:00:38 +01:00
furo f7c618d8b1 Start recording of server auto demo on init. 2023-12-25 14:58:18 +01:00
furo 1eada0a8ba Support Ctrl + Shift + Z as editor redo hotkey. 2023-12-25 12:02:18 +01:00
Robert Müller c9b2872459
Merge pull request #7707 from furo321/revert-highdetail
Revert removal of "Detail" from sound layers.
2023-12-25 09:51:51 +00:00
furo 76fa62d8fb Revert removal of "Detail" from sound layers. 2023-12-25 01:17:36 +01:00
Corantin H 5599de3153 Use CEditorComponent methods instead of only CMapView
Small changes to `CEditorObject`
2023-12-23 14:45:36 +01:00
Robert Müller fa0b218eed Use str_copy instead of mem_copy for skin names
The `mem_copy` function does not respect zero termination so it reads beyond the size of the source buffer, if it's smaller than the destination buffer.
2023-12-22 22:14:15 +01:00
Robert Müller 32b32d7052 Remove unnecessary checks for number of command arguments
The argument of `add_favorite_skin` and `remove_favorite_skin` is mandatory, so the callback will never be called without it.
2023-12-22 22:13:58 +01:00
Robert Müller 6fc3470a8d Check for valid favorite skin name, add CSkin::IsValidName
Favorite skin names were previously not escaped as intended when saving, as the variable `aNameEscaped` was unused so the original skin name was saved instead of the escaped one. Escaping is not really necessary, as skins should not contain `\` and `"` anyway and it was only possible to add such favorites through the console or config files. Instead of escaping the favorite skin names when saving, now favorite skin names are validated when they are added so no escaping is necessary. Skins names are considered valid when they have a length of 1-23 bytes and don't contain the characters `/`, `\` and `"`.
2023-12-22 22:13:33 +01:00
Corantin H 34a26daeba Fix wrong value type for some map settings in gamecontext.cpp
Fix some help texts starting with a lowercase character
2023-12-22 18:15:37 +01:00
Corantin H 949eea08df Do not adjust console selection when keeping scroll offset
Also decrease `m_NewLineCounter` by the entry line count.
2023-12-21 00:22:12 +01:00
Robert Müller d228064361 Fix console selection not adjusted anymore when entries added
The current mouse-based console selection was not being adjusted anymore when new lines are added to the console, as the `m_NewLineCounter` variable was decremented to `0` before the relevant check for `m_NewLineCounter > 0`.
2023-12-20 17:55:10 +01:00
heinrich5991 ddd10f2308
Merge pull request #7648 from dobrykafe/pr-master-info
report the ddrace team to master instead of the normal team
2023-12-20 15:27:32 +00:00
dobrykafe 40d56611ba report ddrace team to master 2023-12-20 16:09:10 +01:00
Edgar 95cd183e1e
Merge pull request #7681 from Robyt3/Mapitems-Sound-DataSize-Check
Use `GetDataSize` instead of `CMapItemSound::m_SoundDataSize`
2023-12-20 10:37:54 +00:00
furo 1c6e629a9b Add missing return statements to AttemptJoinTeam 2023-12-20 04:10:51 +01:00
Robert Müller 3e89bbb15e Clear console selection only when scroll position is changed
The selection is only cleared because it would be incorrect after scrolling, but it doesn't need to be cleared if the scroll position does not change, e.g. when pressing Home while already at the top of the backlog.
2023-12-19 20:31:22 +01:00
Learath 1f224344ec Format and bump fake curl 2023-12-18 23:02:00 +01:00
Learath 1dc8496470 Use curl-multi 2023-12-18 20:06:43 +01:00
Robert Müller a1b603a424
Merge pull request #7682 from furo321/clamp-volume-env
Clamp volume envelopes between 0.0f and 1.0f
2023-12-18 18:47:57 +00:00
furo fd2582c267 Clamp volume envelopes between 0.0f and 1.0f 2023-12-18 18:35:13 +01:00
Robert Müller aa15d9b19b Use GetDataSize instead of CMapItemSound::m_SoundDataSize
Do not use the `CMapItemSound::m_SoundDataSize` value as it is redundant. This value could also be incorrect because it can be freely set by the map creator (tool).

Instead, use the map/datafile function `GetDataSize` to get the true size of the sound data in the file.

The `m_SoundDataSize` value is still written to map files for compatibility with old versions.
2023-12-18 17:58:42 +01:00
Dennis Felsing f298b28026
Merge pull request #7678 from eghwand/pr_showlocaltimealways_setting
add ui setting for cl_show_local_time_always
2023-12-18 07:56:01 +00:00
Dennis Felsing c0ed140a31 Version 17.4.2 2023-12-18 08:58:10 +01:00
Egehan 87063d048c
add ui setting for cl_show_local_time_always 2023-12-17 19:28:35 +03:00
Robert Müller 4ddf1dfdd5
Merge pull request #7674 from furo321/history-login-prompt
Disable cycling through command history when logging in to rcon.
2023-12-17 15:55:04 +00:00
furo 2f89297395 Disable cycling through command history when logging in to rcon. 2023-12-17 15:32:18 +01:00
heinrich5991 4af28fd2d8
Merge pull request #7672 from furo321/bitwise-instead-of-logical
Fix clang warning `-Wbitwise-instead-of-logical`
2023-12-17 00:11:06 +00:00
furo c984c6895a Fix clang warning -Wbitwise-instead-of-logical 2023-12-17 00:54:23 +01:00
Dennis Felsing 4429347f83
Merge pull request #7662 from furo321/more-team-commands
Add `/join [player]`
2023-12-16 23:45:16 +00:00
furo 67c101b43d Add /join [player]. 2023-12-16 17:33:10 +01:00
Dennis Felsing 5aa4b58d4e
Merge pull request #7661 from archimede67/editor-qol-quads
Editor: Add QoL features for quads
2023-12-16 11:09:16 +00:00
Dennis Felsing 2993d3ad11 Fix style 2023-12-16 11:10:02 +01:00
Egehan 5da5eb79bb
Add ui setting cl_same_clan_color 2023-12-16 11:06:29 +03:00
archimede67 5dbd5a1f49 Added quad alignment/snapping to other quads/points 2023-12-16 01:29:09 +01:00
archimede67 a41da8182b Preserve and show axis when dragging quad points while holding Shift 2023-12-16 00:29:10 +01:00
Dennis Felsing 5b5253c4ec
Merge pull request #7659 from furo321/render-spectated-last
Render the tee being spectated after everyone else.
2023-12-15 22:09:49 +00:00
furo 25ffc421cc Render the tee being spectated after everyone else. 2023-12-15 21:34:33 +01:00
Robert Müller 184ada3c95 Fix various lineinput issues/regressions
Fix Ctrl+C not working to copy text in console when the command input already contains text, as the changed flag was never reset properly.

Fix scroll position of UI editboxes not being updated when moving cursor without changing text.

Fix lineinput selection change being detected as content change, causing the editor modified state to be set incorrectly.

Fix cursor blinking not being disabled correctly after changing text without changing cursor position.
2023-12-15 17:49:06 +01:00
heinrich5991 1feee077ca Returning false commits you to setting a message 2023-12-15 13:00:43 +01:00
Dennis Felsing 12ed9f8d6b
Merge pull request #7651 from furo321/fix-teamjoin-error
Don't broadcast error if `CanJoinTeam` returned true
2023-12-14 23:48:20 +00:00
Dennis Felsing 514e528be7
Merge pull request #7649 from furo321/chat-command-netmsg
Add `Sv_CommandInfo` netmsg for autocompletion of chat commands.
2023-12-14 23:46:52 +00:00
Dennis Felsing a333d723e5
Merge pull request #7653 from Robyt3/Clang-Tidy-Cleanup
Fix more clang-tidy errors: mark functions as `const` when possible
2023-12-14 23:46:19 +00:00
Dennis Felsing 7d37db6d6e Version 17.4.1 2023-12-15 00:58:09 +01:00
Robert Müller f50eeab690 Fix performance-inefficient-vector-operation 2023-12-14 23:38:05 +01:00
Robert Müller bab382f4cc Fix modernize-use-emplace 2023-12-14 23:38:05 +01:00
Robert Müller aacd37b412 Fix readability-static-accessed-through-instance 2023-12-14 23:38:05 +01:00
Robert Müller 6a12e209b6 Fix readability-make-member-function-const 2023-12-14 23:38:03 +01:00
Corantin H af77ebac54 Added console search function 2023-12-14 21:58:27 +01:00
furo 035e7a1068 Add Sv_CommandInfo netmsg for autocompletion of chat commands. 2023-12-14 19:01:35 +01:00
furo a440e0e917 Don't broadcast error if CanJoinTeam returned true 2023-12-14 16:19:31 +01:00
heinrich5991 efe593c7b0
Merge pull request #7602 from ChillerDragon/pr_create_switcherscontroller
Move switcher snapping code to own method
2023-12-13 22:10:49 +00:00
Robert Müller 68508e1b81 Add small margin to callvote label 2023-12-13 17:47:10 +01:00
ChillerDragon 1723554288 Move switcher snapping code to own method 2023-12-13 17:29:02 +01:00
heinrich5991 b458890f08
Merge pull request #7639 from ChillerDragon/pr_canjoinmsg
Move chat message into CanJoinTeam()
2023-12-13 15:27:25 +00:00
ChillerDragon 157e8b7302 Pass error message as buffer to CanJoinTeam()
Now `CGameContext` no longer assumes the `IGameController`
declined the team join due to slots.

This enables custom gametypes to disallow joining the game if the player
died, an active tournament is running or the player is not logged in
yet. And then the controller can print the correct error message
accordingly.
2023-12-13 14:46:37 +01:00
furo 09e222c39f Set correct colour for authed colour reset button 2023-12-13 13:23:33 +01:00
Edgar 082c44889a
Merge pull request #7635 from archimede67/fix-escape-key-lineinput
Fix escape key not working when lineinput is focused
2023-12-12 08:14:51 +00:00
Edgar 3cb510a2e6
Merge pull request #7637 from heinrich5991/pr_ddnet_even_less_system_h
Remove `#include <system.h>` from one more header
2023-12-12 08:14:32 +00:00
heinrich5991 e4c97e5583
Merge pull request #7574 from furo321/remove-telecursor
Don't scale TargetXY by zoom when in spectator.
2023-12-11 23:50:21 +00:00
heinrich5991 be53d83019 Remove #include <system.h> from one more header 2023-12-12 00:44:46 +01:00
Dennis Felsing 7813cfed6c
Merge pull request #7618 from heinrich5991/pr_ddnet_less_system_h
Make less headers depend on `<base/system.h>`
2023-12-11 23:08:59 +00:00
heinrich5991 05af24a052 Make less headers depend on <base/system.h>
Move a couple of trivial type definitions to `<base/types.h>` instead.
2023-12-11 23:52:23 +01:00
archimede67 0aca09093f Use WasCursorChanged() when rendering lineinput in CUI::DoEditBox 2023-12-11 22:26:19 +01:00
Robert Müller 990bb8bb5d
Merge pull request #7632 from furo321/input-envelope-scaling
Fix envelope scaling being triggered in name input.
2023-12-11 20:36:03 +00:00
furo b42f43ce99 Fix envelope scaling being triggered in name input. 2023-12-11 21:17:24 +01:00
ChillerDragon ab5a7b88bd Add ui setting for cl_authed_player_color 2023-12-11 20:21:01 +01:00
furo 466dca87a6 Support F5 and Modifer + R for refresh where possible. 2023-12-11 16:52:21 +01:00
Corantin H 8c5b8a88c8 Ensure white color for entities layers when loading map layers 2023-12-11 13:37:23 +01:00
Corantin H 0c69378fcd Prevent editing the color of entities layers 2023-12-11 13:36:42 +01:00
Corantin H 7b20bf71e6 Fix modified state being set when lineinput is selected.
Differentiate between text and cursor changes by adding an additional `m_WasCursorChanged`.
2023-12-11 00:05:13 +01:00
Corantin H 51220b1dfc Fix editor modified state not being updated properly 2023-12-11 00:03:46 +01:00
Robert Müller 733b46da87
Merge pull request #7613 from archimede67/fix-chat-input-history
Reset history entry along with chat input when using Escape
2023-12-10 18:34:28 +00:00
Corantin H 5b7c064ea2 Reset history entry along with chat input when using Escape 2023-12-10 17:39:41 +01:00
Robert Müller 83af5e47f3 Improve key reader button
Show localized text "Press a key…" instead of "???" while waiting for a key to be pressed.

Render button with green background while waiting for a key to be pressed.

Inline unnecessary `DoButton_KeySelect` function.

Fix names of static variables.
2023-12-10 16:07:27 +01:00
Robert Müller 1b03637436 Remove unused color argument, use ColorRGBA instead of vec4 2023-12-10 16:05:59 +01:00
Robert Müller 20d9920d00 Consistent rounding of editor value/color picker buttons
Fix too large rounding for some editor color picker buttons.
2023-12-10 11:41:18 +01:00
Robert Müller 7ae7877248
Merge pull request #7593 from archimede67/console-scrolling
Add ability to scroll in console. Remove pages.
2023-12-09 18:26:32 +00:00
Robert Müller d3cc932a9b
Merge pull request #7393 from archimede67/editor-undo-redo-v2
Editor undo/redo v2
2023-12-09 18:17:38 +00:00
Dennis Felsing 63710e91e8
Merge pull request #7601 from ChillerDragon/pr_fix_authstate_id
Use real ClientID to lookup authed state
2023-12-09 17:26:48 +00:00
furo e0b51c2aec Add ability to scroll in console. Remove pages. 2023-12-09 12:20:43 +01:00
furo bac3670296 Don't scale TargetXY when in spectator 2023-12-09 01:44:00 +01:00
Robert Müller 48805a6db4
Merge pull request #7596 from archimede67/fix-chat-preview-update
Fix chat preview update
2023-12-07 19:44:46 +00:00
Corantin H 2dd917f4c0 Update preview lines instead of initializing them only once 2023-12-07 19:20:24 +01:00
ChillerDragon f8ca16c50e Use real ClientID to lookup authed state and score
The variable `Id` is translated for old clients and is not guranteed to
be the real id. While `m_ClientID` is the real ID. That can also be used
to index the CServer::m_aClients[] array to get the authed state.

closed #7599

Fixes

```
valgrind ./DDNet-Server "dbg_dummies 1"
[..]
2023-12-07 18:01:33 I chat: *** 'Debug dummy 1' entered and joined the
game
==75634== Conditional jump or move depends on uninitialised value(s)
==75634==    at 0x2DAA83: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:17)
==75634==    by 0x2DAD79: CVariableInt::Compress(void const*, int,
void*, int) (compression.cpp:98)
==75634==    by 0x23EC50: CServer::DoSnapshot() (server.cpp:1046)
==75634==    by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634==    by 0x230173: main (main.cpp:193)
==75634==
==75634== Conditional jump or move depends on uninitialised value(s)
==75634==    at 0x2DAAF7: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:25)
==75634==    by 0x2DAD79: CVariableInt::Compress(void const*, int,
void*, int) (compression.cpp:98)
==75634==    by 0x23EC50: CServer::DoSnapshot() (server.cpp:1046)
==75634==    by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634==    by 0x230173: main (main.cpp:193)
==75634==
==75634== Conditional jump or move depends on uninitialised value(s)
==75634==    at 0x2DAA83: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:17)
==75634==    by 0x32E812: CPacker::AddInt(int) (packer.cpp:20)
==75634==    by 0x23ED51: CServer::DoSnapshot() (server.cpp:1059)
==75634==    by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634==    by 0x230173: main (main.cpp:193)
==75634==
==75634== Conditional jump or move depends on uninitialised value(s)
==75634==    at 0x2DAAF7: CVariableInt::Pack(unsigned char*, int, int)
(compression.cpp:25)
==75634==    by 0x32E812: CPacker::AddInt(int) (packer.cpp:20)
==75634==    by 0x23ED51: CServer::DoSnapshot() (server.cpp:1059)
==75634==    by 0x247D2D: CServer::Run() (server.cpp:2994)
==75634==    by 0x230173: main (main.cpp:193)
==75634==
```

Which is using ID 0 as index in the m_aClients array but only ID 63 was
ever initialized.
2023-12-07 18:40:16 +01:00
heinrich5991 65641763c1
Merge pull request #7591 from Robyt3/Editor-Sound-Invalid-Index
Fix incorrect sound index usage for editor sound preview
2023-12-06 11:22:00 +00:00
heinrich5991 20a636d0d4
Merge pull request #7590 from Robyt3/UI-Popup-Open-Close-Fix
Fix heap-use-after-free when popup opens another popup
2023-12-06 11:18:38 +00:00
Corantin H 96e4c5f7cd Add editor undo/redo feature 2023-12-04 22:44:20 +01:00
Robert Müller 7e8c2aa4be Fix incorrect sound index usage for editor sound preview
The invalid sound index is `-1` but the check in the editor for the sound preview assumed it was `0`. We should use a type-safe wrapper to avoid this in the future, like for texture handles.
2023-12-04 22:21:53 +01:00
Robert Müller d8ec6a0a35 Fix heap-use-after-free when popup opens another popup
The popup menu render function can open/close other popups, which may resize the vector of popup menus and thus invalidate the current popup menu variable before the popup is closed. We therefore store the popup UI element ID in a separate variable to avoid the access to the potentially invalidated popup menu variable after the popup menu is rendered.

Also prevent invalidated popup menu from being rendered for one frame after it is closed by clicking outside.

Closes #7565.
2023-12-04 22:12:20 +01:00
ChillerDragon a0736e4f24 Make intersect TeleNr arg optional
gets rid of the need to define a unused variable
2023-12-03 21:36:45 +01:00
Dennis Felsing 07fd8c1a48
Merge pull request #7576 from furo321/favourite-with-prefix
Fix bug when using favourites in combination with prefixes.
2023-12-02 22:35:30 +00:00
furo 732b213c09 Fix bug when using favourites in combination with prefixes. 2023-12-02 18:49:15 +01:00
furo d9a726eb48 Stop all recording of server demos on shutdown. 2023-12-02 11:10:20 +01:00
ChillerDragon cd9fc2964d Use SetEmote() 2023-12-01 22:50:00 +01:00
Emir Marincic eba86204db
Merge pull request #7552 from Robyt3/Config-Refactoring
Refactor config manager, move config variable handling
2023-12-01 19:34:44 +00:00
Robert Müller 44aac623fa
Merge pull request #7512 from furo321/telecursor-fixes2
Scale `TargetX` and `TargetY` by zoom level.
2023-12-01 16:36:30 +00:00
heinrich5991 21cfb01ec3
Merge pull request #7515 from furo321/racefinish-message
Add finish info messages from 0.7
2023-12-01 16:13:06 +00:00
furo a87db4f026 Move tele cursor behaviour to /tc and /telecursor 2023-11-30 22:34:36 +01:00
furo 7a6e368b7f Scale TargetX and TargetY with camera zoom 2023-11-30 22:34:36 +01:00
Robert Müller 1d7c0fad49 Check SHA256 of downloaded maps and community icons
Add `CHttpRequest::ExpectSha256` function to specify expected SHA256 for HTTP downloads. If the download completes with a different SHA256 hash than expected, then the download fails and the file is deleted.

Closes #7485.
2023-11-30 21:31:48 +01:00
Robert Müller 159ddf5534 Refactor config manager, move config variable handling
Move all code for handling of config variables from console to config manager. The console no longer depends on the config manager, instead the config manager now depends on the console.

Add `struct`s to manage config variables of different types (int, color and string). The config manager now keeps a list of all config variables, so usage of the preprocessor can be avoided except for code to initially create all config variables. Additionally, a separate list of just the game config variables (config variables with `CFGFLAG_GAME`) is kept to optimize the `ResetGameSettings` function, as this function is called whenever connecting to a server and should be fast. Previously, this function was even less efficient because it preformed a linear search for every individual game config variable to find the respective command data.

Move console commands that opperate only on config variables (`reset`, `toggle` and `+toggle`) to config manager. Ensure that these commands only opperate on the desired config variables (client or server, respectively) by checking `IConsole::FlagMask`.

Add `IConfigManager::SetReadOnly` function to set/unset config variables as read-only instead of manually overriding the command handlers for the `sv_rescue` and `sv_test_cmds` config variables. This also fixes that read-only config variables could still be changed by using the `reset` command. A console message is now printed when trying to change a read-only config variable. Removing the special handling for these two config variables is additionally useful so the console does not need to keep a pointer to config values and manager.

Use a `CHeap` for the config variables, their help texts and the previous values of string config variables to avoid many separate allocations as well usage of static variables. Also use the heap to store the unknown commands instead of using `std::string`s.

Properly trigger command chain when resetting config variables with the `reset` command and when resetting game settings on map loading. Closes #7461.

Format default value for color variables as RGB/RGBA hex with dollar sign prefix. Closes #5523.

Add log message when using `reset` with a variable that does not exist. Use `log_error` instead of `dbg_msg` when saving config file fails.

Support unlimited number of config save callbacks instead of at most 16. The code also becomes more readable by using an `std::vector` instead of a fixed-size array and a separate num variable.

Consistently name `MACRO_CONFIG_*` parameters when declaring the macros.

Add `IConsole::CMDLINE_LENGTH` constant to represent the maximum length of the console input and thereby reduce usage of magic numbers for buffer sizes.
2023-11-30 20:26:00 +01:00
Robert Müller a1eb0ddd4c Also print command in console when identical to previous
The command currently being executed was not being printed to the console if it's identical to the previous history entry.
2023-11-29 20:42:23 +01:00
Robert Müller 5aa9003180 Remove unused ver parameter of MACRO_INTERFACE 2023-11-28 21:46:03 +01:00
furo fd6c4ecbea Fix alignment of buttons in vote menu. 2023-11-26 19:33:42 +01:00
furo eff6361c38 Add settings for info messages 2023-11-26 17:30:49 +01:00
furo 2cb948a57b Add finish info messages. 2023-11-26 17:29:40 +01:00
furo cb53c45f8c Rename killmessages to infomessages 2023-11-26 17:29:40 +01:00
Dennis Felsing c90899cc29
Merge pull request #7549 from Robyt3/Memheap-Refactoring
Refactor `CHeap`
2023-11-26 13:36:30 +00:00
Robert Müller 41d2c80f21 Add templated CHeap::Allocate function
Add a templated `CHeap::Allocate` function to simplify memory allocation of objects using `CHeap`. The function uses perfect forwarding to construct objects with the specified arguments.
2023-11-26 13:09:23 +01:00
Corantin H fee9b986fb Added possibility to edit chat size and width. Refactored chat preview code. 2023-11-26 12:27:56 +01:00
Dennis Felsing 3e2f8f8a44
Merge pull request #7543 from Robyt3/Console-Interface-Cleanup
Minor refactoring of `IConsole`
2023-11-25 22:21:40 +00:00
Dennis Felsing 0601794801
Merge pull request #7547 from Robyt3/Server-Nameban-Clan
Also apply name bans to clans, trim space from clans, refactor name bans, move code to separate class `CNameBans`
2023-11-25 22:18:46 +00:00
Robert Müller 794e6b750b Also apply name bans to clans, trim space from clans
Apply the name bans system also to player clans, meaning players joining with banned clan names are kicked and changing the clan to a banned name while ingame has no effect.

Additionally, trim UTF-8 whitespace from beginning and end of clan. This was already done for player names but not for clans.

Closes #7516.
2023-11-25 23:00:57 +01:00
Robert Müller 42b952bc6c Move config variables to config_variables.h, remove variables.h
The contents of `variables.h` are moved to `config_variables.h` instead of being included with the preprocessor. The file `variables.h` is removed, so all config variables can be found in a single file instead of being spread over two files without any clear structure. The original declaration order of config variables is preserved. The unnecessary header guard `GAME_VARIABLES_H` from `variables.h` is removed, as the comment `// This file can be included several times.` already serves the same purpose of silencing the header guard check.

A comment is added at the end of `config_variables.h` to mark the location where modders should ideally declare all of their own config variables to avoid merge conflicts with us in the future.

Closes #7472.
2023-11-25 16:40:55 +01:00
Robert Müller e410dd85f8 Replace IConsole::m_Cheated variable with Cheated getter
Interfaces should not have member variables, so the variable is moved to `CConsole`. Only a getter `IConsole::Cheated` is added because the cheated state of the console is never reset.
2023-11-25 11:43:42 +01:00
Dennis Felsing edee3d5b9f
Merge pull request #7537 from furo321/allow-unused
Hide "Allow unused" button when not using "DDNet" entities.
2023-11-24 16:15:20 +00:00
furo daa0609252 Hide "Allow unused" button when not using "DDNet" entities. 2023-11-24 16:55:36 +01:00
heinrich5991 3fff2f9fc3
Merge pull request #7535 from furo321/quote-names
Quote names with spaces when auto completing names in commands.
2023-11-24 00:06:49 +00:00
heinrich5991 cb22fbf902
Merge pull request #7536 from jtbx/scrollback-history
Show previous commands in the console's scrollback buffer
2023-11-23 23:52:17 +00:00
furo 7ca10e2645 Quote names with spaces when auto completing. 2023-11-24 00:49:41 +01:00
Jeremy 00f2c8a89f Show previous commands in the console's scrollback buffer
After you issue a command in the client console or rcon, the command
will first be printed to the console prefixed with a '>' symbol.

Cherry-pick of https://github.com/teeworlds/teeworlds/pull/3185
2023-11-24 12:30:01 +13:00
Dennis Felsing 9f20636952
Merge pull request #7532 from furo321/magic-50
Replace `50` with `SERVER_TICK_SPEED` or `TickSpeed()`
2023-11-23 22:07:37 +00:00
Robert Müller f643da7ef5
Merge pull request #7529 from furo321/killteam-fixes
More fixes to `KILLMSGTEAM`
2023-11-23 18:13:23 +00:00
furo 36a029c622 Set correct race precision value for 0.7 2023-11-23 18:37:02 +01:00
furo 9627e7b3a8 Simplify TickSpeed getters 2023-11-23 15:33:30 +01:00
furo b9fd612ef5 Replace 50 with SERVER_TICK_SPEED or TickSpeed() 2023-11-23 14:42:30 +01:00
furo 04c5c6a5d6 More fixes to KILLMSGTEAM 2023-11-23 11:57:35 +01:00
Dennis Felsing 6fc27bea8c
Merge pull request #7528 from furo321/statboard-killmsgteam
Count deaths in statboard from `KILLMSGTEAM`
2023-11-23 07:26:56 +00:00
furo ad41069c20 Count deaths in statboard from KILLMSGTEAM 2023-11-23 07:54:02 +01:00
Learath b9f786c14f Revert the mess-chain #7247. Apply #7171
Co-authored-by: Valentin Bashkirov <valenteen3d@ya.ru>
2023-11-22 18:34:42 +01:00
Robert Müller 0d8a0d3b1d Dynamically connect/disconnect debug dummies, cleanup
Call expected server callback functions to simulate clients dynamically connecting and disconnecting when changing the `dbg_dummies` variable. This makes the debug dummies more useful for debugging. Previously, the debug dummies were considered invalid clients, whereas they are now considered to be ingame, so they should behave mostly like real clients being connected to the server. The debug dummies also have correct client names now, e.g. "Debug dummy 42".

The game server code is cleaned up by moving all special handling for debug dummies to the engine server function `CServer::UpdateDebugDummies`.

The left/right direction inputs for debug dummies are now properly added to the client input array, so their input handling should be consistent with normal clients, which fixes some inconsistent prediction with debug dummies.
2023-11-21 19:59:20 +01:00
Robert Müller 29a32b7acc Use const char * instead of char const * consistently
Both are equivalent. Seems to already be used consistently for all other types.
2023-11-20 22:26:19 +01:00
Dennis Felsing 375dd7da8b
Merge pull request #7511 from furo321/telecursor-fixes
Account for zoom when teleporting to cursor.
2023-11-20 12:25:54 +00:00
furo c2d02ad45c Account for zoom when teleporting to cursor. 2023-11-20 12:33:08 +01:00
Dennis Felsing 472c9f070b
Merge pull request #7507 from dobrykafe/pr-replace-sizeof
replace `sizeof x` with `sizeof(x)`
2023-11-19 21:56:15 +00:00
Dennis Felsing c15e9b17fa
Merge pull request #7505 from Chairn/pr_wastelefalse
Init vec2 members to 0 and small cleanup
2023-11-19 21:55:09 +00:00
dobrykafe 904abae6ac replace sizeof x with sizeof(x) 2023-11-19 22:36:47 +01:00
Chairn 2dcbaf605e Small cleanup: simplify member type and computation 2023-11-19 17:36:17 +01:00
Chairn 5b27062ded Remove unused members 2023-11-19 17:36:16 +01:00
Chairn d6c7bcdbdc Init vec2 members to 0 following #6256 2023-11-19 17:36:16 +01:00
heinrich5991 b4567d6e25
Merge pull request #7502 from Robyt3/Browser-CommunityFilter-Fixes
Prevent community filters excluding all elements, fix server browser update on community filter change via console
2023-11-19 16:24:52 +00:00
ChillerDragon 16c5a60b53 Move m_pLoadBestTimeResult to IGameController
Gets rid of more CGameControllerDDRace casts.
Those did not show up during compile time only during runtime
of another active controller when asan is active.
2023-11-19 16:23:17 +01:00
Robert Müller ccc470ecc9 Fix server browser update on community filter change via console
Also update server browser filtering/sorting when changing the community/country/type filter config variables with the console.

Clean the filter config variables when they are changed instead of only when the community filter is rendered.
2023-11-19 15:34:50 +01:00
heinrich5991 28b00892f6 Allow more complex interaction with the antibot via the console
Allows the antibot to receive arbitrary console commands.
2023-11-19 04:41:56 +01:00
heinrich5991 9b024fcf97
Merge pull request #7476 from ChillerDragon/pr_const_char
Overload GetCharacter with const version
2023-11-19 03:08:03 +00:00
heinrich5991 d4713cbfe2
Merge pull request #7475 from ChillerDragon/pr_gametype_mod
Add sv_gametype and sample mod
2023-11-19 03:07:24 +00:00
ChillerDragon becffb9377 Add sv_gametype and sample mod 2023-11-19 03:00:21 +01:00
ChillerDragon d42513e843 Overload GetCharacter() with const version
Allows to do this

```C++
for(const CPlayer *pPlayer : GameServer()->m_apPlayers)
{
	if(!pPlayer)
		continue;
	if(!pPlayer->GetCharacter())
		continue;

	// your code that does not change the character state
}
```
2023-11-19 02:00:28 +01:00
Dennis Felsing 6c935eee91 Version 17.4 2023-11-19 00:50:29 +01:00
heinrich5991 8e75998138
Merge pull request #7451 from apelsin21/master
Appending in editor checks for duplicate images
2023-11-18 23:24:32 +00:00
Axel Vestin 1b7cee3888 Fixes duplicate images when appending maps in the editor 2023-11-19 00:07:31 +01:00
Dennis Felsing 4d40106818
Merge pull request #7337 from dobrykafe/pr-multi-view-qol
multi-view: dont zoom below `cl_default_zoom`
2023-11-18 23:04:27 +00:00
Chairn 5cdae502b8 Fix code scanning && clang-tidy false positive? 2023-11-18 22:55:17 +01:00
Robert Müller ee04cd4dda
Merge pull request #7459 from heinrich5991/pr_ddnet_community_json
Add icon URL, remove `servers-key`/`ranks-key` from community JSON
2023-11-18 21:08:23 +00:00
heinrich5991 c7cd281aff Add icon URL, remove servers-key/ranks-key from community JSON
Previously:

```json
{
  "ddnet": {
    "name": "DDraceNetwork",
    "servers-key": "servers",
    "ranks-key": "maps",
    "icon-sha256": "162313eeb954e34495ad03066fee1418ed3c963e76cc83dff993e1c7856c742b"
  }
}
```

Now:
```json
[
  {
    "id": "ddnet",
    "name": "DDraceNetwork",
    "icon": {
      "sha256": "162313eeb954e34495ad03066fee1418ed3c963e76cc83dff993e1c7856c742b",
      "url": "https://info.ddnet.org/icons/ddnet.png"
    },
    "ranks": [
      …
    ],
    "servers": {
      …
    }
  }
]
```

Special case `ddnet` to look for the `servers`, `maps` in the top-level
and `kog` to look for `servers-kog` in the top-level.
2023-11-18 21:52:51 +01:00
Dennis Felsing ccd767aea4
Merge pull request #7474 from ChillerDragon/pr_mod_crash
Fix crash in mod controller
2023-11-18 19:59:22 +00:00