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)
3053: Optimize uuid lookup r=heinrich5991 a=Jupeyy
Already wrote that patch when i noticed its not about this, maybe we can use it, else nvm
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
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>
3047: Fix ui_page/ui_settings_page ranges r=Learath2 a=def-
For ui_page makes no difference since we limited in code
For ui_settings_page assets page is now remembered
Co-authored-by: def <dennis@felsin9.de>
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>
3018: Editor: Improve usability of server settings r=Jupeyy a=def-
- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable
As requested by Cøke
Co-authored-by: def <dennis@felsin9.de>
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>
3033: Reset m_ServerCapabilities on Disconnect r=Jupeyy a=def-
Reported by builder17 that on Vanilla server timeout code can get sent
Co-authored-by: def <dennis@felsin9.de>
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>
3005: Use rest instead of string in some commands r=heinrich5991 a=def-
where it makes sense, means you don't need to quote strings for those
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>
3021: only load + save auto mappers for tile layers, not physics layers r=def- a=Patiga
If I'm not mistaken, loading a map without auto mappers, then saving would've caused uninitialized values to be written to the auto mappers of physics layers.
Co-authored-by: patiga <dev@patiga.eu>
2980: Fix laser prediction for non ddrace mods r=def- a=Jupeyy
Correct me, if this is wrong, but only ddrace based mods cannot shot laser through itself.
Tested on vanilla, ictf and fng(with antiping on and prediction on)
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable
As requested by Cøke
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>
2982: Update french translation r=Jupeyy a=def-
by SunnyPistache & Pipou
2985: No country flag for Traditional Chinese r=Jupeyy a=def-
2996: Make types/countries fit ingame (fixes#2989) r=Jupeyy a=def-
Co-authored-by: def <dennis@felsin9.de>
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>
2973: initialize physics layer pointer, layer item version (partially fixes#2971) r=def- a=Patiga
Note that the zlib compression still makes it non-deterministic across different machines/versions
Co-authored-by: patiga <patigatus21@gmail.com>
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>
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.
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
2933: Handle rcon cmd completion properly with dummy r=heinrich5991 a=def-
Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.
as reported by Betz@lel-$h@l0m on Discord
Co-authored-by: def <dennis@felsin9.de>
2889: Allow specifying texture LOD BIAS r=def- a=Jupeyy
For Ravie, and others that want the old renderer opengl 3.3 feeling back xd
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.
as reported by Betz@lel-$h@l0m on Discord
Not planning to do this automatically, but at least cleaning it up once
provides some benefit. Every header should include what it uses.
$ for i in src/**/*.h; do j=${i#"src/"}; echo $j; echo "#include <$j>\nint main() { return 0; }" | /usr/bin/c++ -DCONF_OPENSSL -DCONF_SQL -DCONF_VIDEORECORDER -DCONF_WAVPACK_CLOSE_FILE -DCONF_WAVPACK_OPEN_FILE_INPUT_EX -DGAME_RELEASE_VERSION=\"15.0.5\" -DGLEW_STATIC -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -I/usr/include/opus -I/usr/include/SDL2 -I/usr/include/wavpack -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -Isrc -I/usr/include/mysql -I/home/deen/sys/include/ -O2 -g -DNDEBUG -fdiagnostics-color=always -fstack-protector-all -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wno-nullability-completeness -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -std=gnu++11 -o /dev/null -x c++ -; done
Ignored: tuning.h, variables.h, config_common.h, mapitems_ex_types.h, mapbugs_list.h, protocol7.h, teehistorian_ex_chunks.h, protocol_ex_msgs.h, config.h, config_variables.h, external, keynames.h
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
2917: Create ALLOW_X_SKINS game info flag r=heinrich5991 a=def-
To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.
Co-authored-by: def <dennis@felsin9.de>
2923: Don't str_copy into string itself r=Learath2 a=def-
when reconnecting after server was full:
[2020-09-25 15:39:34][client]: offline error='This server is full'
Source and destination overlap in strncpy(0xd3328e2, 0xd3328e2, 255)
at 0x483DFDC: strncpy (vg_replace_strmem.c:550)
by 0x249180: str_copy (system.c:2328)
by 0x27E1F5: CClient::Connect(char const*, char const*) (client.cpp:707)
by 0x287864: CClient::Update() (client.cpp:2914)
by 0x28891B: CClient::Run() (client.cpp:3216)
by 0x28EDEC: main (client.cpp:4309)
2924: Fix Score/Time alignment r=def- a=Learath2
![screenshot_2020-09-25_16-52-30](https://user-images.githubusercontent.com/490500/94275676-e81dfc80-ff4f-11ea-9f21-dbf5d1cf73a9.png)
Also adds hours to the time
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
when reconnecting after server was full:
[2020-09-25 15:39:34][client]: offline error='This server is full'
Source and destination overlap in strncpy(0xd3328e2, 0xd3328e2, 255)
at 0x483DFDC: strncpy (vg_replace_strmem.c:550)
by 0x249180: str_copy (system.c:2328)
by 0x27E1F5: CClient::Connect(char const*, char const*) (client.cpp:707)
by 0x287864: CClient::Update() (client.cpp:2914)
by 0x28891B: CClient::Run() (client.cpp:3216)
by 0x28EDEC: main (client.cpp:4309)
To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.
2918: Allow specifying -DGAME_RELEASE_VERSION r=Learath2 a=def-
to be used for nightlies and release candidates to be able to tell them from regular releases more easily. For example:
CPPFLAGS="-DGAME_RELEASE_VERSION=\\\"15.0.5-rc1\\\"" cmake .
Co-authored-by: def <dennis@felsin9.de>
2915: HTTP: Set final m_State after running completion function r=Jupeyy a=def-
Ensures that we don't delete a file that is being used by ingame map downloader already.
As reported by Jupeyy in #2901
Co-authored-by: def <dennis@felsin9.de>
to be used for nightlies and release candidates to be able to tell them
from regular releases more easily. For example:
CPPFLAGS="-DGAME_RELEASE_VERSION=\\\"15.0.5-rc1\\\"" cmake .
2894: Add new renderer(as streamed vertices) for editor r=def- a=Jupeyy
Does not improve performance in editor!
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
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>
2907: properly set sound envelope offsets for sound sources r=def- a=Patiga
before, `m_SoundEnvOffset` was always set to the same value as `m_PosEnvOffset`, due to wrong behavior in the ui.
Co-authored-by: patiga <patigatus21@gmail.com>
2906: Use fixed point conversion consistently r=def- a=Learath2
This fixes the issue with the Tex UV coords being complete garbage
Co-authored-by: Learath <learath2@gmail.com>
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
2865: Fix localizing demo list r=Jupeyy a=def-
You can't store the result of Localize in a static, it will be removed
by switching to another language.
Thanks to Jupeyy for report
Co-authored-by: def <dennis@felsin9.de>