6617: Add /unsolo and /undeep practice commands r=def- a=hus3h
Related: https://github.com/ddnet/ddnet/issues/6318#issuecomment-1498626132 and #2391
Unsolo is often needed especially in maps with death tiles and solo part spawns, undeep can also be useful for some parts.
Some notes:
- didn't use `CFGFLAG_SERVER` for the commands as it resulted in a conflict with the registered `unsolo` and `undeep` super team console commands, not entirely sure if that's okay
- `/help unsolo` and `/help undeep` will print the help text of the super team commands, not the new chat commands. The texts are currently the same, but it's still a sign of possible conflicts
- prevented `/unsolo` on solo servers by checking for `SV_TEAM_FORBIDDEN` and `SV_TEAM_FORCED_SOLO`, let me know if that's not enough (Tutorial map?)
- no server message is sent on `/unsolo` (as opposed to going through unsolo tiles), didn't seem like it's needed here even if it feels different at first
If the conflicts are problematic enough, the easiest fix might be using new unique commands instead of `unsolo` and `undeep`, I couldn't think of something that would fit as well though.
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: hus3h <39054982+hus3h@users.noreply.github.com>
6619: Update libraries r=Jupeyy a=def-
SDL 2.0.20 -> 2.26.5
Curl 7.84.0 -> 8.0.1
Freetype 2.12.1 -> 2.13.0
SQLite 3.39.2 -> 3.41.2
ffmpeg 5.1 -> 6.0
libpng 1.6.37 -> 1.6.39
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
6615: Fix logging (fixes#6611) r=Robyt3 a=def-
`@heinrich5991` Was the atomic important? Could we have a lock instead if so?
Seems a bit annoying since atomic can't have a shared_ptr inside
![Screenshot 2023-05-18 at 18 02 32](https://github.com/ddnet/ddnet/assets/2335377/2f8bcc57-2301-4a65-ada2-0e51f2b8c200)
## Checklist
- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
6616: fix timescore r=Robyt3 a=edg-l
Fixes the time displayed, this time i tested it quite thoroughly, i could reproduce the wrong ordering in scoreboard and the time not updating before, and fixed it now.
The previous way also had a issue with times that ended up with a value of -1, which is fixed now too
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [x] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Edgar Luque <git@edgarluque.com>
6612: Port friends list UI from 0.7 r=edg-l a=Robyt3
Separate friends list into three groups, which can be expanded and collapsed: online players, online clanmates and offline friends.
Friends with the same name/clan are no longer grouped together. Instead, each individual player that is online and has name/clan matching a friend is shown in either the online players or online clanmates group. Friends for which no matching players are found are shown in the offline group.
Friends in the friend list can no longer be selected. Instead, left-clicking a friend selects the server that the friend is on. Double-clicking a friend joins the server that they are playing on.
Render small X button in top-right corner of every friend list entry to remove the respective friend instead of using one button that removes the selected friend.
Change "Add Friend" button to "Add Clan" when only clan is entered.
Remove excess empty space from layout.
Closes#6326.
Screenshots:
- Before:
![screenshot_2023-05-18_15-39-18](https://github.com/ddnet/ddnet/assets/23437060/59a32a45-7d0d-461e-b25d-75c5a6267166)
- After:
![screenshot_2023-05-18_15-38-59](https://github.com/ddnet/ddnet/assets/23437060/7648debc-8919-47fe-91b1-cf2f25ebe2a7)
## Checklist
- [X] Tested the change ingame
- [X] Provided screenshots if it is a visual change
- [X] Tested in combination with possibly related configuration options (`cl_friends_ignore_clan`)
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [X] Considered possible null pointers and out of bounds array indexing
- [X] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
Separate friends list into three groups, which can be expanded and collapsed: online players, online clanmates and offline friends.
Friends with the same name/clan are no longer grouped together. Instead, each individual player that is online and has name/clan matching a friend is shown in either the online players or online clanmates group. Friends for which no matching players are found are shown in the offline group.
Friends in the friend list can no longer be selected. Instead, left-clicking a friend selects the server that the friend is on. Double-clicking a friend joins the server that they are playing on.
Render small X button in top-right corner of every friend list entry to remove the respective friend instead of using one button that removes the selected friend.
Change "Add Friend" button to "Add Clan" when only clan is entered.
Remove excess empty space from layout.
Closes#6326.
6604: Clean up CServerLogger (fixes#6598) r=edg-l a=def-
<!-- What is the motivation for the changes of this pull request? -->
<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
6608: Support rendering tooltips with multiple lines of text, support overlapping tooltip activation rects, add alpha fade-in for tooltips r=edg-l a=Robyt3
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
6607: Minor refactoring of `CMenus::RenderLoading` r=Learath2 a=Robyt3
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
Both calls put a margin around the same rect but the intermediate result is never used, so both margins can be combined.
The variable `Screen` is also not necessary.
When the activation rects for two tooltips overlap, this always causes the first tooltip to be rendered.
This is changed so the last active tooltip is rendered instead, to simplify the usage of the tooltip function.
Render tooltip text correctly with multiple lines when the maximum tooltip width is limited.
Add missing padding when rendering multi-line tooltip.
Update doxygen documentation.
6606: Only run `KillTeam()` when team has more than 1 tee r=def- a=VoxelDoesCode
I also put the `aBuf` segment in there, because why should it even write if it's not going to be sent?
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: VoxelDoesCode <dante_n_cedroni@hotmail.com>
6602: Revert "Delay disconnecting until after render call" r=def- a=Robyt3
This reverts commit 5c90fd2b83.
Delaying the disconnecting causes issues when the client automatically disconnects immediately before connecting to another server or starting demo playback.
It's not necessary to delay the disconnecting to deal with #6387, as #6589 is already enough. It's easier to revert this instead of rewriting the client so connecting and starting demo playback are also delayed.
Closes#6595.
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
6603: Add missing attribute shield entities for front and switch layers r=edg-l a=Robyt3
Copy the attribute shield entities from the DDNet image to the front and switch images for the editor. The attribute shield entities can be used in game, front and switch layers, so the respective image also has to contain the entities.
Closes#5068.
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
Copy the attribute shield entities from the DDNet image to the front and switch images for the editor. The attribute shield entities can be used in game, front and switch layers, so the respective image also has to contain the entities.
Closes#5068.
6600: Compare against correct enum in dummy connect r=heinrich5991 a=ChillerDragon
Why did we allow connecting dummy in state pending? Maybe because state online did not match because the wrong enum was used?
```C++
int CNetClient::State()
{
if(m_Connection.State() == NET_CONNSTATE_ONLINE)
return NETSTATE_ONLINE;
if(m_Connection.State() == NET_CONNSTATE_OFFLINE)
return NETSTATE_OFFLINE;
return NETSTATE_CONNECTING;
}
```
We map from NET_CONNSTATE_ to NETSTATE_ so it should also be compared against NETSTATE_
<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
6601: try to fix broken score r=heinrich5991 a=edg-l
not sure if this is the fix, but -9999 is wrong, and -1 is set on reset
## Checklist
- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: ChillerDragon <chillerdragon@gmail.com>
Co-authored-by: Edgar Luque <git@edgarluque.com>
This reverts commit 5c90fd2b83.
Delaying the disconnecting causes issues when the client automatically disconnects immediately before connecting to another server or starting demo playback.
It's not necessary to delay the disconnecting to deal with #6387, as #6589 is already enough. It's easier to revert this instead of rewriting the client so connecting and starting demo playback are also delayed.
Closes#6595.
6592: Minor refactoring of map and datafile r=def- a=Robyt3
## Checklist
- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
6593: Fix uninitialized field causing assertion error with MSVC r=def- a=Robyt3
The modified time was uninitialized for the editor file browser entry corresponding to the downloadedmaps-link. The time is never rendered for links, but the uninitialized time value was still passed to `str_timestamp_ex`, which results in an assertion error due to an incorrect time value being used when compiling with MSVC.
This is fixed by properly initializing the field and also by only calling `str_timestamp_ex` when the time value will be rendered.
Closes#6579.
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
The modified time was uninitialized for the editor file browser entry corresponding to the downloadedmaps-link. The time is never rendered for links, but the uninitialized time value was still passed to `str_timestamp_ex`, which results in an assertion error due to an incorrect time value being used when compiling with MSVC.
This is fixed by properly initializing the field and also by only calling `str_timestamp_ex` when the time value will be rendered.
Closes#6579.
6591: add unit test for updating teamranks r=def- a=edg-l
add unit test for updating teamranks
fixes#6113
## Checklist
- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [x] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)
Co-authored-by: Edgar Luque <git@edgarluque.com>