6584: Show ASan/UBSan logs in CI also for unit and integration tests r=def- a=Robyt3
The ASan/UBSan logs are currently only printed in the CI log when launching the client and server once.
Now the logs are also printed when the unit or integration tests fail due to a sanitizer crash.
A redundant definition of an environment variable is removed.
## 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 ASan/UBSan logs are currently only printed in the CI log when launching the client and server once.
Now the logs are also printed when the unit or integration tests fail due to a sanitizer crash.
A redundant definition of an environment variable is removed.
6582: Shutdown SDL after kernel and client r=edg-l a=Robyt3
Register SDL for cleanup before creating the kernel and client, so SDL is shutdown after kernel and client. Otherwise the client may crash when shutting down after SDL is already shutdown.
Closes#6581.
## 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>
Register SDL for cleanup before creating the kernel and client, so SDL is shutdown after kernel and client. Otherwise the client may crash when shutting down after SDL is already shutdown.
Closes#6581.
6580: Fix cl_show_others_alpha not used in places where it can be r=Robyt3 a=edg-l
There are some things like damage indicator, spawn particles, etc which we have no way to properly set alpha based on team/solo knowledge because they don't have any info about that. (to my knowledge)
Fixes#6520
## 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: Edgar <git@edgarluque.com>
Co-authored-by: Edgar Luque <git@edgarluque.com>
6577: Quit client when existing config file cannot be loaded, add `restart` command to client, properly uninitialize all client components 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
- [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>
Track stack of cleaner functions that destruct client components so exactly the correct cleanup is performed in the reverse order of initialization.
This allows performing the cleanup also in the early-return cases without introducing duplicate code.
When the configuration file exists but cannot be loaded, the client continues to launch. When closing, the client then saves the default config and overwrites the existing config that could not be loaded.
This is prevented by quitting the client with an error message popup when the config exists but cannot be loaded.
Closes#3843.
6576: add git mailmap r=def- a=edg-l
add git mailmap, mapping same author email/names to the prefered/most used name
Co-authored-by: Edgar Luque <git@edgarluque.com>
6575: Replace usages of `atan2f` and `atan2` with `std::atan2` r=def- a=Robyt3
Another leftover from #6372.
## 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>
6573: set SDL_MAC_OPENGL_ASYNC_DISPATCH sdl hint to fix macos resizing r=heinrich5991 a=edg-l
Fixes a issue where ddnet freezes on resize on macos
## 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: Edgar <git@edgarluque.com>
6551: Fix Y Alignment by respecting cursor height independent of character … r=Robyt3 a=Jupeyy
…height
since the cursor height is simply the font size, but obv not all characters use the full font size, it must additionally make sure that this size isn't ignored in the y offset calculation (since it makes the characters render at the offset of the cursor height), so basically:
0 + FontSize == Character start
CharacterHeight != FontSize
that moves the character down.
Also added back the render flags, i think it logically makes sense if they are there, since a character could have y bearing, even tho in this case it doesn't seem the case.
fixes#6538
I haven't extensively checked this, and maybe `@Robyt3` prefers to fix it differently, I'd be ok with this, it's just for showcase
## 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: Jupeyy <jupjopjap@gmail.com>
6566: Allow using rescue (/r) on health pickup r=heinrich5991 a=Robyt3
Check if character is in range of health pickup and don't set rescue position if that's the case, so rescue can be used to get out of the health pickup's freeze effect.
The existing `m_Core.m_IsInFreeze` is not set so this should not have any side-effects.
Closes#3330.
## 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: Robert Müller <robytemueller@gmail.com>
6570: Only show assertion popup for assertions on main thread, destroy window before showing popup if graphics initialized r=Jupeyy 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
- [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: Robert Müller <robytemueller@gmail.com>
6568: Also print platform, game and OS version in assertion popup 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>
6567: Add missing HUD text container deletion r=Jupeyy a=Robyt3
See #5143.
## 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>
Check if character is in range of health pickup and don't set rescue position if that's the case, so rescue can be used to get out of the health pickup's freeze effect.
The existing `m_Core.m_IsInFreeze` is not set so this should not have any side-effects.
Closes#3330.
When a client component (e.g. the menu or the console) disconnects the client, this immediately unloads the map data but the render call continues as normal. This causes all components rendered after this component to access invalid memory in place of the map, layers and collision data.
This is fixed by delaying the actual disconnecting until after the render call, to ensure that the map data can be safely unloaded.
Closes#6387. Closes#3179.
6559: Show error message popup on assertion error in client and when client fails to launch r=def- a=Robyt3
Alternative to #6493. Closes#6482.
## 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>
Instead of stopping when a broadcast line exceeds the screen width, wrap the text to the next line. Otherwise one long line in a broadcast can end the rendering so following lines are skipped.
Fade the broadcast alpha to zero in the last second that the broadcast is shown.
Use text container to support the fade out and to make broadcast rendering more efficient.
The screen also needs to be mapped when calculating the width of the broadcast text, otherwise the width is not correct and so the text is not correctly centered horizontally.
The wrong text width was also being calculated when the text has multiple lines. Now `TextWidth` is used so the width is also correct for multi-line text.
6562: Fix server password input not being activated automatically, always move cursor to end when selecting all text r=Jupeyy 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>