3078: Make initial borderless work again r=heinrich5991 a=def-
Mistakenly disabled in https://github.com/ddnet/ddnet/pull/1418
Co-authored-by: def <dennis@felsin9.de>
3068: Fix alignment issues in CCommandBuffer r=def- a=Learath2
Though I prefer this version I also made one keeping the old ugly pointer arithmetic cb61356105
Feel free to take whichever. Supersedes #3061
Co-authored-by: Learath2 <learath2@gmail.com>
src/engine/client/serverbrowser.cpp:295:88: runtime error: index 64 out of bounds for type 'CServerInfo::CClient [64]'
#0 0x565020e035bd in CServerBrowser::Filter() /media/ddnet/src/engine/client/serverbrowser.cpp:295:128
#1 0x565020e053b3 in CServerBrowser::Sort() /media/ddnet/src/engine/client/serverbrowser.cpp:352:2
#2 0x565020e0c364 in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:620:2
#3 0x565020cf9854 in CClient::ProcessServerInfo(int, NETADDR*, void const*, int) /media/ddnet/src/engine/client/client.cpp:1524:20
#4 0x565020cf8132 in CClient::ProcessConnlessPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1357:4
#5 0x565020d11656 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2575:5
#6 0x565020d1ba21 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
#7 0x565020d26efe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
#8 0x565020d48b2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#9 0x7f4311524151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#10 0x565020a95e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/engine/shared/snapshot.cpp:72:8: runtime error: signed integer overflow: -1297193910 + -1824658838 cannot be represented in type 'int'
#0 0x565165b0687d in CSnapshot::Crc() /media/ddnet/src/engine/shared/snapshot.cpp:72:8
#1 0x565165c4d20b in CClient::ProcessServerPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1981:49
#2 0x565165c5d960 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2589:6
#3 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
#4 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
#5 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#6 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#7 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
#0 0x565165b348dc in mem_copy /media/ddnet/src/base/system.c:261:2
#1 0x565165aeb27d in CNetBase::SendControlMsg(NETSOCKET, NETADDR*, int, int, void const*, int, int, bool) /media/ddnet/src/engine/shared/network.cpp:313:2
#2 0x565165aeeb4e in CNetConnection::SendControl(int, void const*, int) /media/ddnet/src/engine/shared/network_conn.cpp:169:2
#3 0x565165af08c5 in CNetConnection::Feed(CNetPacketConstruct*, NETADDR*, int) /media/ddnet/src/engine/shared/network_conn.cpp:367:6
#4 0x565165aec7d2 in CNetClient::Recv(CNetChunk*) /media/ddnet/src/engine/shared/network_client.cpp:94:174
#5 0x565165c5d5ea in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2571:24
#6 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
#7 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
#8 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#9 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#10 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
#0 0x5651235308dc in mem_copy /media/ddnet/src/base/system.c:261:2
#1 0x56512375218d in CServerBrowser::Add(NETADDR const&) /media/ddnet/src/engine/client/serverbrowser.cpp:503:3
#2 0x565123752f6a in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:548:13
#3 0x5651237564cb in CServerBrowser::Refresh(int) /media/ddnet/src/engine/client/serverbrowser.cpp:705:6
#4 0x5651239a32f8 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1164:21
#5 0x5651239bd331 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
#6 0x565123b878f6 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
#7 0x56512363b5ee in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
#8 0x56512367095f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
#9 0x565123690b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
#10 0x7fa8487e8151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#11 0x5651233dde0d 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>
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>
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>
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>
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.
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>
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)
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>
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>
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>
As suggested by BannZay on Discord. We scale down when we notice that
no responses arrive. The idea is that player's internet has become
faster than when DDNet started, so increasing the default is ok.
2820: Server: Only recv new packets when we know they are waiting r=Jupeyy a=def-
Reduces the number of syscalls
Co-authored-by: def <dennis@felsin9.de>
2837: Don't allow zero/empty images(bcs malloc(0) and other things) r=def- a=Jupeyy
Would be nicer, if the map loader would check the map for such things, but since the backend works with the image data and assumes its valid, this prevents crashes.
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2814: Remove saving to other servers r=Learath2 a=def-
sv_sql_valid_servernames is no longer required
2818: Load fonts from memory (fixes#2810) r=Learath2 a=def-
Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.
@QingGo Could you give this a try from the Github build artifacts? If not, I can provide you a nightly build.
Co-authored-by: def <dennis@felsin9.de>
2828: Use resize instead of rescale r=def- a=Jupeyy
rescale doesn't clamp, and looks worse, might be slightly faster tho.
So i also renamed the config vars that might cause resizing and/or are not very useful
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2819: Fix compilation on MinGW Windows r=Learath2 a=def-
graphics.h:197:36: error: ‘uint8_t’ has not been declared
Co-authored-by: def <dennis@felsin9.de>
Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.
@QingGo Could you give this a try from the Github build artifacts?
2789: Refresh server browser immediately when updated ddnet info arrived r=heinrich5991 a=def-
At the moment it only happens the next time you press refresh.
Before we had it so that it always reloaded once the ddnet info arrived,
causing a quick flickering and lots of packets having to be resent every
time someone pressed refresh, even if nothing changed.
The new approach combines the advantages of both without the
disadvantages. An even nicer way would be to compare the json objects,
so that news and version updates don't matter, but our json library
doesn't seem to support that.
2797: dilate: Don't crash if file doesn't exist r=heinrich5991 a=def-
Co-authored-by: def <dennis@felsin9.de>
Only print expanded SQLite statement, when expanding function exists. This is
required to not bump the minimum required Ubuntu version, since Ubuntu 16.04
doesn't ship SQLite 3.14 or above. SQLite introduced ``sqlite3_expanded_sql`
in 3.14, Ubuntu 16.04 packages 3.11.
Disabled weak linking on MSVC, since it isn't supported.
At the moment it only happens the next time you press refresh.
Before we had it so that it always reloaded once the ddnet info arrived,
causing a quick flickering and lots of packets having to be resent every
time someone pressed refresh, even if nothing changed.
The new approach combines the advantages of both without the
disadvantages. An even nicer way would be to compare the json objects,
so that news and version updates don't matter, but our json library
doesn't seem to support that.
2758: Remove the rudimentary fuzzing since no one uses it anyway r=heinrich5991 a=def-
2769: Update front.png by Soreu r=heinrich5991 a=def-
2772: Dont predict camera position on spectator changed r=heinrich5991 a=BannZay
No reason to predict camera position in case when we just changed spectator.
But tbh I have not found a big reason to predict it at all.
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Andrii <bannzay3@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>
2763: Allow joining and inviting others via Steam friend list r=def- a=heinrich5991
Fixes#2642.
2768: Clamp kill border count r=def- a=Jupeyy
fixes#2766
Appearently the center of the camera can even go outside of the kill border(like even left from it)
I also notice that sometimes when zooming out, and then in again the zoom level gets negative(since the new smooth zoom)(atleast i see everything upside down for few frames)
These numerical unstableness makes me sweat a bit xd
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>