Commit graph

17767 commits

Author SHA1 Message Date
Alexander Akulich 9eb4cf7508 CCoreCharacter: Add and use HookedPlayer() 2023-09-15 18:04:23 +03:00
heinrich5991 ab5834278f
Merge pull request #7129 from Robyt3/Team-Color-Golden-Ratio
Use golden angle to generate unique, distinct DDTeam colors
2023-09-14 10:45:17 +00:00
Robert Müller dcd86cb873 Use golden angle to generate unique, distinct DDTeam colors
The DDTeam colors were previously generated in HSL by taking the team index and multiplying it by 360/64° to calculate the hue, which results in team colors being evenly distributed over the entire color range like a rainbow. However, this causes colors of adjacent teams to be very similar and therefore hard to distinguish.

Now, the hue is calculated by multiplying the team index with the golden angle (~137.50776°) and taking the modulo 360° of that. Due to the properties of the golden angle, this can generate never repeating sequences of unique colors where the adjacent colors are very distinct.

Duplicate code is reduced by adding the `CGameClient::GetDDTeamColor` function.
2023-09-13 18:56:47 +02:00
Edgar 36f72b936a
Merge pull request #7173 from heinrich5991/pr_ddnet_fix_ci
Hopefully fix intermittent CI failures
2023-09-13 13:01:58 +00:00
heinrich5991 14dc6b3e70 Hopefully fix intermittent CI failures
Thanks to @Robyt3 for the solution.

https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation
https://github.com/serde-rs/serde/issues/2577
https://github.com/dtolnay/rust-toolchain/pull/94
2023-09-12 21:22:17 +02:00
Jupeyy f25773243f
Merge pull request #7150 from heinrich5991/pr_ddnet_cmakelists_add_in_h
Revert "`.h.in` aren't compiled"
2023-09-12 19:07:53 +00:00
Robert Müller c0526f06a8
Merge pull request #7167 from l-ouis/default-skin-fix
replace unsymmetrical default skin
2023-09-12 19:00:04 +00:00
heinrich5991 1bc250ba08
Merge pull request #7147 from infclass/for-ddnet
Server: Split the huge CGameContext::OnMessage()
2023-09-11 22:32:44 +00:00
louis 2e24e743d3
additional optimization 2023-09-11 17:23:39 -04:00
louis be74fed25b replace unsymmetrical default skin with fixed+optimized version
replace unsymmetrical default skin
2023-09-11 16:55:47 -04:00
Robert Müller 4ca86f1b05
Merge pull request #7166 from Jupeyy/pr_fix_skin_invalid
Make skin refind cleanup bit more aggressive
2023-09-11 15:22:48 +00:00
Dennis Felsing 2bac51fd33
Merge pull request #7164 from Robyt3/UI-Dropdown-Icon-Alignment
Improve dropdown menu button label alignment
2023-09-11 05:42:19 +00:00
Dennis Felsing 6ab04afd66
Merge pull request #7159 from Robyt3/CLineInput-Desync-Fix
Fix desynced lineinput cursor/selection on external buffer change
2023-09-11 05:38:04 +00:00
Jupeyy 47addc4175 Make skin refind bit more aggressive 2023-09-10 20:14:19 +02:00
Robert Müller 4fb44fc0e8 Improve dropdown menu button label alignment
Reduce the space reserved for the label by the space for the dropdown icon instead of rendering the label behind the icon.

This is more noticeable with smaller dropdown menu buttons, which will be used in the future.
2023-09-10 13:42:38 +02:00
Jupeyy 62c0d34129
Merge pull request #7163 from Robyt3/Editor-Vector-X
Render editor brush selection size with `⨯` instead of `,`
2023-09-10 10:22:17 +00:00
Robert Müller e19a96d0e5 Render editor brush selection size with instead of ,
For example, `20⨯10` instead of `20,10`.

This is the "vector" symbol, which makes the most sense in this context.
2023-09-10 11:59:27 +02:00
Robert Müller 36867df722
Merge pull request #7162 from Jupeyy/pr_fix_clipping_chat
Disable scissor for clearing the framebuffer
2023-09-10 08:44:27 +00:00
Robert Müller e8f17aade1
Merge pull request #7134 from infclass/for-ddnet3
Mod Support: Add NINJA_SKIN_FOR_FROZEN game info flag
2023-09-10 08:32:43 +00:00
Jupeyy ca2926335b Disable scissor for clearing the framebuffer 2023-09-10 09:44:32 +02:00
heinrich5991 96d7a9d0d9
Merge pull request #7158 from Robyt3/Friendlist-Conchain-Fix
Fix friendlist update conchain not working with optional argument
2023-09-09 12:03:30 +00:00
Alexander Akulich 41c83da699 CGameContext::OnMessage: Replace if-else with switch() 2023-09-09 14:49:52 +03:00
Alexander Akulich e6c7d0c96d GameContext: Extract all other messages 2023-09-09 14:49:10 +03:00
Alexander Akulich 3be79f568a GameContext: Extract OnStartInfoNetMessage() 2023-09-09 14:45:15 +03:00
Alexander Akulich 763541af5a GameContext: Extract OnEmoticonNetMessage() 2023-09-09 14:45:15 +03:00
Alexander Akulich 0a2cc3d84c GameContext: Extract OnChangeInfoNetMessage() 2023-09-09 14:45:15 +03:00
Alexander Akulich 9f668e20db GameContext::OnMessage: Move the check for World.Paused into OnSetTeam
1. Regardless of the pause the message is CL_SETTEAM and there is no
   reason to match it against other messages.
