Commit graph

11199 commits

Author SHA1 Message Date
bors[bot] cd16459e9b
Merge #5147
5147: Use `check_cxx_compiler_flag` instead of `check_c_compiler_flag` r=def- a=heinrich5991

We only have C++ source files left, take advantage of this and check
whether the C++ compiler supports the flags, not the C compiler. GCC for
example warns about `-Wsuggest-override` in C mode, but supports it in
C++ mode.

## 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 if it works standalone, system.c especially
- [ ] 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: heinrich5991 <heinrich5991@gmail.com>
2022-05-19 12:34:27 +00:00
bors[bot] 8ff87f6e6f
Merge #5001
5001: Ellipsis at end in scoreboard and hud r=heinrich5991 a=def-

Looks nicer to have consistent length in HUD, more clear that something is cut off with the ellipsis.
![screenshot_2022-04-18_12-57-22](https://user-images.githubusercontent.com/2335377/163799128-89788d67-cf3e-4215-b716-7ee0a348f1b2.png)
Thoughts on kill message?
## 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 if it works standalone, system.c especially
- [ ] 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: def <dennis@felsin9.de>
2022-05-19 09:18:11 +00:00
heinrich5991 2b7e1c629e Make Objective-C file Objective-C++
This removes the last C file we have, allows us to set C++ options
unilaterally.
2022-05-19 11:16:03 +02:00
Dennis Felsing d1eba47cf8 Add override in mysql code too (fixes #5139) 2022-05-19 10:35:24 +02:00
def f278399bd1 Ellipsis at end in scoreboard and hud 2022-05-18 23:46:11 +02:00
bors[bot] 609987730c
Merge #5075
5075: Switch to nanoseconds r=def- a=Jupeyy

Modern hardware is too fast, updates sometimes take less than a few microseconds.
It's easier in the long run if we use a bigger range to avoid calculation problems.

possibly f i x e s #5051 (needs testing from bencie for the main bug, but fixes what `@sjrc6` found)

Also took the moment to use more chrono so we can at some point switch to a typesafe time.

Hopefully I didnt miss any value ^^

## 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 if it works standalone, system.c especially
- [ ] 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>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-05-18 16:59:36 +00:00
Dennis Felsing a1fc561434 No more system.h include in client.m 2022-05-18 18:58:31 +02:00
Jupeyy a7bc8781a9 Put assert for text containers after printing all non empty text containers 2022-05-18 18:25:48 +02:00
Jupeyy 3c597aff95 Switch to nanoseconds 2022-05-18 18:05:41 +02:00
bors[bot] 53d77e86b2
Merge #5119
5119: Use STUN to determine UDP connectivity and show diagnostics r=def- a=heinrich5991

These diagnostics are supposed to guide the user to problem resolution.
They're displayed if no packet is received from the server within one
second of connecting.

No message if we don't have STUN servers.

"Trying to determine UDP connectivity..." if no answer has been received
from the STUN server yet and it hasn't timed out yet.

"UDP seems to be filtered." if the STUN request has timed out.

"UDP and TCP IP addresses seem to be different. Try disabling VPN,
proxy or network accelerators." if the STUN request has returned an IP
address different from the one obtained via HTTP from info2.ddnet.tw.

"No answer from server yet." otherwise, if the STUN request has returned
no interesting data, indicating that it's likely the game server's
fault.

## 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 if it works standalone, system.c especially
- [ ] 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: heinrich5991 <heinrich5991@gmail.com>
2022-05-18 07:43:55 +00:00
heinrich5991 4fb050ccb7 Use STUN to determine UDP connectivity and show diagnostics
These diagnostics are supposed to guide the user to problem resolution.
They're displayed if no packet is received from the server within one
second of connecting.

No message if we don't have STUN servers.

"Trying to determine UDP connectivity..." if no answer has been received
from the STUN server yet and it hasn't timed out yet.

"UDP seems to be filtered." if the STUN request has timed out.

"UDP and TCP IP addresses seem to be different. Try disabling VPN,
proxy or network accelerators." if the STUN request has returned an IP
address different from the one obtained via HTTP from info2.ddnet.tw.

"No answer from server yet." otherwise, if the STUN request has returned
no interesting data, indicating that it's likely the game server's
fault.
2022-05-18 09:21:31 +02:00
heinrich5991 ec45a7338a Add bare-bones STUN protocol support
Implemented according to RFC 5389.
2022-05-18 09:20:54 +02:00
heinrich5991 407644deef Change IClient::ServerAddress to give the actual server address
Previously, it'd take the string entered by the user, before applying
its transformations. Add `IClient::ConnectAddressString` for the old
behavior.
2022-05-18 09:20:53 +02:00
heinrich5991 6977bdc782 Make NETADDR forward-declarable 2022-05-18 09:16:08 +02:00
bors[bot] 3d6e683fdd
Merge #5133 #5138
5133: Fix IPO build problems r=heinrich5991 a=def-

`@Kaffeine` 

Windows x86-64 with MinGW worked, previously:
```
-rwxr-xr-x 1 deen deen 755K May 15 11:38 config_retrieve.exe*
-rwxr-xr-x 1 deen deen 756K May 15 11:38 config_store.exe*
-rwxr-xr-x 1 deen deen 2.8M May 15 11:38 DDNet.exe*
-rwxr-xr-x 1 deen deen 2.1M May 15 11:38 DDNet-Server.exe*
-rwxr-xr-x 1 deen deen 761K May 15 11:38 dilate.exe*
-rwxr-xr-x 1 deen deen 763K May 15 11:38 map_convert_07.exe*
-rwxr-xr-x 1 deen deen 756K May 15 11:38 map_diff.exe*
-rwxr-xr-x 1 deen deen 761K May 15 11:38 map_extract.exe*
```
Now:
```
-rwxr-xr-x 1 deen deen 256K May 16 00:26 config_retrieve.exe*
-rwxr-xr-x 1 deen deen 282K May 16 00:26 config_store.exe*
-rwxr-xr-x 1 deen deen 2.8M May 16 00:26 DDNet.exe*
-rwxr-xr-x 1 deen deen 2.0M May 16 00:26 DDNet-Server.exe*
-rwxr-xr-x 1 deen deen 271K May 16 00:26 dilate.exe*
-rwxr-xr-x 1 deen deen 289K May 16 00:26 map_convert_07.exe*
-rwxr-xr-x 1 deen deen 261K May 16 00:26 map_diff.exe*
-rwxr-xr-x 1 deen deen 278K May 16 00:26 map_extract.exe*
```

## 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 if it works standalone, system.c especially
- [ ] 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)


5138: No gold preference (fixes #5136) r=heinrich5991 a=def-

`@Kaffeine` lld is used on some systems, we also have instructions for mold in readme, both are faster than gold.

## 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 if it works standalone, system.c especially
- [ ] 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: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-05-18 07:12:29 +00:00
bors[bot] bae4324ea1
Merge #5140
5140: Enable clang-tidy's modernize-use-override (fixes #5139) r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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>
Co-authored-by: Chairn <chairn.nq@hotmail.fr>
2022-05-18 06:50:23 +00:00
Dennis Felsing 402cccf8f2 Add override in code behind CONF_DISCORD, disable clang-tidy check 2022-05-18 01:19:35 +02:00
Chairn 583d6e6c01 Mark virtual function as override using a script:
while IFS= read -r line; do file=${line%%:*}; lineno=$(echo $line | cut
-d':' -f2); echo "Treating $file line $lineno"; sed -i -e
"${lineno}s/virtual //" -e "${lineno}s/);\$/) override;/" -e
"${lineno}s/)\$/) override/" -e "${lineno}s/const\$/const override/" -e
"${lineno}s/) {/) override {/" -e "${lineno}s/) const {/) const override
{/" -e "${lineno}s/const;$/const override;/" "$file"; done < a
2022-05-17 23:47:32 +02:00
Robert Müller 4036cda4e3 Handle file/pipe stdout and add fallback on Windows 2022-05-17 22:37:43 +02:00
Dennis Felsing 8d5693d483 Enable clang-tidy's modernize-use-override (fixes #5139)
except for destructors
2022-05-17 20:33:29 +02:00
Dennis Felsing 5947755c99 Fix unread variable clang-tidy warning on macOS
src/engine/client/backend_sdl.cpp:580:3: warning: Value stored to 'RetBackendType' is never read [clang-analyzer-deadcode.DeadStores]
                RetBackendType = BACKEND_TYPE_OPENGL_ES;
                ^                ~~~~
2022-05-17 20:31:25 +02:00
bors[bot] 47874fb57f
Merge #5085
5085: New DDRace HUD r=def- a=C0D3D3V

If you want to test this PR, you have to test it on a Server that includes this PR too.

Textures are made by Ravie 

Here a showcase video with most parts shown: https://youtu.be/gPTVj-s3pgc 

Added to the new HUD
- A display of the weapons available to the player
- The weapon the player is carrying is highlighted
- Indicators for the special abilities of the player (Endless Hook, Endless Jumps, Jetpack, Teleport Weapons)
- Indicators for abilities taken away from the player (Deep/Life Freeze, No Hook, No Weapons collision, No Collision)
- Control indicators for dummy controls (dummy hammer, dummy copy) (bottom right)
- Jump indicator (max 10 jumps ar displayed, and greyed out as soon as a jump is used) 
- Ninja status bar that indicates how long a player is capable of using ninja (next to the ninja sword)
- Freeze status bar that indicates the thawing time of a player (below player)
- Movement Information can be displayed in a clean way above the mini score HUD (Position, Speed, Target Angle)
- Indicator if you are in practice mode

The complete HUD also works for players you spectate

I Added a new NetObj since the predicted values are not perfect and would make the display of the information a lot less good: DDNetCharacterDisplayInfo that contains the following information
```
NetIntRange("m_JumpedTotal", -2, 255),
NetTick("m_NinjaActivationTick"),
NetTick("m_FreezeTick"),
NetBool("m_IsInFreeze"),
NetBool("m_IsInPracticeMode"),

NetIntAny("m_TargetX"),  # used for the Movement Information display
NetIntAny("m_TargetY"),
NetIntAny("m_RampValue"),
```
So if someone has an idea what data we could also need in the client for making the display more nice, now is the right moment to add more data to this network object.

A few screenshots:
Assets Tab:
![grafik](https://user-images.githubusercontent.com/14315968/167703792-f0fa86be-159d-4e11-baf4-9539cee38aae.png)
HUD Settings:
![grafik](https://user-images.githubusercontent.com/14315968/167704336-dc7a314e-5603-40a2-98b4-9c03377906dd.png)
Mini Debug HUD:
![grafik](https://user-images.githubusercontent.com/14315968/168302791-c377d93e-33a2-4eb2-9d8d-b78f0808a009.png)
Speed.X is calculated using the players ramp vaule


## 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 if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-05-16 22:23:08 +00:00
c0d3d3v d6833b6fd6
fix jump display 2022-05-16 23:17:19 +02:00
c0d3d3v 796b2add95
Fix Weapon Shields rendering and Clean up Sprite Offsets in items.cpp 2022-05-16 15:31:46 +02:00
def dc03f410ad Disable IPO on mingw win32
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: /usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld: DWARF error: could not find variable specification at offset 378
/usr/lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/lib/../lib/libstdc++.a(string-inst.o): in function `ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag':
/build/mingw-w64-gcc/src/build-i686-w64-mingw32/i686-w64-mingw32/libstdc++-v3/include/bits/basic_string.tcc:206: multiple definition of `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag)';
glsl_shader_compiler.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag+0x0): first defined here
...
2022-05-16 10:12:43 +02:00
def bbb1b42bb5 Fix -Walloc-size-larger-than= in maplayers.cpp
Fails on Linux x86 with IPO:

In member function '_ZN10CMapLayers17STileLayerVisuals4InitEjj.part.18',
    inlined from 'OnMapLoad' at /ddnet-source-steam/src/game/client/components/maplayers.cpp:301:6:
/ddnet-source-steam/src/game/client/components/maplayers.cpp:312:74: warning: argument 1 value '4294967295'
 exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
   m_pBorderTop = new CMapLayers::STileLayerVisuals::STileVisual[Width - 2];
                                                                          ^
2022-05-16 00:53:55 +02:00
bors[bot] a041ff8aed
Merge #5069
5069: Some HTTP fixes factored out of the HTTP masterserver PR r=def- a=heinrich5991

CC #5064

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-05-15 22:20:11 +00:00
bors[bot] fadcb344e4
Merge #5132
5132: Refactoring: Use std::swap in editor r=heinrich5991 a=Robyt3

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-15 20:31:11 +00:00
bors[bot] 61cca6ca16
Merge #5131
5131: Remove base/tl/base.h r=heinrich5991 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-15 20:11:13 +00:00
Robert Müller f0df8ad85a Use std::swap in editor 2022-05-15 21:00:14 +02:00
Robert Müller aeb8790649 Remove base/tl/base.h 2022-05-15 20:36:16 +02:00
Robert Müller f634f66008 Fix memory leaks in auto stat CSV output, refactoring
And fix stringop-overflow warning:

In function 'str_copy',
    inlined from 'FormatStats' at src\game\client\components\statboard.cpp:541:10:
src\base\system.cpp:2524:16: warning: 'strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=]
 2524 |         strncat(dst, src, dst_size - 1);
      |                ^
src\game\client\components\statboard.cpp: In member function 'FormatStats':
src\base\system.cpp:2557:27: note: length computed here
 2557 |         return (int)strlen(str);
      |                           ^
2022-05-15 20:24:26 +02:00
Robert Müller 53f4001fb1 Fix stringop-overflow warning
In function 'str_copy',
    inlined from 'GetServerInfo' at src\engine\client\client.cpp:951:11,
    inlined from 'GetServerInfo' at src\engine\client\client.cpp:946:6:
src\base\system.cpp:2524:16: warning: 'strncat' specified bound 13 equals source length [-Wstringop-overflow=]
 2524 |         strncat(dst, src, dst_size - 1);
      |                ^
2022-05-15 19:45:14 +02:00
Robert Müller 52100dbbe7 Use qualified std::swap only 2022-05-15 19:25:36 +02:00
Robert Müller 535fbd28fa Replace usages of tl_assert with dbg_assert 2022-05-15 19:25:18 +02:00
bors[bot] f3e8984bfc
Merge #5126
5126: Fix /cmdlist output not being shown in chat r=def- a=ChillerDragon

## 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-15 11:40:50 +00:00
ChillerDragon 2693eff72e Show "No such command" and "Invalid arguments" 2022-05-15 13:37:30 +02:00
ChillerDragon 0ff129a19e Fix /cmdlist output not being shown in chat 2022-05-15 13:24:57 +02:00
bors[bot] e346e3e186
Merge #5072
5072: Updated unicode script generation (fixes https://github.com/ddnet/ddnet/issues/5017) r=def- a=Chairn

I also updated the version to 15.0.0. However, confusables are still from version 14 as https://www.unicode.org/Public/security/15.0.0/ is empty.

CC `@heinrich5991` 

## 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 if it works standalone, system.c especially
- [ ] 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: Chairn <chairn.nq@hotmail.fr>
2022-05-15 11:17:15 +00:00
bors[bot] 450e6a53f7
Merge #5125
5125: Fix server loading map twice on startup r=def- a=Zwelf

Fixes creating two teehistorian files. And probably increases performance :). Fixes #5121 

## 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 if it works standalone, system.c especially
- [ ] 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: Zwelf <zwelf@strct.cc>
2022-05-14 19:58:21 +00:00
Zwelf 8385726a5f Fix server loading map twice on startup 2022-05-14 21:50:03 +02:00
bors[bot] 1110e1592a
Merge #5123
5123: Add Cellegen, srdante, Nouaa to credits r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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: def <dennis@felsin9.de>
2022-05-14 18:47:39 +00:00
def 17fe0ec8e3 Add Cellegen, srdante, Nouaa to credits 2022-05-14 19:56:08 +02:00
bors[bot] 3d244b728d
Merge #5122
5122: Cleanup CRenderTools r=heinrich5991 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-14 17:41:04 +00:00
Robert Müller 51d0d76e11 Rename parameters id -> Id 2022-05-14 19:08:43 +02:00
bors[bot] 92be4a67d7
Merge #4959
4959: Revert "CGameClient::LoadMapSettings: Load the default tuning params … r=heinrich5991 a=def-

…by default"

This reverts commit 754562ce0b.

This breaks rendering for ddnet mode, thanks to cheeser0613 for report

`@Kaffeine` I'd prefer to have it working with DDNet instead of vanilla. A fix that doesn't break DDNet demos would be welcome.

## 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-14 16:31:54 +00:00
bors[bot] 6eab58fa24
Merge #5120
5120: Add basic driver version parsing for Vulkan r=def- a=Jupeyy

From 5c3986798a/includes/functions.php (L364)

I dunno how reliable that is, but https://gpuinfo.org is quite good, so probs reliable enough for our needs :D

Similar to how OpenGL also prints the driver version in the GL_VERSION string. Can be quite useful and is easier for the end user

## 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-14 15:34:11 +00:00
Jupeyy 77196ed571 Add basic driver version parsing for Vulkan 2022-05-14 14:06:06 +02:00
Robert Müller 25c4270cb4 Fix comments 2022-05-14 13:44:12 +02:00
Robert Müller 485d61d4f8 Use std::swap 2022-05-14 13:43:26 +02:00
Robert Müller 1690a9703d Rename variable cs -> ColorScale 2022-05-14 13:40:46 +02:00
Robert Müller 3708abe8e0 Remove CRenderTools' pointers to CUI and CGameClient 2022-05-14 13:31:07 +02:00
bors[bot] ec75563dad
Merge #5109 #5110 #5112 #5115 #5117
5109: Only print zone messages when there is one r=heinrich5991 a=def-

```
src/game/server/entities/character.cpp: In member function ‘void CCharacter::SendZoneMsgs()’:
src/game/server/entities/character.cpp:2013:78: warning: the address of ‘CGameContext::m_aaZoneLeaveMsg’ will never be NULL [-Waddress]
 2013 |         if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld])
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from src/game/server/entities/character.cpp:7:
src/game/server/gamecontext.h:179:14: note: ‘CGameContext::m_aaZoneLeaveMsg’ declared here
  179 |         char m_aaZoneLeaveMsg[NUM_TUNEZONES][256];
      |              ^~~~~~~~~~~~~~~~
src/game/server/entities/character.cpp:2028:53: warning: the address of ‘CGameContext::m_aaZoneEnterMsg’ will never be NULL [-Waddress]
 2028 |         if(GameServer()->m_aaZoneEnterMsg[m_TuneZone])
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/game/server/gamecontext.h:178:14: note: ‘CGameContext::m_aaZoneEnterMsg’ declared here
  178 |         char m_aaZoneEnterMsg[NUM_TUNEZONES][256]; // 0 is used for switching from or to area without tunings
      |              ^~~~~~~~~~~~~~~~
```
<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


5110: Assert client id in SetSolo r=heinrich5991 a=def-

I could not find a way that an invalid client ID is used here, but
compiler warns anyway:
```
In member function ‘void CTeamsCore::SetSolo(int, bool)’,
    inlined from ‘void CCharacter::SetSolo(bool)’ at src/game/client/prediction/entities/character.cpp:29:22,
    inlined from ‘void CCharacter::HandleTiles(int)’ at src/game/client/prediction/entities/character.cpp:882:10:
src/game/teamscore.h:45:34: warning: array subscript [0, 63] is outside array bounds of ‘bool [64]’ [-Warray-bounds]
   45 |                 m_IsSolo[ClientID] = Value;
      |                 ~~~~~~~~~~~~~~~~~^
src/game/teamscore.h: In member function ‘void CCharacter::HandleTiles(int)’:
src/game/teamscore.h:27:14: note: while referencing ‘CTeamsCore::m_IsSolo’
   27 |         bool m_IsSolo[MAX_CLIENTS];
      |              ^~~~~~~~
```
<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


5112: Update traditional_chinese.txt r=def- a=Cheeser0613

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


5115: Update simplified_chinese.txt r=def- a=Cheeser0613

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


5117: Update tooltip text after changing language r=Jupeyy a=def-

Thanks to cheeser0613 for report

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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: def <dennis@felsin9.de>
Co-authored-by: Cheeser0613 <54943099+Cheeser0613@users.noreply.github.com>
2022-05-14 11:15:03 +00:00
bors[bot] 8fa59061ce
Merge #5116
5116: Move create/destroy window ntf dbg_msg to log_debug r=def- a=Jupeyy

Most messages in the backend are warnings.
At least these two are send every time you minimize/maximize the window, so kinda annoying 


## 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-14 10:50:55 +00:00
def 0f2d464dbf Update tooltip text after changing language
Thanks to cheeser0613 for report
2022-05-14 12:49:12 +02:00
Jupeyy 4268f891fc Move create/destroy window ntf dbg_msg to log_debug 2022-05-14 12:48:41 +02:00
def 2f68b50fe1 Assert client id in SetSolo
I could not find a way that an invalid client ID is used here, but
compiler warns anyway:

In member function ‘void CTeamsCore::SetSolo(int, bool)’,
    inlined from ‘void CCharacter::SetSolo(bool)’ at src/game/client/prediction/entities/character.cpp:29:22,
    inlined from ‘void CCharacter::HandleTiles(int)’ at src/game/client/prediction/entities/character.cpp:882:10:
src/game/teamscore.h:45:34: warning: array subscript [0, 63] is outside array bounds of ‘bool [64]’ [-Warray-bounds]
   45 |                 m_IsSolo[ClientID] = Value;
      |                 ~~~~~~~~~~~~~~~~~^
src/game/teamscore.h: In member function ‘void CCharacter::HandleTiles(int)’:
src/game/teamscore.h:27:14: note: while referencing ‘CTeamsCore::m_IsSolo’
   27 |         bool m_IsSolo[MAX_CLIENTS];
      |              ^~~~~~~~
2022-05-14 11:28:01 +02:00
def b557e25650 Only print zone messages when there is one
src/game/server/entities/character.cpp: In member function ‘void CCharacter::SendZoneMsgs()’:
src/game/server/entities/character.cpp:2013:78: warning: the address of ‘CGameContext::m_aaZoneLeaveMsg’ will never be NULL [-Waddress]
 2013 |         if(m_TuneZoneOld >= 0 && GameServer()->m_aaZoneLeaveMsg[m_TuneZoneOld])
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
In file included from src/game/server/entities/character.cpp:7:
src/game/server/gamecontext.h:179:14: note: ‘CGameContext::m_aaZoneLeaveMsg’ declared here
  179 |         char m_aaZoneLeaveMsg[NUM_TUNEZONES][256];
      |              ^~~~~~~~~~~~~~~~
src/game/server/entities/character.cpp:2028:53: warning: the address of ‘CGameContext::m_aaZoneEnterMsg’ will never be NULL [-Waddress]
 2028 |         if(GameServer()->m_aaZoneEnterMsg[m_TuneZone])
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
src/game/server/gamecontext.h:178:14: note: ‘CGameContext::m_aaZoneEnterMsg’ declared here
  178 |         char m_aaZoneEnterMsg[NUM_TUNEZONES][256]; // 0 is used for switching from or to area without tunings
      |              ^~~~~~~~~~~~~~~~
2022-05-14 11:18:08 +02:00
def cfe8cce91d Add translation string "Adjust the opacity..."
Reported by cheeser0613
2022-05-14 11:05:32 +02:00
bors[bot] e9b59e72ff
Merge #5103
5103: Remove unused DoButtonLogic pText argument r=def- a=Robyt3

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-13 23:02:29 +00:00
bors[bot] 497d47044a
Merge #5102
5102: Enhance teehistorian test output a bit r=def- a=Zwelf

Looks cleaner now, e.g. for TeamPractice:

```
[ RUN      ] TeeHistorian.TeamPractice
pOutput = {
	0x41, 0x00, 0x4a, 0x57, 0x92, 0x83, 0x4e, 0x81, 0xd1, 0x34
	0xc9, 0xa2, 0x9b, 0xb5, 0xff, 0x25, 0xda, 0xc3, 0xbc, 0x02
	0x17, 0x01, 0x41, 0x00, 0x4a, 0x57, 0x92, 0x83, 0x4e, 0x81
	0xd1, 0x34, 0xc9, 0xa2, 0x9b, 0xb5, 0xff, 0x25, 0xda, 0xc3
	0xbc, 0x02, 0x01, 0x01, 0x4a, 0x57, 0x92, 0x83, 0x4e, 0x81
	0xd1, 0x34, 0xc9, 0xa2, 0x9b, 0xb5, 0xff, 0x25, 0xda, 0xc3
	0xbc, 0x02, 0x17, 0x00, 0x40
}
[       OK ] TeeHistorian.TeamPractice (0 ms)
```

## 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 if it works standalone, system.c especially
- [ ] 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: Zwelf <zwelf@strct.cc>
2022-05-13 22:45:12 +00:00
Robert Müller fc93ba0539 Remove unused DoButtonLogic pText argument 2022-05-14 00:26:15 +02:00
Zwelf 7ada897478 Enhance teehistorian test output a bit
Looks cleaner now, e.g. for TeamPractice:

```
[ RUN      ] TeeHistorian.TeamPractice
pOutput = {
	0x41, 0x00, 0x4a, 0x57, 0x92, 0x83, 0x4e, 0x81, 0xd1, 0x34
	0xc9, 0xa2, 0x9b, 0xb5, 0xff, 0x25, 0xda, 0xc3, 0xbc, 0x02
	0x17, 0x01, 0x41, 0x00, 0x4a, 0x57, 0x92, 0x83, 0x4e, 0x81
	0xd1, 0x34, 0xc9, 0xa2, 0x9b, 0xb5, 0xff, 0x25, 0xda, 0xc3
	0xbc, 0x02, 0x01, 0x01, 0x4a, 0x57, 0x92, 0x83, 0x4e, 0x81
	0xd1, 0x34, 0xc9, 0xa2, 0x9b, 0xb5, 0xff, 0x25, 0xda, 0xc3
	0xbc, 0x02, 0x17, 0x00, 0x40
}
[       OK ] TeeHistorian.TeamPractice (0 ms)
```
2022-05-13 23:36:05 +02:00
Robert Müller ca091d87b2 Support nesting editboxes, pickers and scrollbars in clipping areas 2022-05-13 21:39:25 +02:00
Robert Müller 1e8278ca95 Smooth clipping when scrolling in controls settings 2022-05-13 21:38:02 +02:00
Robert Müller 8c7cdb5936 Rename UiDoGetButtons to DoSettingsControlsButtons 2022-05-13 21:38:01 +02:00
Robert Müller 60347fde1a Use MouseHovered instead of clipping manually 2022-05-13 21:38:01 +02:00
Robert Müller 7bda9d4118 Fix variable spelling CheckAble -> Checkable 2022-05-13 20:46:54 +02:00
Robert Müller 8d12529f1e Move variable declaration 2022-05-13 20:46:54 +02:00
Robert Müller cae2b49ed6 Reuse MouseInside variable 2022-05-13 20:46:54 +02:00
Robert Müller 0f6572ebf6 Rename static variables ButtonUsed -> s_ButtonUsed 2022-05-13 20:46:54 +02:00
Robert Müller 6241c8483d Use bool instead of int with MouseInside 2022-05-13 20:46:50 +02:00
Robert Müller a248822ea5 Add CUI:MouseHovered and MouseInsideClip 2022-05-13 20:24:10 +02:00
Robert Müller 1855b4aea1 Support nested CUI clipping regions 2022-05-13 20:20:04 +02:00
heinrich5991 8049d64964 Add @Learath2's suggestion about buffer size handling 2022-05-13 13:57:35 +02:00
bors[bot] d87edb9b41
Merge #5089
5089: Render tees in skin selector with default emote r=def- a=sjrc6

suggested in https://github.com/ddnet/ddnet/issues/5057
works for player and dummy

![image](https://user-images.githubusercontent.com/22122579/167973498-bccaac07-756e-4e59-a19d-66d3e24542d0.png)

## 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 if it works standalone, system.c especially
- [ ] 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: Tater <Mr.Potatooh@gmail.com>
2022-05-13 08:24:15 +00:00
bors[bot] bab2defc26
Merge #5093
5093: Fix /practice chat responses and a few others r=Learath2 a=heinrich5991

Fixes #5087.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-05-13 07:58:07 +00:00
bors[bot] e4ed71f3ef
Merge #5088
5088: do not assert on entities without snap id r=heinrich5991 a=C0D3D3V

fixes #5054

## 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 if it works standalone, system.c especially
- [ ] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-05-13 07:34:22 +00:00
heinrich5991 15e3a0193f Fix version number for curl bug workaround
0x076800 corresponds to version 0x7.0x68.0x0 = 7.104.0, not 7.68.0 =
0x7.0x44.0x0, so we need 0x074400 instead.
2022-05-13 09:16:15 +02:00
heinrich5991 c9136121f2 Add HTTP header and plain HTTP post feature 2022-05-13 09:16:15 +02:00
heinrich5991 40bd85b552 Refactor HTTP code to no longer use inheritance
This gives us the same API interface for all different request types
(HEAD, GET, POST).
2022-05-13 09:16:15 +02:00
heinrich5991 0c2bb5a549 Fix /practice chat responses and a few others
Fixes #5087.
2022-05-13 09:14:05 +02:00
heinrich5991 b9e255a7a1 Mark dbg_break as [[noreturn]] 2022-05-13 09:04:39 +02:00
heinrich5991 246f213905 Remove a couple of game/-includes from the engine code 2022-05-13 09:04:39 +02:00
heinrich5991 1b233ab95c Add the HTTP client methods to the server 2022-05-13 09:04:39 +02:00
heinrich5991 14803d7605 Remove HTTP include from demoedit 2022-05-13 09:00:48 +02:00
heinrich5991 52d0dc8b5b Add functions to encode/decode base64 2022-05-13 09:00:48 +02:00
Tater b6a9389fe8 Render tees in skin selector with default emote 2022-05-12 17:17:19 -05:00
Zwelf 30f67573f4 Output corresponding array to EXPECTED in teehistorian test cases 2022-05-12 16:21:13 +02:00
c0d3d3v ed03945685
do not assert on entities without snap id 2022-05-12 11:28:21 +02:00
Jupeyy 915a27d803 Use dynamically allocated memory for the CacheChunk 2022-05-11 17:32:03 +02:00
c0d3d3v fa2ac1bb64
Merge branch 'master' into New_HUD
* master: (87 commits)
  Remove base/tl/string.h
  Replace remaining usage of base/tl/string with std::string
  Remove unused includes of base/tl/string.h
  Store localized strings in a CHeap instead of using tl/string.h
  Mark methods as const
  Add CHeap::StoreString method
  Rules are chat responses too
  Add margins to demo slice popup, decrease error font size, UI scaling
  Remove redundant parameters which are overridden later
  Use Margin instead of both VMargin and HMargin
  Move variable declaration
  Only output messages intended for chat to the user of a chat command
  Remove unused chat response variables
  Don't print the first "Waiting for score threads to complete"
  fix usage of undefined behavior for default eyes
  remove duplicate HOOK_RETRACTED assignment
  do not send swap request notification to complete team 0
  make swap messages more personal
  Move ninja shield to other position (fixes #5047)
  do not release the hooks if you swap
  ...
2022-05-10 19:03:09 +02:00
c0d3d3v 0c4dfb694c
Add Options for new HUD
- Change FontSize of MovementInfo to 6 and add a little morre padding at
  the sides
2022-05-10 18:41:46 +02:00
Chairn 2cb4a4d8f5 Changed file names to match classic source.c include header.h 2022-05-07 00:54:29 +02:00
Robert Müller 22562094bd Remove base/tl/string.h 2022-05-07 00:17:29 +02:00
Robert Müller a1d092be27 Replace remaining usage of base/tl/string with std::string 2022-05-07 00:17:29 +02:00
Robert Müller dee7393555 Remove unused includes of base/tl/string.h 2022-05-07 00:02:43 +02:00
Robert Müller 3e1cfcd306 Store localized strings in a CHeap instead of using tl/string.h 2022-05-07 00:02:43 +02:00
Robert Müller e2a049f0ca Mark methods as const 2022-05-06 23:24:58 +02:00
Robert Müller bc5f46e136 Add CHeap::StoreString method 2022-05-06 23:21:26 +02:00
Chairn 5925181acc Updated unicode script generation 2022-05-06 20:31:24 +02:00
Dennis Felsing b42fad604e Rules are chat responses too
Thanks to bencie for report
2022-05-06 00:12:03 +02:00
bors[bot] 14927684eb
Merge #5060
5060: Only output messages intended for chat to the user of a chat command r=def- a=heinrich5991

Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.

## 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 if it works standalone, system.c especially
- [ ] 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: heinrich5991 <heinrich5991@gmail.com>
2022-05-01 15:01:02 +00:00
bors[bot] 21433f7553
Merge #5061
5061: Improve demo slice popup, minor refactoring of UI/menus r=def- a=Robyt3

Improve demo slice popup:
- add more margins
- decrease font size of error message slightly
- correct handling of all allowed UI scale values:
   - fix overlapping elements on some UI scales by laying out all CUIRects (except the buttons) from top to bottom
   - make `New name:` label scaled

Refactoring:
- Use `CUI::Margin` instead of both `HMargin` and `VMargin`, when the margin value is identical.
- Pass 0 instead of CUIRect pointer in some cases where the value is never used, i.e. never read and overridden in the next line.

Before:

![screenshot_2022-05-01_00-18-26](https://user-images.githubusercontent.com/23437060/166140703-1050b122-bb8f-49a4-b398-f7b0b6e677a7.png)

After:

![screenshot_2022-05-01_12-05-00](https://user-images.githubusercontent.com/23437060/166141455-50876142-13f9-4563-af0f-9f78a519ed60.png)

Tested with `ui_scale 50/90/100/110/150`.

## 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 if it works standalone, system.c especially
- [ ] 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>
2022-05-01 10:28:41 +00:00
bors[bot] 68b6027114
Merge #5037
5037: Add logging macros `log_{error,warn,info,debug,trace}` r=def- a=heinrich5991

This makes it almost as short to log as with `dbg_msg` (one to two more
characters), and much shorter than
`Console()->Print(IConsole::OUTPUT_LEVEL_{STANDARD,ADDINFO,DEBUG})`.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-05-01 10:10:22 +00:00
Robert Müller cc9ed7e9d3 Add margins to demo slice popup, decrease error font size, UI scaling 2022-05-01 12:03:56 +02:00
Robert Müller f4642472b2 Remove redundant parameters which are overridden later 2022-05-01 11:40:26 +02:00
Robert Müller a1614e4709 Use Margin instead of both VMargin and HMargin 2022-05-01 11:40:21 +02:00
Robert Müller e291a3a70c Move variable declaration 2022-05-01 11:38:58 +02:00
heinrich5991 d5f8bc2783 Only output messages intended for chat to the user of a chat command
Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.
2022-05-01 11:18:22 +02:00
heinrich5991 4061069b73 Remove unused chat response variables 2022-05-01 11:18:22 +02:00
heinrich5991 23ef309d0a Don't print the first "Waiting for score threads to complete"
Looks nicer IMO if you don't show the message if there's no actual
waiting.
2022-05-01 11:10:15 +02:00
Tater 488b781f79 fix usage of undefined behavior for default eyes
fix using the same buffer as dest and source.
2022-05-01 03:04:10 -05:00
bors[bot] 567aeb7d9e
Merge #5049
5049: do not release the hooks if you swap r=C0D3D3V a=C0D3D3V

Needs more testing, but first test looks good
https://streamable.com/ypra11

## 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 if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-30 20:09:20 +00:00
c0d3d3v a289503411
remove duplicate HOOK_RETRACTED assignment 2022-04-30 21:41:13 +02:00
c0d3d3v eae74fe91e
do not send swap request notification to complete team 0 2022-04-30 21:24:25 +02:00
c0d3d3v 808526bdd8
make swap messages more personal 2022-04-30 12:16:38 +02:00
c0d3d3v 0ea811f70e
do not release the hooks if you swap 2022-04-30 10:21:38 +02:00
Edgar 4b25f8d63e
fix tooltips rendering when they shouldn't, fixes #5035 2022-04-30 10:05:28 +02:00
Dennis Felsing 1376dc2aa7 Revert "Get rid of optional, not available on Debian9 build"
This reverts commit 4e3d5c5626.

Should work again with clang++-7 and libc++-7. See
2534d627ac
2022-04-30 01:01:39 +02:00
Robert Müller da44ecd6eb Fix flashing colors in console when scrolling up continuously 2022-04-29 17:51:10 +02:00
bors[bot] ca4b6222da
Merge #5013
5013: Unify logging infrastructure between `IConsole` and `dbg_msg` r=def- a=heinrich5991

This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-04-29 14:17:07 +00:00
Jupeyy 53cb36bbe7 Fix wrong quad offset for (not caused by transparent) flushes 2022-04-29 15:51:25 +02:00
heinrich5991 b20f16059d Add logging macros log_{error,warn,info,debug,trace}
This makes it almost as short to log as with `dbg_msg` (one to two more
characters), and much shorter than
`Console()->Print(IConsole::OUTPUT_LEVEL_{STANDARD,ADDINFO,DEBUG})`.
2022-04-29 15:32:42 +02:00
heinrich5991 fa4bcd5ec0 Unify logging infrastructure between IConsole and dbg_msg
This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.
2022-04-29 15:21:26 +02:00
Edgar 2fca2872b4
Merge branch 'master' into pr/system/documentation 2022-04-29 10:26:45 +02:00
bors[bot] 98bf721587
Merge #4726 #4727 #4728 #4880 #5022
4726: Display super with "super" string in scoreboard (fixes #4724) r=heinrich5991 a=def-

instead of showing the number 64

Alternative to https://github.com/ddnet/ddnet/pull/4725

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


4727: Increase MAX_IDS to 32k (fixes #4723) r=heinrich5991 a=def-

Not sure I like it, otherwise we have to edit Game City.

Maybe we should fail this in map editor already instead of allowing to
create a map which requires > MAX_IDS

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


4728: Implement shields that remove specific weapon (fixes #4572) r=heinrich5991 a=def-

Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display (see screenshot), maybe someone can
quickly spot what I'm doing wrong

<img width="898" alt="Screenshot 2022-02-18 at 00 50 14" src="https://user-images.githubusercontent.com/2335377/154591108-d89cb475-daaf-4a6a-9748-17160a1e71a2.png">

## 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 if it works standalone, system.c especially
- [ ] 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)


4880: Add mysql to github workflow in ubuntu 20.04 r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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)


5022: Use std::clamp r=heinrich5991 a=def-

Not sure if we want to, there are some easy functions like this we could
take from stdlib now

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-29 00:30:17 +00:00
bors[bot] 90c61b0812
Merge #4692
4692: Allow sv_show_others_default in map settings r=heinrich5991 a=def-

for tutorial map

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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>
2022-04-29 00:10:02 +00:00
Dennis Felsing ae1c63f33d Try adding mysql to github workflow in ubuntu 20.04
Remove my_bool, has been removed in MySQL 8.0
2022-04-28 18:23:23 +02:00
Dennis Felsing 6a7c7ff4cc Use std::gcd 2022-04-28 17:01:53 +02:00
Dennis Felsing 67286a4971 Remove unused sign() (C++11 has signbit) 2022-04-28 17:01:51 +02:00
Dennis Felsing af0fcf8773 Use std::clamp
Not sure if we want to, there are some easy functions like this we could
take from stdlib now
2022-04-28 17:01:30 +02:00
Jupeyy b8da817716 Return the quad offset of the first added quad, when adding new quads 2022-04-28 16:50:18 +02:00
Dennis Felsing 298287fb4e Implement shields that remove specific weapon (fixes #4572)
Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display, maybe someone can
quickly spot what I'm doing wrong
2022-04-28 16:49:32 +02:00
Dennis Felsing 15b8dc8d64 Remove dots in tooltip texts 2022-04-28 16:46:18 +02:00
Dennis Felsing 3ca86ee128 Display super with "super" string in scoreboard (fixes #4724)
instead of showing the number 64
2022-04-28 16:40:20 +02:00
def 487abbe1b7 Enable swapping in team 0 2022-04-28 16:35:46 +02:00
bors[bot] a8b842277a
Merge #5019
5019: remove cl_predict_ddrace r=heinrich5991 a=C0D3D3V

Since most of the predict code is only ddrace relevant anyway, I would suggest removing the cl_predict_ddrace option instead of checking if m_WorldConfig.m_PredictDDRace is set everywhere ddrace stuff is predicted. 

in case of conflicts with physics from other mods, the check on m_WorldConfig.m_PredictDDRace must however be implemented in the appropriate places (for example for the freeze and unfreeze functions). But since there are currently no conflicts apparently, this is sufficient for now.

fixes the bug I reported here: https://discord.com/channels/252358080522747904/293493549758939136/968114944878989363

`@trml`  what do you think about this?

## 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 if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-28 12:34:04 +00:00
bors[bot] 6cce22d056
Merge #4813 #4905
4813: Don't allow infinite shotgun bounce (fixes #4809) r=heinrich5991 a=def-

I hope this kind of physic isn't used anywhere, I couldn't trigger it without being stuck in wall.

## 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 if it works standalone, system.c especially
- [ ] 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)


4905: Fix move_sqlite (fixes #4902) r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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: def <dennis@felsin9.de>
2022-04-28 12:11:05 +00:00
bors[bot] 7a7e291dcf
Merge #4509
4509: Switch new players to DDNet config dir, support Teeworlds as fallback r=heinrich5991 a=def-

This way new players will get DDNet directory, old ones can switch
directory if they want, or keep using the old one.

If we ever enforce a switch in a future version, this will make it
easier since older DDNet versions will also support the DDNet directory
already.

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-04-28 11:53:12 +00:00
c0d3d3v 1a162c08be
remove unnecessary loop over the possible modifier combinations 2022-04-28 08:45:25 +02:00
bors[bot] e3eeec762d
Merge #4997
4997: Add option to change default eyes when joining server r=def- a=sjrc6

Risky Feat suggested this idea to me, I also thought it was good so I implemented it. 

If you press one of the eyes in the settings it will change which eyes you get when you join a server.

It saves a separate variable for dummy/player.

It will also change your eyes anytime you press one of them, but only if you are playing as the same Tee whose eyes you are trying to change. If someone could figure out the best way to make it change the opposite Tees eyes as well that would be nice but I don't think it's necessary. 

It also changes the "Your Skin:" Tee eyes on the left if you have one selected. 

I had to change the cl_run_on_join code a bit, I tested and I don't think it should ever break anything but it might be good for someone to double check. 

![image](https://user-images.githubusercontent.com/22122579/163762410-ec7aa67d-6417-433d-8707-e21cda2bcd5f.png)



## 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 if it works standalone, system.c especially
- [ ] 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: Tater <Mr.Potatooh@gmail.com>
2022-04-27 07:42:59 +00:00
bors[bot] 3d183fc16d
Merge #5027
5027: Fix tooltip locations after window resize (fixes #5026) r=edg-l a=def-

<!-- What is the motivation for the changes of this 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 if it works standalone, system.c especially
- [ ] 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>
2022-04-27 06:05:59 +00:00
Tater 70311d5d4f Add option for default eyes when joining server 2022-04-26 19:47:38 -05:00
Dennis Felsing c174274edc Fix tooltip locations after window resize (fixes #5026) 2022-04-27 01:00:23 +02:00
Jupeyy b23e60c077 Allow onfly FSAA change under Vulkan 2022-04-26 21:09:55 +02:00
bors[bot] d815fdfa03
Merge #5023
5023: fix WalkTime for negativ positions r=def- a=C0D3D3V

I am not sure if there is a more elegant solution, the problem is that fmod in cpp does not return a positive value. maybe we can just use a mod function that always returns positive values.

## 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 if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-26 08:49:02 +00:00
c0d3d3v bc80d83ec9
fix WalkTime for negativ positions 2022-04-26 09:58:31 +02:00
bors[bot] 6270b1c11d
Merge #5021
5021: fix clamp of m_ThreadCount r=def- a=Jupeyy

fixes #5020

## 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 if it works standalone, system.c especially
- [ ] 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>
2022-04-25 16:32:28 +00:00
bors[bot] 9e227006c0
Merge #4986
4986: Free some opengl2 pointers r=Jupeyy a=ChillerDragon

Fixes these memory leaks on my system (default opengl 3.0.3 renderer debian 11)

```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x537ebc in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1672:21
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x537ff6 in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1673:29
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x53826a in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1675:36
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x538130 in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1674:28
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8
```

## 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 if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [x] 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: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-25 16:07:05 +00:00