3279: Add a script to check for variable name style violations, fix some variable names r=def- a=heinrich5991
Didn't fix all variable names because there were far too many. Ideas? At least the second commit should probably go in.
## 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>
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>
3254: Warn when connecting to new server with high gametime r=heinrich5991 a=def-
as suggested by HalfNoob on Discord
<!-- 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
- [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
- [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>
3260: "Connect to" popup: Don't disconnect on enter (fixes#3259) r=Jupeyy a=def-
## 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: def <dennis@felsin9.de>
3248: Update translations for 15.2 release r=Jupeyy a=def-
## 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>
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>
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>
3204: Much more readable Call Vote menu and code r=def- a=Banana090
I find "Call Vote" menu useless af right now, because it's simply impossible to read it. So when you want to call vote for a map you open website and find the one you want, after that making /map skipping the "Call Vote" menu completely. It's useful for calling for random map btw, but anyway too ugly to look at.
**OLD LOOK**
![callvoteold](https://user-images.githubusercontent.com/39315809/97338602-a48e1980-1892-11eb-8c93-5d8656d3abeb.png)
**NEW LOOK**
![callvotenew](https://user-images.githubusercontent.com/39315809/97339380-9096e780-1893-11eb-8c3c-1f8630096d9f.png)
**NEW LOOK (RconAuted)**
![callvotenewrcon](https://user-images.githubusercontent.com/39315809/97340605-0e0f2780-1895-11eb-898b-3c3b8258cced.png)
Changed nothing, but row and text size + View rect size, because for some reason it was small for preserving space for RCON Auted users. Why?
Also changed the name of rect "Extended" to "RconExtension" to make it more clear what is it for.
Would be cool also to remove all that junk that is not actual votes from DDNet server vote list (finishers, average time) and merge it into one line with map's name.
## 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
- [ ] 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: Дядя Женя <spy090@yandex.ru>
3195: Use str_truncate more often 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>
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>
3191: Fix IME state softlock under fcitx and macos + Update DoEditBox logic to be the same as chat r=def- a=TsFreddie
IME state fix closes#3185 and closes#3150
DoEditBox update closes#3186, now cursor behave the same as chat where only one cursor (either the real one or the editing one) will be shown.
## 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: TsFreddie <tsfreddiewang@gmail.com>
3115: Smooth Camera r=def- a=TsFreddie
closes#3096
Since nobody expressed any opinions, how about we get this in and see some reactions. it is off by default anyway.
Co-authored-by: TsFreddie <tsfreddiewang@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>
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>
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>
3108: Make GL 1.5 default r=def- a=Jupeyy
If ppl see white textures its related to
#2125
and you need to revert it, bcs thats not fixable, there is no extension for GL_GENERATE_MIPMAP or smth
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3100: Fix offline client that is not in menu r=heinrich5991 a=Jupeyy
E.g. popups like "ddnet-info.json" failed will cause weird NaN glitches, bcs the impl relys on ChangePosition to clean movetime and animation start
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3101: Fix hookchains r=heinrich5991 a=Jupeyy
Its already increased by the for loop.
Might have made the hook shorter(for very very long hooks) the past 3 years xd
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
To be friendly to other implementors of the format, the CRC field is now
zeroed out instead of completely gone.
Drop support for v2 and v3 of the ghost format, the ghost files should
have been automatically converted by the client already.
/media/ddnet/src/game/editor/auto_map.cpp:94:17: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
int RunID = pCurrentConf->m_aRuns.add(NewRun);
^
and mark some false positives
/media/ddnet/src/engine/client/backend_sdl.cpp:329:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
#0 0x9f70dd in CRaceDemo::OnMessage(int, void*) src/game/client/components/race_demo.cpp:134
#1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
#2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
#3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
#4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
#5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
#6 0x557fda in main src/engine/client/client.cpp:4341
#7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
#8 0x433e29 in _start (build/DDNet+0x433e29)
src/game/client/components/ghost.cpp:600:35: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
#0 0x78201a in CGhost::OnMessage(int, void*) src/game/client/components/ghost.cpp:600
#1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
#2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
#3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
#4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
#5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
#6 0x557fda in main src/engine/client/client.cpp:4341
#7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
#8 0x433e29 in _start (build/DDNet+0x433e29)
src/game/client/components/players.cpp:197:5: runtime error: index -2 out of bounds for type 'CGameClient::CClientData [64]'
#0 0x56548eec0487 in CPlayers::RenderPlayer(CNetObj_Character const*, CNetObj_Character const*, CTeeRenderInfo const*, int, float) /media/ddnet/src/game/client/components/players.cpp:197:37
#1 0x56548ec97234 in CGhost::OnRender() /media/ddnet/src/game/client/components/ghost.cpp:344:26
#2 0x56548ef92b26 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
#3 0x56548ea4659e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
#4 0x56548ea7b90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
#5 0x56548ea9bb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#6 0x7f7c844f1151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#7 0x56548e7e8e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/game/client/components/menus_ingame.cpp:108:16: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
#0 0x55733e6a64c4 in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:108:73
#1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
#2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
#3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
#4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
#5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
#6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/game/client/components/menus_ingame.cpp:108:16 in
src/game/client/components/menus_ingame.cpp:109:14: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
#0 0x55733e6a699a in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:109:71
#1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
#2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
#3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
#4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
#5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
#6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)
src/game/client/components/skins.cpp:142:14: runtime error: -nan is outside the range of representable values of type 'int'
#0 0x55b6bd0f49e1 in CSkins::LoadSkin(char const*, char const*, int, int*) /media/ddnet/src/game/client/components/skins.cpp:142:14
#1 0x55b6bd0f0942 in CSkins::SkinScan(char const*, int, int, void*) /media/ddnet/src/game/client/components/skins.cpp:55:16
#2 0x55b6bcb33928 in fs_listdir /media/ddnet/src/base/system.c:2033:6
#3 0x55b6bcb04024 in CStorage::ListDirectory(int, char const*, int (*)(char const*, int, int, void*), void*) /media/ddnet/src/engine/shared/storage.cpp:316:5
#4 0x55b6bd0f9e2f in CSkins::Refresh() /media/ddnet/src/game/client/components/skins.cpp:222:13
#5 0x55b6bd0f6e33 in CSkins::OnInit() /media/ddnet/src/game/client/components/skins.cpp:194:2
#6 0x55b6bd14c63f in CGameClient::OnInit() /media/ddnet/src/game/client/gameclient.cpp:322:28
#7 0x55b6bcc5f9f8 in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3089:16
#8 0x55b6bcc84b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#9 0x7f1144ded151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#10 0x55b6bc9d1e0d in _start (/media/ddnet/DDNet+0x705e0d)
3048: Add GUI & Game sound volume sliders r=heinrich5991 a=def-
As requested by Pipou
3063: increase buffer size for name_ban messages r=heinrich5991 a=12pm
otherwise reason can be cut off
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2987: Modulize skins, particles, emoticons and game r=def- a=Jupeyy
fixes#2203
Puh, something i always wanted todo.
Need to error read, bcs alot of copy paste.
Modulizes all images, so that all images are mipmap indepedent, without texeloffset problems
I also added the ninja bar analyzer for #2921
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3022: Text alignment r=def- a=Jupeyy
i think the round borders create a bit of optical illusion, e.g. the "V" in edtior is only 1 pixel of, but looks like its completly left xd
i checked at few resolutions with gimp and only saw around 1 pixel margin of error, but go ahead and test yourself :D
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3038: Use std::sort instead of bubble_sort r=def- a=Jupeyy
Noticed, that its really slow, when you have alot of auto demos
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3020: Fix all Multiplication type alerts by CodeQL r=heinrich5991 a=def-
> Multiplication result converted to larger type
> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.
Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster
Co-authored-by: def <dennis@felsin9.de>
3010: Use hours in score hud and record r=Learath2 a=def-
3014: Scale auto mapper text size (partially fixes#3013) r=Learath2 a=def-
Co-authored-by: def <dennis@felsin9.de>
2999: Add Serbian Cyrillic translation r=def- a=cobisimo
This is adding Serbian Cyrillic translation and contain complete translation with latest strings.
by Veljko Radovanovic (VekiPro)
3001: Use skin pointer directly r=def- a=Jupeyy
Can't tell if setting the hot item in gui invalidly can potentially break stuff, also a skin refresh button would make this useless anyway
3003: Update brazilian_portuguese.txt r=def- a=rffontenelle
Co-authored-by: Nikola Radovanovic <nikola.r@toptal.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2997: Make menu background animations smoother r=def- a=Fireball-Teeworlds
time_get_microseconds() can potentially return big numbers (on my system it seems to be equal to uptime) and at some point float's precision is no longer enough for every 1/60th of a second.
I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.
I've tested menu and in-game animations.
Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
time_get_microseconds() count starts from 1970-01-01 and float's precision is not enough for every 1/60 of a second.
I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.
I've tested menu and in-game animations.
2893: Determine binary dir independently of data dir (fixes#2891) r=heinrich5991 a=def-
@Learath2 Could you check if this can be extended to also find the DDNet-Server executable on Mac?
2972: Add explicit button for current map as BG r=heinrich5991 a=def-
2974: Fix autoformatting wrt. generated files r=def- a=heinrich5991
Fix#2962.
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2948: Show File button in demo player r=heinrich5991 a=def-
to easily get the file instead of having to search for it in the file browser again. Complements #2946
2956: Add Background music volume slider r=heinrich5991 a=def-
as requested by hussainx3
2965: Clean up some data r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
2958: AntiPing limit is unintuitive, remove from settings r=heinrich5991 a=def-
2961: Fix hash in formatting-revs.txt r=heinrich5991 a=def-
2963: Handle PNG read errors (fixes#2959) r=heinrich5991 a=def-
and print a more telling error message
I'll check all our existing maps for failures now:
```
$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done
```
For skins Soreu and the skin DB team is already taking care. (but I checked and the ones in Skin DB now can all be loaded without error)
Co-authored-by: def <dennis@felsin9.de>
2942: Update swedish translations (by cur.ie) r=heinrich5991 a=def-
2943: Need to send info when updating skin in text field r=heinrich5991 a=def-
As reported by abcqwerty on Discord
Co-authored-by: def <dennis@felsin9.de>
2922: Don't show wrong decisecs in game time in HUD r=heinrich5991 a=def-
I think .me' reported this to me 7 years ago and I've been noticing that they're wrong since then. Time to remove I guess, they don't seem useful anyway.
Co-authored-by: def <dennis@felsin9.de>
2932: Don't change SpectatorID when not spectating r=def- a=Fireball-Teeworlds
This prevents a confusing situation where /pause and /spec lead to spectating yourself: https://youtu.be/9MzvDoXtMLc (looks as if /pause is broken unless you notice that you are spectating yourself).
This could've happened when you pressed spectate_next button while playing and SpectatorID got changed to yourself. I think it doesn't make sense to allow changing SpectatorID when playing at all.
I've also tried to simplify the code: the number of `for` loops in the updated code goes down from 10 to 3.
Things tested with this change:
1. Cycling through players when spectating (works)
2. Changing SpectatorID when not spectating (no longer possible)
3. Spectating yourself (still possible with "spectate N" command but no longer happens accidentally because of 2)
4. "spectate_closest" command (works)
5. Replaying demos where player goes into spectators (works)
Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:
$ python scripts/fix_style.py
2909: Set IME Window Position & Prevent Input from fighting with IME r=def- a=TsFreddie
Mainly solves the backspace problem where you were able to delete from chat and ime comps at the same time.
Also set the position of composition window
Need some testing from other languages' users.
Need https://github.com/ddnet/ddnet-libs/pull/14 to work on windows
Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2902: Don't rely on snapshot for ddnet gametype r=heinrich5991 a=Jupeyy
@fokkonaut you need to test again if you mod works.
This time i also did the test for masked entites(but not for non masked ones).
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2898: Inform players that they are in team already r=heinrich5991 a=def-
2901: Remove failed downloaded files immediately r=heinrich5991 a=def-
Especially skins were only deleted after they were requested again
2908: Don't log skin downloading progress r=heinrich5991 a=def-
since it's not really interesting for most players, as long as things work fine
Co-authored-by: def <dennis@felsin9.de>
2874: Add unmasked entities for all mods r=def- a=Jupeyy
Fixes switch tile for unmasked ddnet
And ddnet mods send that they are a race and ddrace mod appearently?
Not very intuitive that ddnet is a superset of them, bcs tiles changed.
Waiting for a review from @fokkonaut
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
fixes graphics bug when new skins are added, skins array is reallocated
and we accessed freed memory
Thanks to Jupeyy & Learath2 for also looking into this
- Increase size of Name and Clan in adding friend fields
- Smaller Search and Exclude fields
- No more duplicate Search - Search - Search text
- Smaller Connect and Refresh buttons
2733: Implement on-demand skin downloader, remove Lappi's non-free skins (fixes#1166, fixes#2547) r=Learath2 a=def-
Seems to work on first try, I'm somewhat surprised :D
Future ideas:
- I haven't checked how the performance impact is of a new skin joining,
might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
want to compare modified time.
- Make all skins load on demand only to save some memory?
Co-authored-by: def <dennis@felsin9.de>
Seems to work on first try, I'm somewhat surprised :D
Future ideas (not for this change):
- I haven't checked how the performance impact is of a new skin joining,
might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
want to compare modified time.
- Make all skins load on demand only to save some memory?
2816: Implement context for translations (largely taken from Teeworlds) r=Learath2 a=def-
Missing: scripts/languages doesn't work yet, but the context can be
added manually, see german.txt for an example.
Co-authored-by: def <dennis@felsin9.de>
2800: Style-fixed version of #2784 r=def- a=heinrich5991
Thanks to @Jupeyy for the original pull request.
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2738: Don't search the sorted array linearly r=heinrich5991 a=Learath2
Small optimization but it could start mattering with #2733
Co-authored-by: Learath <learath2@gmail.com>
2742: Add str_utf8_copy that trim broken utf8 sequence at the end. r=heinrich5991 a=TsFreddie
Currently this replaces `str_copy` text input and clipboard paste in chat. Many places may need the same treatments, like steam names.
![image](https://user-images.githubusercontent.com/3797859/92263741-08b8e080-eed5-11ea-84a5-b7f070ded260.png)
Test string:
abcd今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打
2745: Update mapres by mind r=heinrich5991 a=def-
Adapted from 0.7 for new renderer. Not sure if this makes sense :D
Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2751: More aggressive analysis & check 2.0 gl Functions that were used r=def- a=Jupeyy
If even that fails, I'm out of ideas
Checks all texture shaders, checks all functions used.
2752: Can't detect if paused on KoG, so don't show button r=def- a=def-
Since they're running an old version of DDNet server
2756: Don't deactivate menu when a popup is active r=def- a=Learath2
Deactivating menu while a popup is active causes the menu to never open again.
Reported by Anxton on discord.
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
Seems more useful than Spectate and Connect Dummy, both of which are
often mistaken by newcomers.
Make button sizes more consistent
Hide buttons that make no sense
2713: allow empty max ping filter r=heinrich5991 a=BannZay
The inconvenieces I discovered so far:
1. You got to write 999 to "disable" this filter
2. If you try to clear this field and then type 75 then the field will contain 750 because the last zero is bugged at this point
Those are fixed
What I would like to be fixed as well (not sure if I gona do this soon):
1. Update browser servers live without refreshing. You press refresh - you receives all the servers and then you should be able (but currently not) to filter them out without pressing on "Refresh" button again but just by changing the max ping value
Co-authored-by: Andrii <bannzay3@gmail.com>
2674: Add nameplates friend marks r=heinrich5991 a=BannZay
Problem: when I play with a friend in team 0, and there are many players nearby, I cannot distinguish him due to nameplates overlapping. It's getting worse when they are in freeze.
Solution: Mark your teammate as "Friend" and setup "cl_nameplates_friendmark"
Result:
![v2](https://user-images.githubusercontent.com/17499770/91647684-08988b00-ea66-11ea-9407-336437391b4f.png)
Co-authored-by: Andrii <bannzay3@gmail.com>
2653: Fix background map loading r=def- a=Jupeyy
As reported.
Tested all possible contexts, hope this is right now
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2598: Allow specifying an OpenGL version manually r=def- a=Jupeyy
Ofc don't merge, we'll test it first, and if we want merge it, i'd need to enable shader compability for OpenGL 4+, and general support for OpenGL 3.1 and 3.2(bcs i think they already don't allow some older GL commands).
Also i never really read in the OpenGL 1.x specification, i remember that older OpenGL versions required glBegin and stuff like that
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2579: Ship map_convert_07 executable, allow drag'n'drop and ship Gold Mine map (with sixup version) instead of Kobra 4 and Goo! r=def- a=def-
2588: Add instructions about how to kill and pause game r=def- a=def-
Co-authored-by: def <dennis@felsin9.de>
2429: Use a cubic polynomial for smoothing zoom r=def- a=heinrich5991
Supersedes #2420.
Co-authored-by: Edgar <git@edgarluque.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2389: Ignore emoticon of spammy players (fixes#2387) r=heinrich5991 a=def-
Controlled with the regular ignore chat button in players menu
Co-authored-by: def <dennis@felsin9.de>
2388: Get rid of the annoying font size warnings r=heinrich5991 a=def-
Since we're not doing anything about them anyway, and I get them
spamming me on every client start.
Co-authored-by: def <dennis@felsin9.de>
2390: Support cl_show_hook_coll_own/other 2 to always show (fixes#2383) r=heinrich5991 a=def-
hook collision, without broadcasting to other players.
Removed cl_show_hook_coll_always in return
Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency
Co-authored-by: def <dennis@felsin9.de>
hook collision, without broadcasting to other players.
Removed cl_show_hook_coll_always in return
Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency
2009: Fix min mouse position for follow factor r=heinrich5991 a=Jupeyy
@Learath2 you were the last to change this, would be nice if you could check if this is correct behaviour, i didn't find anything wrong :D
Co-authored-by: jupeyy <jupjopjap@gmail.com>