6824: Improve Multi-View UX r=Robyt3 a=Vy0x2
- [x] You can now see who you are spectating in the spectator menu and even add/remove people from it (left mouse button)
- [x] Teleports are now being processed slower (more smoothly)
- [x] Workaround for starting multi-view from free-view (chooses now the nearest player to be the focus)
- [x] Added two more important variables to be able to customize it for specific scenarios (youtubers)
before:
![screenshot_2023-07-09_18-34-29](https://github.com/ddnet/ddnet/assets/24738662/a2ff8b77-c626-4ac2-b200-1eea70f85213)
after:
![screenshot_2023-07-09_18-32-49](https://github.com/ddnet/ddnet/assets/24738662/a54f0b06-b228-43ac-a1fc-eab95e7d9c20)
Edit: Thats the feedback i got from people. Hope its okay.
## Checklist
- [x] Tested the change ingame
- [x] 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: devdenn <denispaul43@gmail.com>
keep a bit more care with who we choose to spectate when frozen
only show active team as clickable in the spec menu
enable switchting teams in Multi-View by closing the spec menu
make the whole spectator menu clickablefix naming
twerk symbols a bit
remove unused ui
add more multi-view variables
add slow acceleration when teleported, add indication in spec menu
make players clickable in spectator menu
change focus with the spectator menu
6841: Send KillMsg for started + unlocked teams r=def- a=VoxelDoesCode
Fixes#6838
## 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
- [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>
6840: Fix enter not working in server browser when no server selected, fix enter not working in editor save dialog when no map selected r=def- 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>
6837: Fix editor hotkeys triggering while some editboxes are active r=def- a=Robyt3
Replace `CEditor::m_EditBoxActive` which only works with editboxes created from the editor with `CLineInput::GetActiveInput` which also works for editboxes which are created by generic UI functions, e.g. the value selector editboxes of color pickers.
## 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>
To make input handling consistent with the gameclient. Also skip input events that are not valid, same as in the gameclient, as this otherwise causes input events to be handled multiple times.
Replace `CEditor::m_EditBoxActive` which only works with editboxes created from the editor with `CLineInput::GetActiveInput` which also works for editboxes which are created by generic UI functions, e.g. the value selector editboxes of color pickers.
6834: Support showing multiple different error messages in editor r=def- a=Robyt3
Previously the same message popup context was used for all error messages. While multiple message popups could be opened at the same time, the message would always be the same for all, as the same buffer was used for all popups.
This is fixed by creating and destroying the message popup contexts dynamically, so there can be any number of message popups with different messages. Additionally, if a popup with an identical message is already open, it will first be closed and then reopened at the new position, to prevent duplicate message popups.
## 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>
6835: Remove obsolete leak sanitizer suppression r=def- a=Robyt3
The memory appears to be properly freed now, so this suppression is no longer necessary.
Keeping the empty suppressions file for the future is easier than removing it.
## 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>
The memory appears to be properly freed now, so this suppression is no longer necessary.
Keeping the empty suppressions file for the future is easier than removing it.
Previously the same message popup context was used for all error messages. While multiple message popups could be opened at the same time, the message would always be the same for all, as the same buffer was used for all popups.
This is fixed by creating and destroying the message popup contexts dynamically, so there can be any number of message popups with different messages. Additionally, if a popup with an identical message is already open, it will first be closed and then reopened at the new position, to prevent duplicate message popups.
6833: Support deleting/renaming demo folders, improve demo popups r=def- a=Robyt3
Support deleting and renaming folders in the demo browser. Only empty folders can be deleted.
Ensure only files and folders in the save directory can be deleted and renamed.
Also check if a folder with a demo rename/render filename already exists.
Fix broken `m_DemolistSelectedIsDir` checks by using `m_vDemos[m_DemolistSelectedIndex].m_IsDir` instead.
Append `.mp4` file extension only internally instead of appending it to the render filename lineinput, as this causes the file extension to appear when rendering doesn't start due an error message.
Use more efficient `FileExists` instead of `FindFile` to check if rendered demo video file already exists.
Change popup preconditions to assertions.
## 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>
6832: Show message in editor when player is moved ingame, refactor rendering of editor mentions and modebar r=def- a=Robyt3
Show a short message below the existing chat mentions message that is shown in the top left area of the editor above the layers/images/sounds button when the player character is moved ingame while the editor is open. The messages are cleared when the editor is activated and when the client is disconnected.
Closes#1993.
Screenshots:
- Before:
![screenshot_2023-07-11_18-48-46](https://github.com/ddnet/ddnet/assets/23437060/aacac7c3-05ab-4748-b418-9c89d056d79b)
- After:
![screenshot_2023-07-11_18-03-32](https://github.com/ddnet/ddnet/assets/23437060/153be694-5847-40bc-9857-85c9bfae75ec)
## 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: Robert Müller <robytemueller@gmail.com>
Support deleting and renaming folders in the demo browser. Only empty folders can be deleted.
Ensure only files and folders in the save directory can be deleted and renamed.
Also check if a folder with a demo rename/render filename already exists.
Fix broken `m_DemolistSelectedIsDir` checks by using `m_vDemos[m_DemolistSelectedIndex].m_IsDir` instead.
Append `.mp4` file extension only internally instead of appending it to the render filename lineinput, as this causes the file extension to appear when rendering doesn't start due an error message.
Use more efficient `FileExists` instead of `FindFile` to check if rendered demo video file already exists.
Change popup preconditions to assertions.
Show a short message below the existing chat mentions message that is shown in the top left area of the editor above the layers/images/sounds button when the player character is moved ingame while the editor is open. The messages are cleared when the editor is activated and when the client is disconnected.
Closes#1993.
6831: Fix copyright for kitty_x_ninja (fixes#6830) r=Robyt3 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
- [ ] 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>
6829: Perform sanity check and show errors when loading map in editor r=def- a=Robyt3
Add `CEditorMap::PerformSanityChecks` to perform additional sanity checks when loading a map in the editor.
In particular, the following is added: Check if there are any images with a width or height that is not divisible by 16 which are used in tile layers. Reset the image for these layers, to prevent crashes with some drivers.
Closes#6519.
Error message popup when loading the map linked in the issue (loading goes through, but this popup message is shown):
![screenshot_2023-07-10_23-11-38](https://github.com/ddnet/ddnet/assets/23437060/21fbd1b3-88dc-4b59-a20c-113d5613efde)
## 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: Robert Müller <robytemueller@gmail.com>
Add `CEditorMap::PerformSanityChecks` to perform additional sanity checks when loading a map in the editor.
In particular, the following is added: Check if there are any images with a width or height that is not divisible by 16 which are used in tile layers. Reset the image for these layers, to prevent crashes with some drivers.
Closes#6519.
6827: Fix hook-through not being fully removed when filling selection r=def- a=Robyt3
Closes#6782.
## 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>
Use separate columns for icons and spacing like in the server browser.
Always show scrollbar for more consistent layout.
Show ellipsis if filename is too long, also for the filename shown in the demo player.
Hide number of markers and length if the demo is invalid.
6820: Improve demo (video) renderer UX r=def- a=Kaffeine
<!-- What is the motivation for the changes of this pull request? -->
In this MR I want to address three issues with video recorder:
1. A bug: if I start a rendering with 0.25x speed and click on 'Increase the speed' during the rendering, I expect to get the next speed (0.5x) but as the speed index is not set (kept default `4`), the speed is boosted to 1.25x.
2. Usecase: I want to adjust the camera (change position, decrease zoom, etc) for the demos and I don't want to use extra video editor to cut the first frames with the unwanted camera moves/setups from the demo. I came to a simple solution: start the rendering pre-paused to do the needed adjustments before anything is added to the video.
3. NotABug: All recorded video files have double `.demo.mp4` extension which is ugly.
Probably I have to change something to fit DDNet codebase. E.g. I don't know if `Localize("(paused)")` is acceptable here.
<!-- 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. -->
## Before
![image](https://github.com/ddnet/ddnet/assets/374839/7273dd5b-e3d1-4f73-87bd-e09493d106a0)
## After
![image](https://github.com/ddnet/ddnet/assets/374839/7d62028d-04bc-45af-babf-5a2e8cb243dc)
## 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: Alexander Akulich <akulichalexander@gmail.com>
6823: Mark `NETMSGTYPE_CL_STARTINFO` as `MSGFLAG_FLUSH` r=def- a=Robyt3
This makes the client connect to the server faster. It's especially noticeable on servers with a low ping.
Closes#6811.
## 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>
6822: Fix editor crashes with quad point and other popup menus r=def- a=Robyt3
Closes#6817.
## 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 targets of many popup menus become invalid when loading or creating a new map with the editor hotkeys, so all popup menus have to be closed in this case, otherwise this can cause crashes with several different popups.
6821: Revert `Наблюдение за` change r=def- a=gerdoe-jr
<!-- 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
- [ ] 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: Vlad <51330274+gerdoe-jr@users.noreply.github.com>
6663: New spectate mode (multiview) r=def- a=Vy0x2
<!-- What is the motivation for the changes of this pull request? -->
Adding a new spectator mode, that can spectate a team by moving the camera in the middle and zooming in/out
Works with team 0 or any team, but you have to work with it a bit to get used to it. I tried to make it as intuitive as possible.
Pr is as ready as it can get, please test it.
![screenshot_2023-06-30_19-17-42](https://github.com/ddnet/ddnet/assets/24738662/0446d568-d34b-4d14-8682-dd077f121e91)
Youtube video:<a href="http://www.youtube.com/watch?feature=player_embedded&v=7GM6DA3EYAI" target="_blank">
<img src="http://img.youtube.com/vi/7GM6DA3EYAI/maxresdefault.jpg" alt="Watch the video" width="192" height="108"/>
</a>
<!-- 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
- [x] 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
- [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: devdenn <denispaul43@gmail.com>
Co-authored-by: Vy0x2 <denispaul43@gmail.com>