Commit graph

18964 commits

Author SHA1 Message Date
furo f6d093987f Use toggle button instead of checkbox for "Sync envelope button". 2024-02-03 01:10:54 +01:00
Dennis Felsing 686cb5f1a7
Merge pull request #7894 from Robyt3/Client-Component-OnRefreshSkins-Cleanup
Refactor skin refreshing in gameclient, fix crash in skin settings
2024-02-01 22:47:07 +00: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
Dennis Felsing 0eca4b6284
Merge pull request #7882 from Robyt3/Client-Logging-Improvement
Improve client/server launch log messages
2024-01-30 23:02:40 +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
Dennis Felsing 0c2001be0b
Merge pull request #7880 from ChillerDragon/pr_fix_07_armor
Fix 0.7 armor being snapped as health
2024-01-30 12:14:13 +00: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
Dennis Felsing 8366bfb881
Merge pull request #7877 from ChillerDragon/pr_fix_ub_if_no_game_layer
Fix clang warning and UB when there is no game layer
2024-01-30 06:39:52 +00:00
Dennis Felsing ed43b1495d
Merge pull request #7878 from ChillerDragon/pr_allow_hookedplayer_minus_one
Fix 0.7 validation range of m_HookedPlayer in character snap items
2024-01-30 06:39:21 +00:00
ChillerDragon e25b943cfb Fix 0.7 validation range of m_HookedPlayer in character snap items
Co-authored-by: Redix <redix@hotmail.de>
2024-01-30 12:46:33 +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
Dennis Felsing 9a8541648c
Merge pull request #7871 from Learath2/dd_pr_oopsie
Fix client/server updates
2024-01-29 10:40:40 +00: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
Robert Müller 2b2d3b8dd2 Add enum EServerControlTab 2024-01-26 21:39:11 +01:00