/media/ddnet/src/game/editor/layer_game.cpp:42:35: warning: qualified name 'm_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile' refers to a member overridden in subclass; did you mean 'CLayerTiles'? [bugprone-parent-virtual-call]
m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, through_cut);
^~~~~~~~~~~~~
CLayerTiles::
/media/ddnet/src/game/editor/layer_game.cpp:42:35: note: FIX-IT applied suggested code changes
As discovered by ASAN:
/home/teeworlds/src/master/src/game/server/gamecontroller.cpp:142:3: runtime error: index 65 out of bounds for type 'vec2 [64]'
#0 0x5de082 in IGameController::OnEntity(int, vector2_base<float>, int, int, int) /home/teeworlds/src/master/src/game/server/gamecontroller.cpp:142:3
#1 0x5c9f43 in CGameContext::OnInit() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:3291:20
#2 0x4ae3aa in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2473:20
#3 0x4c265d in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
#4 0x7f400fedc09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
#5 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)
How did this not blow up all day long for years?!
Found by UBSAN:
/home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29: runtime error: member call on address 0x0000013319b8 which does not point to an object of type 'CCharacter'
0x0000013319b8: note: object has invalid vptr
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
#0 0x5501de in CDragger::Move() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29
#1 0x5522c2 in CDragger::Tick() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:153:3
#2 0x5eb11e in CGameWorld::Tick() /home/teeworlds/src/master/src/game/server/gameworld.cpp:261:11
#3 0x58d660 in CGameContext::OnTick() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:751:10
#4 0x4afefe in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2558:19
#5 0x4c26fd in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
#6 0x7f2c8cc9309a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
#7 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)
3243: Fix network x_ check (thanks to Jupeyy) r=Jupeyy 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>
3237: Create fallback wordlist in sourcecode (fixes#3206) r=Learath2 a=def-
<!-- 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
- [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>
3240: Fix UUID in test case comment r=heinrich5991 a=Zwelf
for `teehistorian-ddnetver-old@ddnet.tw`
<!-- 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: Zwelf <zwelf@strct.cc>
3236: Fix grammar in autoexec_server.cfg (Credits to Blade) 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>
3235: Make bors also look at clang-format & clang-tidy 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>
3222: Kick-voting someone from team doesn't kill locked team (fixes#3207) r=heinrich5991 a=def-
<!-- 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
- [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>
3233: Fix clang-tidy in text.cpp 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>
3232: Added a Hint for Disabling Debug Mode r=def- a=TsFreddie
Added a line at the bottom of the screen when cl_debug is 1
![screenshot_2020-11-03_15-09-52](https://user-images.githubusercontent.com/3797859/97957689-ab62e200-1de6-11eb-822c-4ffaa684b06e.png)
## Checklist
- [ ] 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: TsFreddie <tsfreddiewang@gmail.com>
3117: Enable further clang-tidy checks to modernize the code r=heinrich5991 a=def-
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
And fix the code:
cmake -GNinja -DWEBSOCKETS=OFF -DMYSQL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVIDEORECORDER=ON -DAUTOUPDATE=OFF -DANTIBOT=OFF -DUPNP=OFF -DPREFER_BUNDLED_LIBS=OFF -DINFORM_UPDATE=OFF -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--fix-errors" -DCMAKE_C_CLANG_TIDY="clang-tidy;--fix-errors" .
ninja -j 1
Manually fixed sizeof(auto) in a few occurences (i.e. server.cpp:1359)
First steps for #3088
Co-authored-by: def <dennis@felsin9.de>
3231: Fix skin index r=def- a=Jupeyy
Beside that this was wrong anyway, i hoped i could atleast get the index from the sorted list insert, but that returns the last index in the list, instead of the new inserted index(just like rn), so just revert what I added in 8d6148b20b
## 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>
3228: Add m_PosEnv (of sound sources) as index that must be offset when appending a map r=heinrich5991 a=Patiga
If you append a map to another, all indices of it must be offset. This doesn't happen with the position envelope index of sound sources, meaning it would (if the original maps had at least one envelope) point to the wrong envelope.
## Checklist
- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test 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
- [ ] 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: Patiga <dev@patiga.eu>
3220: Fix overlapping of combined binds with modifiers [Fixes#3182] r=heinrich5991 a=Banana090
Just fixes https://github.com/ddnet/ddnet/issues/3182
Works as it used to work, but does not call for binds with no modifier when the same key was used already for modified bind
Co-authored-by: Дядя Женя <spy090@yandex.ru>
3221: Revert "Show halloween skins only on Halloween" r=Jupeyy a=def-
People are clearly unhappy with this event, so let's revert it. On
servers I've set events 0 already.
This reverts commit ae90bdf3f9.
## 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>