3268: Fix ScaleFontSize with too long strings r=Jupeyy a=def-
Thanks to PopCorn181 for report
![screenshot_2020-11-08_00-03-19](https://user-images.githubusercontent.com/2335377/98453118-d1c1ae00-2155-11eb-97cf-cd5a455c00d3.png)
<!-- What is the motivation for the changes of this pull request -->
## 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: def <dennis@felsin9.de>
3242: Enable most clang-tidy bugprone-*, misc-*, performance-* checks r=Jupeyy a=def-
Fixes#3134
## 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>
3077: UI Elements r=def- a=Jupeyy
Build will fail bcs of clang-format,
i'll update this comment to explain.
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3107: Log close error to console r=Jupeyy a=def-
3155: Add memcheck/asan/ubsan to readme r=Jupeyy a=def-
To be linked from https://github.com/ddnet/ddnet/pull/3133
Co-authored-by: def <dennis@felsin9.de>
3161: Fix texture create with multi units r=def- a=Jupeyy
~Possibly `fixes` #3104~
Ravie can you test?
Does not fix the issue.
[only affects gl 3.3]
Still is required, bcs that looks wrong
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3157: Show option to disable system messages in settings r=Jupeyy a=def-
## Summary
Makes it a bit easier to find, prefer it on a busy server. Also clarified the friend message toggle is for highlighting only.
![screenshot-20201020@182835](https://user-images.githubusercontent.com/2335377/96615964-41d0d700-1302-11eb-910e-4c56f0c8451c.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 [does not apply]
- [x] Written a unit test if it works standalone, system.c especially [does not apply]
- [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: def <dennis@felsin9.de>
3160: Make gfx_quad_as_triangle 0 default r=def- a=Jupeyy
fixes#3097
I added a TrianglesBeing/End() instead for ingame quads
Let me quickly explain why #177 failed.
In the screenshots of #177 you already see the problem
the driver can built a quad like:
![image](https://user-images.githubusercontent.com/6654924/96621122-86f80780-1308-11eb-881a-eb51bdbe558c.png)
or like:
![image](https://user-images.githubusercontent.com/6654924/96621195-a131e580-1308-11eb-91c4-cc4cab96bdfd.png)
or somehow it wants, but it will always do them as triangles
And thats why the ingame quads were basically flipped in the screenshots of #177
But this almost never matters.
Tiles are single colored, text is single colored, ui elements are single colored.
So it only matters for ingame quads probably, which specify the color of each edge
Also even if it would matter, we can simply change the quads to triangles now.
Pro:
- Generally less vertices upload
- Less vertices building on CPU side
Cons:
- nothing
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3122: Fix arithmentic problems r=def- a=Jupeyy
The first three commits are safe
The ones i'll add later will be inside the gamecore, so might alter behaviour.
I'll see which ones are critical, but takes me some time
i fixed most in #3081
3137: Add gfx debug r=def- a=Jupeyy
If someone wants to try, you have to execute the client with a config that contains dbg_gfx 1
If opengl debug is supported it will show "Enabled OpenGL debug mode" in the console
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3149: Fix memory leak on team finish and read of uninitialized data r=def- a=Zwelf
Fixes#2522, fixes#3144 and fixes second leak from #3134.
Co-authored-by: Zwelf <zwelf@strct.cc>
3139: Use NUM_DUMMYS for dummy array length r=def- a=ChillerDragon
Should make code more readable by explaining that the array is used for dummy. Also makes modders life easier if there is a need to scale up dummy count.
I left out two places that do not include client.h
3be8a592e5/src/game/client/prediction/gameworld.h (L92)3be8a592e5/src/game/gamecore.h (L212)
Moving the enum to protocol.h for example is probably not nice.
Co-authored-by: ChillerDrgon <ChillerDragon@gmail.com>
3129: Editor: Fix selection of None value in auto rules (fixes#3013) r=Jupeyy a=def-
by starting the indexing at 0
3138: Fix out of bounds access in GetSolo r=Jupeyy a=def-
As discovered in #3135
3143: Ignore ddnet-info.json dl failure again r=Jupeyy a=def-
too aggressive, might just be bad internet at the moment
Co-authored-by: def <dennis@felsin9.de>
Direct leak of 768 byte(s) in 2 object(s) allocated from:
#0 0x4e91ad in operator new(unsigned long)
#1 0x7f0c54a3bf63 in sql::mysql::MySQL_Prepared_ResultSet::getBlob(unsigned int) const (/usr/lib/x86_64-linux-gnu/libmysqlcppconn.so.7+0x77f63)
Direct leak of 8 byte(s) in 2 object(s) allocated from:
#0 0x4f08e3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f08e3)
#1 0x68c9d1 in CDataFileWriter::AddItem(int, int, int, void*) /home/teeworlds/src/master/src/engine/shared/datafile.cpp:666:33
#2 0x5e4a3e in CGameContext::OnMapChange(char*, int) /home/teeworlds/src/master/src/game/server/gamecontext.cpp:3398:10
#3 0x553473 in CServer::LoadMap(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:2235:16
#4 0x55509e in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2440:8
#5 0x561a56 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3537:21
#6 0x7f2349f3809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)