2. Another implementation can save the wanted team and apply it later.
2023-09-09 14:45:11 +03:00
Alexander Akulich ce5371b038 GameContext: Extract OnSetTeamNetMessage() 2023-09-09 14:45:04 +03:00
Alexander Akulich a1ec904596 GameContext: Extract OnSayNetMessage() 2023-09-09 14:45:02 +03:00
Robert Müller 84e3c081b4 Fix friendlist update conchain not working with optional argument
The clan argument is optional when using `add_friend` and `remove_friend`.
2023-09-09 13:31:27 +02:00
Robert Müller 21f7af59a0 Fix desynced lineinput cursor/selection on external buffer change
When the buffer of a lineinput is modified externally, the cursor offset and selection are not updated, which causes them to be rendered wrong and also causes the assertion error "Selection and cursor offset got desynchronized" when changing the selection of a lineinput.
2023-09-09 13:25:47 +02:00
Dennis Felsing b951eab257
Merge pull request #7153 from infclass/for-ddnet4
Mod Support: CMake: Use DDNet_VERSION to construct DDNET_VERSION_NUMBER
2023-09-08 22:10:52 +00:00
Alexander Akulich 6b78013a13 CMake: Set package version to the project version
Setting the version to VERSION didn't allow to override the project()
name and version.
2023-09-09 00:26:25 +03:00
Alexander Akulich 1074a5ff56 CMake: Use DDNet_VERSION to construct DDNET_VERSION_NUMBER 2023-09-08 23:13:00 +03:00
Alexander Akulich 88fc275d85 GameContext: Extract OnCallVote() and OnVote() from OnMessage() 2023-09-08 19:19:28 +03:00
Robert Müller f3eaa10d7a
Merge pull request #7102 from Marmare314/revert-6844
revert change to quad selection (resolves #7025)
2023-09-08 15:21:53 +00:00
heinrich5991 237c2eba35 Revert ".h.in aren't compiled"
This allows the version.h.in file to show up in IDEs.

This reverts commit db5f28e65a.
2023-09-08 16:21:52 +02:00
Dennis Felsing a07fd521f7
Merge pull request #7148 from heinrich5991/pr_ddnet_mastersrv_rawvalue
mastersrv: Go to `RawValue` directly
2023-09-08 09:45:09 +00:00
Dennis Felsing 4108ccd55c
Merge pull request #7149 from heinrich5991/pr_ddnet_cmakelists_cleanup
Don't compile `.h.in`, remove C compiler flags
2023-09-08 09:43:30 +00:00
heinrich5991 cebc472cbe Remove C-only compiler flag
We don't have any own C source files anymore.
2023-09-08 11:08:52 +02:00
heinrich5991 db5f28e65a .h.in aren't compiled 2023-09-08 11:05:51 +02:00
heinrich5991 cbdd83f790 mastersrv: Go to RawValue directly
Instead of going through `String`.
2023-09-08 11:03:07 +02:00
Robert Müller e5e7e76ce5
Merge pull request #7146 from dobrykafe/pr-settings-player-scroll
Allow countryflag scrolling in player settings while name/clan input selected
2023-09-08 08:45:10 +00:00
Dennis Felsing ee1b8baab5
Merge pull request #7145 from infclass/for-ddnet4
Cleanup CMake, adjust the version variables
2023-09-08 08:09:56 +00:00
dobrykafe 53d0e3f851 allow flag scroll while input selected 2023-09-08 00:12:18 +02:00
Alexander Akulich 0cea5b0120 CMake: Remove the code for old CMake versions 2023-09-08 00:10:48 +03:00
Alexander Akulich f6172a2ec4 CMake: Add version range validation 2023-09-08 00:10:48 +03:00
Alexander Akulich d0ecb5f8dd CMake: Rework the versioning 2023-09-08 00:10:48 +03:00
Alexander Akulich 225b175889 CMake: Set the minimum CMake version to 3.12
In fact this version is required after 00a0e0e723
(FindPython3 added in 3.12)
2023-09-08 00:10:48 +03:00
Alexander Akulich a9157e8385 CI: Move ASan/UBSan to own build directory 2023-09-08 00:10:48 +03:00