Commit graph

11143 commits

Author SHA1 Message Date
Robert Müller f4642472b2 Remove redundant parameters which are overridden later 2022-05-01 11:40:26 +02:00
Robert Müller a1614e4709 Use Margin instead of both VMargin and HMargin 2022-05-01 11:40:21 +02:00
Robert Müller e291a3a70c Move variable declaration 2022-05-01 11:38:58 +02:00
heinrich5991 d5f8bc2783 Only output messages intended for chat to the user of a chat command
Fixes #5052.

The problem seems to be that there are two different concepts tangled up
in console/logging. One is actual logging as in other programs. The
other is "responses to the user of the command that was just entered",
like for rcon or chat commands. This issue isn't fixed by this commit.
2022-05-01 11:18:22 +02:00
heinrich5991 4061069b73 Remove unused chat response variables 2022-05-01 11:18:22 +02:00
heinrich5991 23ef309d0a Don't print the first "Waiting for score threads to complete"
Looks nicer IMO if you don't show the message if there's no actual
waiting.
2022-05-01 11:10:15 +02:00
Tater 488b781f79 fix usage of undefined behavior for default eyes
fix using the same buffer as dest and source.
2022-05-01 03:04:10 -05:00
bors[bot] 567aeb7d9e
Merge #5049
5049: do not release the hooks if you swap r=C0D3D3V a=C0D3D3V

Needs more testing, but first test looks good
https://streamable.com/ypra11

## 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-30 20:09:20 +00:00
c0d3d3v a289503411
remove duplicate HOOK_RETRACTED assignment 2022-04-30 21:41:13 +02:00
c0d3d3v eae74fe91e
do not send swap request notification to complete team 0 2022-04-30 21:24:25 +02:00
c0d3d3v 808526bdd8
make swap messages more personal 2022-04-30 12:16:38 +02:00
c0d3d3v 0ea811f70e
do not release the hooks if you swap 2022-04-30 10:21:38 +02:00
Edgar 4b25f8d63e
fix tooltips rendering when they shouldn't, fixes #5035 2022-04-30 10:05:28 +02:00
Dennis Felsing 1376dc2aa7 Revert "Get rid of optional, not available on Debian9 build"
This reverts commit 4e3d5c5626.

Should work again with clang++-7 and libc++-7. See
2534d627ac
2022-04-30 01:01:39 +02:00
Robert Müller da44ecd6eb Fix flashing colors in console when scrolling up continuously 2022-04-29 17:51:10 +02:00
bors[bot] ca4b6222da
Merge #5013
5013: Unify logging infrastructure between `IConsole` and `dbg_msg` r=def- a=heinrich5991

This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-04-29 14:17:07 +00:00
Jupeyy 53cb36bbe7 Fix wrong quad offset for (not caused by transparent) flushes 2022-04-29 15:51:25 +02:00
heinrich5991 b20f16059d Add logging macros log_{error,warn,info,debug,trace}
This makes it almost as short to log as with `dbg_msg` (one to two more
characters), and much shorter than
`Console()->Print(IConsole::OUTPUT_LEVEL_{STANDARD,ADDINFO,DEBUG})`.
2022-04-29 15:32:42 +02:00
heinrich5991 fa4bcd5ec0 Unify logging infrastructure between IConsole and dbg_msg
This makes the "black console window" less important on Windows (or
anywhere else, for that matter), lets you see logs from other threads in
the f1 console, and removes the distinction between `IConsole::Print`
and `dbg_msg`.
2022-04-29 15:21:26 +02:00
Edgar 2fca2872b4
Merge branch 'master' into pr/system/documentation 2022-04-29 10:26:45 +02:00
bors[bot] 98bf721587
Merge #4726 #4727 #4728 #4880 #5022
4726: Display super with "super" string in scoreboard (fixes #4724) r=heinrich5991 a=def-

instead of showing the number 64

Alternative to https://github.com/ddnet/ddnet/pull/4725

<!-- 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)


4727: Increase MAX_IDS to 32k (fixes #4723) r=heinrich5991 a=def-

Not sure I like it, otherwise we have to edit Game City.

Maybe we should fail this in map editor already instead of allowing to
create a map which requires > MAX_IDS

<!-- 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
- [ ] 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)


4728: Implement shields that remove specific weapon (fixes #4572) r=heinrich5991 a=def-

Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display (see screenshot), maybe someone can
quickly spot what I'm doing wrong

<img width="898" alt="Screenshot 2022-02-18 at 00 50 14" src="https://user-images.githubusercontent.com/2335377/154591108-d89cb475-daaf-4a6a-9748-17160a1e71a2.png">

## 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
- [ ] 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)


4880: Add mysql to github workflow in ubuntu 20.04 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)


5022: Use std::clamp r=heinrich5991 a=def-

Not sure if we want to, there are some easy functions like this we could
take from stdlib now

<!-- 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>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-04-29 00:30:17 +00:00
bors[bot] 90c61b0812
Merge #4692
4692: Allow sv_show_others_default in map settings r=heinrich5991 a=def-

for tutorial map

<!-- 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>
2022-04-29 00:10:02 +00:00
Dennis Felsing ae1c63f33d Try adding mysql to github workflow in ubuntu 20.04
Remove my_bool, has been removed in MySQL 8.0
2022-04-28 18:23:23 +02:00
Dennis Felsing 6a7c7ff4cc Use std::gcd 2022-04-28 17:01:53 +02:00
Dennis Felsing 67286a4971 Remove unused sign() (C++11 has signbit) 2022-04-28 17:01:51 +02:00
Dennis Felsing af0fcf8773 Use std::clamp
Not sure if we want to, there are some easy functions like this we could
take from stdlib now
2022-04-28 17:01:30 +02:00
Jupeyy b8da817716 Return the quad offset of the first added quad, when adding new quads 2022-04-28 16:50:18 +02:00
Dennis Felsing 298287fb4e Implement shields that remove specific weapon (fixes #4572)
Thanks to Cellegen for graphics.

Functionality works, still a bit buggy sprite display, maybe someone can
quickly spot what I'm doing wrong
2022-04-28 16:49:32 +02:00
Dennis Felsing 15b8dc8d64 Remove dots in tooltip texts 2022-04-28 16:46:18 +02:00
Dennis Felsing 3ca86ee128 Display super with "super" string in scoreboard (fixes #4724)
instead of showing the number 64
2022-04-28 16:40:20 +02:00
def 487abbe1b7 Enable swapping in team 0 2022-04-28 16:35:46 +02:00
bors[bot] a8b842277a
Merge #5019
5019: remove cl_predict_ddrace r=heinrich5991 a=C0D3D3V

Since most of the predict code is only ddrace relevant anyway, I would suggest removing the cl_predict_ddrace option instead of checking if m_WorldConfig.m_PredictDDRace is set everywhere ddrace stuff is predicted. 

in case of conflicts with physics from other mods, the check on m_WorldConfig.m_PredictDDRace must however be implemented in the appropriate places (for example for the freeze and unfreeze functions). But since there are currently no conflicts apparently, this is sufficient for now.

fixes the bug I reported here: https://discord.com/channels/252358080522747904/293493549758939136/968114944878989363

`@trml`  what do you think about this?

## 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-28 12:34:04 +00:00
bors[bot] 6cce22d056
Merge #4813 #4905
4813: Don't allow infinite shotgun bounce (fixes #4809) r=heinrich5991 a=def-

I hope this kind of physic isn't used anywhere, I couldn't trigger it without being stuck in wall.

## 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)


4905: Fix move_sqlite (fixes #4902) 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>
2022-04-28 12:11:05 +00:00
bors[bot] 7a7e291dcf
Merge #4509
4509: Switch new players to DDNet config dir, support Teeworlds as fallback r=heinrich5991 a=def-

This way new players will get DDNet directory, old ones can switch
directory if they want, or keep using the old one.

If we ever enforce a switch in a future version, this will make it
easier since older DDNet versions will also support the DDNet directory
already.

<!-- 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
- [ ] 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>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-04-28 11:53:12 +00:00
c0d3d3v 1a162c08be
remove unnecessary loop over the possible modifier combinations 2022-04-28 08:45:25 +02:00
bors[bot] e3eeec762d
Merge #4997
4997: Add option to change default eyes when joining server r=def- a=sjrc6

Risky Feat suggested this idea to me, I also thought it was good so I implemented it. 

If you press one of the eyes in the settings it will change which eyes you get when you join a server.

It saves a separate variable for dummy/player.

It will also change your eyes anytime you press one of them, but only if you are playing as the same Tee whose eyes you are trying to change. If someone could figure out the best way to make it change the opposite Tees eyes as well that would be nice but I don't think it's necessary. 

It also changes the "Your Skin:" Tee eyes on the left if you have one selected. 

I had to change the cl_run_on_join code a bit, I tested and I don't think it should ever break anything but it might be good for someone to double check. 

![image](https://user-images.githubusercontent.com/22122579/163762410-ec7aa67d-6417-433d-8707-e21cda2bcd5f.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
- [ ] 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: Tater <Mr.Potatooh@gmail.com>
2022-04-27 07:42:59 +00:00
bors[bot] 3d183fc16d
Merge #5027
5027: Fix tooltip locations after window resize (fixes #5026) r=edg-l 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>
2022-04-27 06:05:59 +00:00
Tater 70311d5d4f Add option for default eyes when joining server 2022-04-26 19:47:38 -05:00
Dennis Felsing c174274edc Fix tooltip locations after window resize (fixes #5026) 2022-04-27 01:00:23 +02:00
Jupeyy b23e60c077 Allow onfly FSAA change under Vulkan 2022-04-26 21:09:55 +02:00
bors[bot] d815fdfa03
Merge #5023
5023: fix WalkTime for negativ positions r=def- a=C0D3D3V

I am not sure if there is a more elegant solution, the problem is that fmod in cpp does not return a positive value. maybe we can just use a mod function that always returns positive values.

## 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-26 08:49:02 +00:00
c0d3d3v bc80d83ec9
fix WalkTime for negativ positions 2022-04-26 09:58:31 +02:00
bors[bot] 6270b1c11d
Merge #5021
5021: fix clamp of m_ThreadCount r=def- a=Jupeyy

fixes #5020

## 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: Jupeyy <jupjopjap@gmail.com>
2022-04-25 16:32:28 +00:00
bors[bot] 9e227006c0
Merge #4986
4986: Free some opengl2 pointers r=Jupeyy a=ChillerDragon

Fixes these memory leaks on my system (default opengl 3.0.3 renderer debian 11)

```
Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x537ebc in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1672:21
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x537ff6 in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1673:29
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x53826a in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1675:36
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4eac0d in operator new(unsigned long) (/home/chiller/Desktop/git/ddnet/asan/DDNet+0x4eac0d)
    #1 0x538130 in CCommandProcessorFragment_OpenGL2::Cmd_Init(CCommandProcessorFragment_GLBase::SCommand_Init const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1674:28
    #2 0x51f4ed in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1061:3
    #3 0x9e9d5e in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:250:20
    #4 0x9e57ab in CGraphicsBackend_Threaded::ThreadFunc(void*) /home/chiller/Desktop/git/ddnet/src/engine/client/backend_sdl.cpp:80:25
    #5 0x1d49c45 in thread_run(void*) /home/chiller/Desktop/git/ddnet/src/base/system.cpp:867:2
    #6 0x7fe2a3b8fea6 in start_thread nptl/pthread_create.c:477:8
```

## 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: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-25 16:07:05 +00:00
ChillerDrgon d364c63b69 Free some opengl2 pointers 2022-04-25 18:06:21 +02:00
Jupeyy 428c1ca4a8 fix clamp of m_ThreadCount 2022-04-25 17:37:15 +02:00
c0d3d3v 68036e6a19
remove cl_predict_ddrace 2022-04-25 15:57:10 +02:00
bors[bot] 1dea02d456
Merge #5018
5018: fix dummy hammer interval, this became incorrect after a few days r=def- a=C0D3D3V

Reported by Konsti here: https://discord.com/channels/252358080522747904/293493549758939136/967073772836376586
I have tested the change on Justfly with my dummy :D since it is exactly the same interval as before it should not change any Physics. 

## 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-25 13:17:01 +00:00
c0d3d3v 2f4ccb94de
fix dummy hammer interval, this became incorrect after a few days 2022-04-25 14:10:32 +02:00
def 2c0565b85e Fix creating storage directory recursively 2022-04-25 09:50:46 +02:00
Dennis Felsing 50e9e4c8c4 Use XDG_DATA_HOME 2022-04-25 09:50:46 +02:00
def 790c1cc0aa Switch new players to DDNet config dir, support Teeworlds as fallback
This way new players will get DDNet directory, old ones can switch
directory if they want, or keep using the old one.

If we ever enforce a switch in a future version, this will make it
easier since older DDNet versions will also support the DDNet directory
already.
2022-04-25 09:50:45 +02:00
bors[bot] 9be59a990b
Merge #4678
4678: Ignore F5 key press when ingame menu is open r=heinrich5991 a=def-

Since ghost menu and browser use F5 already to refresh, and having a
bind on it, would cause both actions at once.

I believe it makes sense to have this special handling only for F5,
other F-keys don't have this problem since we don't use them in any
menus.

<!-- 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
- [ ] 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>
2022-04-24 23:04:58 +00:00
Dennis Felsing 394b2a02e0 Remove cl_show_quads bind 2022-04-24 12:28:04 +02:00
heinrich5991 103b663662 Rename ActCur, some "actual" → "current"
Seems like it got introduced by means of the false friend "actual" ≠
"aktuell" = "current".
2022-04-23 00:42:37 +02:00
Jupeyy 0b5122d751 Fix wrongly used viewport parameters 2022-04-19 17:26:05 +02:00
bors[bot] e06b3d9579
Merge #5007
5007: Get rid of optional, not available on Debian9 build r=edg-l a=def-

Since we don't have full C++17 support with the GCC version there.

## 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>
2022-04-19 07:57:40 +00:00
Dennis Felsing 4e3d5c5626 Get rid of optional, not available on Debian9 build 2022-04-19 09:56:28 +02:00
bors[bot] 08f856d741
Merge #5004
5004: add livefreeze commands to rcon r=def- a=edg-l

<!-- 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
- [ ] 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: Edgar Luque <git@edgarluque.com>
Co-authored-by: Edgar <git@edgarluque.com>
2022-04-19 07:35:42 +00:00
Edgar 6b15abeeae
put it above left up down 2022-04-19 08:58:26 +02:00
Edgar 50e6744d91
fix typo 2022-04-18 16:38:17 +02:00
Edgar b9fc6bc8a4
add livefreeze commands to rcon 2022-04-18 16:37:35 +02:00
Edgar 646162eb09
make super ignore livefreeze, fix #4973 2022-04-18 15:40:39 +02:00
bors[bot] c39448ca53
Merge #5000
5000: Inform about client restart when changing GPU r=Jupeyy 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
- [ ] 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>
2022-04-18 08:22:18 +00:00
def 87b7550a4a Inform about client restart when changing GPU 2022-04-18 10:16:24 +02:00
bors[bot] fdcb1576bd
Merge #4946 #4993 #4998 #4999
4946: Better forced viewport handling r=def- a=Jupeyy

For #4939

For the performance warnings refering `vkCmdClearAttachments` ignore them, because this function is only called when:
- clear color is changed(open/close editor, switch between entities) to directly flush a clear with the new color
- ~~a viewport is used that is "worse" than 5:4 (I don't really want to switch to non renderpass clear completly, since it *can* improve performance -- https://community.arm.com/arm-community-blogs/b/graphics-gaming-and-vr-blog/posts/vulkan-samples "Therefore, avoid using LOAD_OP_LOAD and vkCmdClearAttachments and use LOAD_OP_CLEAR or LOAD_OP_DONT_CARE whenever possible.")~~
thinking about it, maybe i can also drop this call now, since its dynamic viewport anyway

## 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)


4993: Unselect text after ctrl-u r=Jupeyy 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
- [ ] 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)


4998: Refactor tooltips and add some more r=def- a=edg-l

Refactored tooltips so they render last, otherwise stuff rendered after the call is overlapped.

Also renamed "Alpha" to "Opacity" which is more clear to non-devs.

## 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)


4999: Respect GPU type better r=def- a=Jupeyy

fixes #4994

## 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: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Edgar Luque <git@edgarluque.com>
2022-04-18 08:06:49 +00:00
Edgar eba7a14cb4
add missing end new lines 2022-04-18 09:55:50 +02:00
Jupeyy d770913c11 Don't force clear anymore for forced viewports 2022-04-18 09:50:26 +02:00
Jupeyy 0312346d1a Use a forced dynamic viewport for unsupported resolutions instead 2022-04-18 09:50:26 +02:00
Jupeyy 50f9aa88d3 Prepare graphics for dynamic viewport changes 2022-04-18 09:50:19 +02:00
Edgar fbbcbb6d2f
remove designated initializers because we live in 2017 2022-04-18 09:44:13 +02:00
Jupeyy 2a71e381ea Respect GPU type better 2022-04-18 09:44:11 +02:00
Edgar 74286d1dd4
format code 2022-04-18 09:34:21 +02:00
Edgar faab2ded74
Refactor tooltips to render last, add some tooltips 2022-04-18 09:34:05 +02:00
def 041c565534 Unselect text after ctrl-u 2022-04-18 00:22:11 +02:00
Zwelf 887e6673fe Initialize CCharacter::m_NumInputs of game server 2022-04-17 23:06:35 +02:00
bors[bot] d4dcaa2471
Merge #4989
4989: Add null backend r=def- a=ChillerDragon

Thanks to `@Jupeyy` for the idea.

Replacing graphics_threaded_null.h with a null backend
makes code maintenance and memory cleanup easier.

Fixes these memory leaks in headless client (https://github.com/ddnet/ddnet/pull/4970)

```
Direct leak of 1048576 byte(s) in 1 object(s) allocated from:
    #0 0x4b6f6d in malloc (/home/runner/work/ddnet/ddnet/san/DDNet+0x4b6f6d)
    #1 0xd92ffb in CTextRender::InitTextures(int, int, IGraphics::CTextureHandle (&) [2], unsigned char* (&) [2]) /home/runner/work/ddnet/ddnet/src/engine/client/text.cpp:325:24
    #2 0xd53795 in CTextRender::LoadFont(char const*, unsigned char const*, unsigned long) /home/runner/work/ddnet/ddnet/src/engine/client/text.cpp:729:3
    #3 0xade5cd in CClient::LoadFont() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4070:32
    #4 0x155b3de in CGameClient::OnInit() /home/runner/work/ddnet/ddnet/src/game/client/gameclient.cpp:246:12
    #5 0xa8ecfe in CClient::Run() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:2933:16
    #6 0xaf6726 in main /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4458:11
    #7 0x7fadd9e610b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
```

## 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: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-16 20:15:13 +00:00
Noa 482d45484b fix gun sounds for blockworlds servers 2022-04-16 19:36:25 +02:00
ChillerDrgon 9ee3534ec6 Add null backend
Thanks to @Jupeyy for the idea.

Replacing graphics_threaded_null.h with a null backend
makes code maintenance and memory cleanup easier.
2022-04-16 12:31:28 +02:00
bors[bot] e81ebfb0bb
Merge #4964 #4984 #4985
4964: allow freecam to center on world border r=def- a=C0D3D3V

fixes #4953

I think the 200 units or 6.25 blocks more should not bother anyone. 
![fix 2022-04-09_15-14](https://user-images.githubusercontent.com/14315968/162576159-7d73eb8c-b9c9-471b-bed0-7477568376d6.png)
under some circumstances, it will only move to x=1 (or in blocks 0.03) but this should be negligible.  

## 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
- [ ] 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)


4984: Don't read from backend if Init failed r=def- a=Jupeyy

fixes #4981 

This `bug` should not create any uninitended behavior, since these values get reinitialized after the backend creation worked

## 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)


4985: Close sockets r=def- a=ChillerDragon

https://github.com/ddnet/ddnet/pull/4970

Fixes

```
 Direct leak of 205848 byte(s) in 1 object(s) allocated from:
    #0 0x4a200d in malloc (/home/runner/work/ddnet/ddnet/san/DDNet-Server+0x4a200d)
    #1 0xc7fe3f in net_udp_create /home/runner/work/ddnet/ddnet/src/base/system.cpp:1640:41
    #2 0xbf2d0b in CNetServer::Open(NETADDR, CNetBan*, int, int) /home/runner/work/ddnet/ddnet/src/engine/shared/network_server.cpp:55:13
    #3 0x568cdc in CServer::Run() /home/runner/work/ddnet/ddnet/src/engine/server/server.cpp:2448:60
    #4 0x5a922b in main /home/runner/work/ddnet/ddnet/src/engine/server/server.cpp:3718:21
    #5 0x7ff75f52c0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
```

## 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
- [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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-15 20:37:18 +00:00
bors[bot] 740a18436d
Merge #4988
4988: Update voting.cpp r=def- a=bencie

fix console help text for callvote parameters

<!-- 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: bencie <78111412+bencie@users.noreply.github.com>
2022-04-15 20:18:25 +00:00
bencie 5401364813
Update voting.cpp
fix console help text for callvote parameters
2022-04-15 18:16:28 +02:00
Jupeyy d892de2b03 Fix editor animation offset time being affected by the animation speed factor 2022-04-15 10:05:39 +02:00
c0d3d3v 9dc2141ded
remove shadow variables
fix GetDigitsIndex Parameters
remove unused y addidion in debughud
2022-04-14 14:46:22 +02:00
c0d3d3v a9c8b344a2
Player position, speed and angle can now be displayed in the HUD.
- Added RenderMovementInformation() to the HUD
- Use m_Width instead of recalculating the display width each time in hud.cpp
- Reworked Debug HUD:
    - Display velspeed.x*ramp and velspeed.y instead of velspeed*ramp
    - Show unit of speed
    - The graph for the velspeed.x*ramp behavior (if dbg_tuning is active) is now nicer and usable. A second graph zooming in on the turning point has been added.
    - The velspeed.x*ramp graph will be redrawn only when new tuning parameters are added
- The target angle used to draw the tees is now calculated using the m_TargetX, m_TargetY in DDNetCharacterDisplayInfo if available.
- Added m_TargetX, m_TargetY and m_RampValue to DDNetCharacterDisplayInfo Snap (m_RampValue has a precision of one thousandth)
- Added CGraph::InsertAt() to create static Graphs
- Added "assets/hud" to initial created Directories
- Added Settings to hide Dummy Action HUD and Player Movement HUD cl_showhud_dummy_actions, cl_showhud_player_position, cl_showhud_player_speed, cl_showhud_player_angle
- Added Pointer to m_PrevExtendedDisplayInfo, for calculation of interpolated Angle in Player Rendering
- Added GetDigitsIndex(int Value, float Max); to hud.cpp
2022-04-14 13:42:19 +02:00
c0d3d3v be75b80520
Render Dummy Actions on the right side of the screen
- Render Practice Mode next to the other player effects
- Make Recording Notification Position more symetric
2022-04-14 13:40:45 +02:00
c0d3d3v 940047fb8e
Add Practice Mode Symbol next to the timer
- Add new hud.png
- expand DDNetCharacterDisplayInfo with m_IsInPracticeMode
2022-04-14 13:40:45 +02:00
c0d3d3v ef468e8181
remove constant scaling factors and constant y offset
- move weapons above jumps
- move effects up if no jumps are available
2022-04-14 13:40:45 +02:00
c0d3d3v 6159b181e3
use QuadsSetSubsetFree also for freeze bar
- set the proportions of the used area of the end pieces for the progress indicator as constants.
- do not manipulate the position and length within the render function
2022-04-14 13:40:44 +02:00
c0d3d3v 670da66ec1
add vertical ninja bar 2022-04-14 13:40:44 +02:00
c0d3d3v a4b6558ff6
load CNetObj_DDNetCharacterDisplayInfo into CCharacter 2022-04-14 13:40:44 +02:00
c0d3d3v 09bd10666c
increase height of freeze bar
- cut of 10% of top and bottom of progress bar sprites
2022-04-14 13:40:44 +02:00
c0d3d3v e71578e468
Add DDNetCharacterDisplayInfo NetObj
- Show all components of new HUD also in Spectator (Ninja Bar, Freeze
  Bar and Jumps)
- hide freeze bar if you sit in freeze
2022-04-14 13:40:40 +02:00
c0d3d3v b403f474a0
Add Freeze Bar 2022-04-14 13:40:05 +02:00
c0d3d3v 78a0a3d31e
add deep and live frozen display 2022-04-14 13:38:56 +02:00
c0d3d3v 63d4591fe5
Make Ninja Bar Smooth
- Added new version of hud.png
2022-04-14 13:38:56 +02:00
c0d3d3v b942b7a72a
Show weapon no hit only if the tee got the weapon
make ninja sword bigger
show negative jumps correct
move icons up if there is an empty space
2022-04-14 13:38:56 +02:00
c0d3d3v de750e81d4
display ninja Bar 2022-04-14 13:38:55 +02:00
c0d3d3v 3957a7404e
move m_Ninja in Character Core 2022-04-14 13:38:55 +02:00
c0d3d3v 320e9e030f
Rename Read() function to avoid equal naming 2022-04-14 13:38:55 +02:00
c0d3d3v 5ac46f9bd5
Many new indicators have been added to the HUD
- A display of the weapons available to the player
- The weapon the player is carrying is highlighted
- Indicators for the special abilities of the player
- Indicators for abilities taken away from the player
- Control indicators for dummy controls
- The jump indicator has been slightly adjusted
2022-04-14 13:38:55 +02:00
c0d3d3v 7abeaf0cd7
Preparations for the new HUD
- add pickup sprites to 0.6 data source
- New Enum for the 4 pickup categories
- Remove the unnecessary access to client_data7 for the pickup sprites
- Use the correct sprite set for the HUD sprites
- Read existing weapons into m_Predicted so that this information matches the last snap if the CCharacter is not predicted
- Move m_aWeapons from CCharacter to CCharacterCore for a more consistent data model since it was previously defined twice in the server and client (further so that it can be accessed with m_Predicted)
- Read CNetObj_Character into m_Predicted so that this information matches the last snap if the CCharacter is not predicted.
2022-04-14 13:38:55 +02:00
c0d3d3v b23811b197
show local available and used jumps, in spec only available jumps 2022-04-14 13:38:54 +02:00
c0d3d3v a0164df3da
Small cleanup of HUD + comment on distance calculation at sound 2022-04-14 13:38:54 +02:00
Jupeyy 53e121841e
Return the quad offset of the first added quad, when adding new quads 2022-04-14 13:38:54 +02:00
c0d3d3v 755c260401
Add HUD Sprites, LoadHudSkin() and HUD Assets Tab 2022-04-14 13:38:42 +02:00
ChillerDrgon 18ca71ae55 Close sockets 2022-04-14 11:50:10 +02:00
Jupeyy 3435e3ae04 Don't read from backend if Init failed 2022-04-13 22:06:36 +02:00
bors[bot] f60ae47be1
Merge #4976
4976: fix rendering of nameplates for spectating tees r=def- a=C0D3D3V

bug was introduced by #4870

## 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-12 21:48:45 +00:00
c0d3d3v e65bfa6350
fix rendering of nameplates for spectating tees (bug introduced by #4870) 2022-04-12 23:30:26 +02:00
bors[bot] c16ad24bec
Merge #4974
4974: Its is not ctrl+leftclick but ctrl+rightclick r=def- a=ChillerDragon

Thanks to `@c0d3d3v` for debugging my left right weakness lmao.

I initially intended left click but that was conflicting with navigation already so I switched it. But not the description.

Co-authored-by: ChillerDrgon <ChillerDragon@gmail.com>
2022-04-11 22:27:17 +00:00
Tater 712b3f041d fix local hookline direction when mouse is exactly center 2022-04-11 06:32:02 -05:00
ChillerDrgon 39be867e7b Its is not ctrl+leftclick but ctrl+rightclick 2022-04-11 11:28:05 +02:00
bors[bot] 0157deae61
Merge #4971
4971: Fix undefined behavior in fixed point number conversion r=def- a=Robyt3

See #4970:

```
/home/runner/work/ddnet/ddnet/src/base/math.h:50:11: runtime error: left shift of negative value -32
    #0 0x198d955 in i2fx(int) /home/runner/work/ddnet/ddnet/src/base/math.h:50:11
    #1 0x197ebdf in CLayerQuads::NewQuad(int, int, int, int) /home/runner/work/ddnet/ddnet/src/game/editor/layer_quads.cpp:47:22
    #2 0x18ef8d3 in CEditor::Init() /home/runner/work/ddnet/ddnet/src/game/editor/editor.cpp:6360:18
    #3 0xa8e5be in CClient::Run() /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:2917:13
    #4 0xaf6726 in main /home/runner/work/ddnet/ddnet/src/engine/client/client.cpp:4458:11
    #5 0x7fadd9e610b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
    #6 0x43cefd in _start (/home/runner/work/ddnet/ddnet/san/DDNet+0x43cefd)
```

Upstream https://github.com/teeworlds/teeworlds/pull/3143.

## Checklist

- [X] Tested the change ingame (on upstream)
- [ ] 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: Robert Müller <robytemueller@gmail.com>
2022-04-10 21:11:31 +00:00
c0d3d3v 5ba4ddd6dc
fix calculation of m_Angle of CCharacterCore 2022-04-10 19:12:56 +02:00
Robert Müller c14889e18a Code format: use multiple lines for function 2022-04-10 15:41:22 +02:00
Robert Müller 05bc25610b Fix undefined behavior in fixed point number conversion 2022-04-10 15:38:45 +02:00
c0d3d3v aeaaa67581
allow freecam to center on world border
fixes #4953
2022-04-09 15:24:57 +02:00
Robert Müller ee87077207 Move/Merge variable declarations with assignments in CServer 2022-04-08 19:53:22 +02:00
Robert Müller 60230f4eb7 Move/Merge variable declarations with assignments in CClient 2022-04-08 19:49:00 +02:00
Robert Müller 1daefbdeb2 Use bool instead of int 2022-04-08 19:40:28 +02:00
bors[bot] b12d334063
Merge #4960
4960: fix #4956 r=def- a=C0D3D3V

if the snapshots are in a different order than predicted SPEC_FREEVIEW was forced although a different ID is desired in NETOBJTYPE_SPECTATORINFO.


## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [x] Considered possible null pointers and out of bounds array indexing
- [ ] Written a unit test if it works standalone, system.c especially
- [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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-04-08 15:07:40 +00:00
c0d3d3v 97d2de7af8
fix #4956
if the snapshots are in a different order than predicted SPEC_FREEVIEW was forced although a different ID is desired in NETOBJTYPE_SPECTATORINFO.
2022-04-08 16:38:37 +02:00
ChillerDrgon d1798d23da Advertise ctrl+left mouse in tooltip 2022-04-08 15:38:38 +02:00
Dennis Felsing 8ef1f35f89 Revert "CGameClient::LoadMapSettings: Load the default tuning params by default"
This reverts commit 754562ce0b.

This breaks rendering for ddnet mode, thanks to cheeser0613 for report
2022-04-08 15:05:53 +02:00
ChillerDrgon fe712214a9 Editor: ctrl+leftclick tile to select layer 2022-04-08 14:59:33 +02:00
Dennis Felsing 2eb403be93
Merge pull request #4895 from def-/pr-practice-load
Reset practice when loading team (fixes #4894)
2022-04-08 01:37:17 +02:00
Edgar 3c904ffbb4
fix conflict 2022-04-07 09:46:02 +02:00
Edgar 0b8152f6e3
add 1 second delay to tooltips 2022-04-07 09:43:49 +02:00
Edgar 527835e171
fix style 2022-04-07 09:43:49 +02:00
Edgar 17d93f63e3
implement DoTooltip 2022-04-07 09:43:47 +02:00
Dennis Felsing 070975a174 Version 16.0.3 2022-04-05 17:43:31 +02:00
bors[bot] 34993f020c
Merge #4952
4952: Fix missing renamed shadowed variable r=def- a=Jupeyy

Caused by commit 8134f9fa55

Reported by Silex on discord:

https://user-images.githubusercontent.com/6654924/161612015-a04d6479-ac37-465e-929f-2cf5b7264103.mp4



## 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>
2022-04-04 20:45:21 +00:00
Jupeyy cd1a34c411 Fix missing renamed shadowed variable 2022-04-04 20:51:19 +02:00
Dennis Felsing 6caa29df7c Only try joining tutorial once we have server list
Otherwise quickly pressing enter you end up not joining tutorial
2022-04-04 10:17:39 +02:00
Jupeyy d397f692f8 Fix multi sampling 2022-04-03 18:49:41 +02:00
bors[bot] 4c1f60acfd
Merge #4854
4854: Replace static const in header with extern r=def- a=Chairn

This should prevent symbols from being demultiplied in different translation unit even if they are not used. Difference in size is as follow using a release build and no option set with cmake. With clang, difference is inferior to 1kB for any executable. With gcc, client size is reduced by 3.5kB.

I couldn't run the test suite (see https://github.com/ddnet/ddnet/issues/4853)

## 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: Chairn <chairn.nq@hotmail.fr>
2022-04-03 08:34:48 +00:00
Chairn 1f7b3159af ms_Pool* --> gs_Pool* 2022-04-03 01:30:00 +02:00
Chairn 691b0435db Change tolower array name to not conflict with tolower std function 2022-04-03 01:12:27 +02:00
Chairn ae1e3c079d clang-format 2022-04-03 01:12:27 +02:00
Chairn 21e64cbdcb Added external linkage instead of static const 2022-04-03 01:12:27 +02:00
def 04f51a55bb Version 16.0.2 2022-04-02 21:23:47 +02:00
def e4bec352d9 Remove unused bubble sort (finally) 2022-04-02 18:30:03 +02:00
bors[bot] 7546ee715f
Merge #4942
4942: Fix linux x86 compilation r=Jupeyy a=def-

```
src/engine/client/backend/vulkan/backend_vulkan.cpp:1422:108: error: no matching function for call to 'maximum(size_t&, VkDeviceSize)'
```
<!-- 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>
2022-04-02 15:39:19 +00:00
def d19623aceb Fix linux x86 compilation
src/engine/client/backend/vulkan/backend_vulkan.cpp:1422:108: error: no matching function for call to 'maximum(size_t&, VkDeviceSize)'
2022-04-02 17:22:49 +02:00
bors[bot] 2be8dc69cb
Merge #4941
4941: Keep DDNet window responsive for loading tasks r=def- a=Jupeyy

This will keep the DDNet window responsive, especially when loading the client the first time this is important, so that SDL2 events aren't lost.

Menu's RenderLoading allows up to 60 frames per second, so calling it too often cannot really happen.

For reloading (skins&assets) / demo loading etc. it only swaps to the render screen after half a second passed. Even if this might not be the nicest, it's still better than just freezing the window.

I hope this addresses issues from #4936



## 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>
2022-04-02 15:19:26 +00:00
Jupeyy f7e3662cd7 Keep DDNet window responsive for loading tasks 2022-04-02 17:03:23 +02:00
Robert Müller 36d9802c8c Move declaration of loop variable 2022-04-02 13:35:24 +02:00
Robert Müller ebb35a8a6f Replace BubbleSort with std::stable_sort 2022-04-02 13:35:24 +02:00
Robert Müller a30991ddd7 Mark CHuffman::Compress and ::Decompress as const 2022-04-02 13:35:24 +02:00
Robert Müller 8020934a26 Make frequency table a static member of CHuffman, use constant 2022-04-02 13:35:24 +02:00
Robert Müller f4ade69b5e Fix comments 2022-04-02 13:35:23 +02:00
Robert Müller c427c04522 Clear members explicitly instead of zeroing entire object 2022-04-02 13:35:23 +02:00
bors[bot] c6a1a1664a
Merge #4934
4934: Use fewer threads on 32-bit to save memory r=def- a=Jupeyy

Guess we should still let eeetadam test this

## 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: Jupeyy <jupjopjap@gmail.com>
2022-04-02 10:07:54 +00:00
bors[bot] 92b96884a3
Merge #4937
4937: Respect row pitch of temporary image r=def- a=Jupeyy

This fixes screenshots & demo->video rendering on some resolutions

`@Chairn` probs also for you since you probs interested ^^

## 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>
2022-04-01 23:48:20 +00:00
c0d3d3v 549fd7c784
fix color of ghost 2022-04-01 23:48:25 +02:00
Jupeyy bdfe2352e7 Respect row pitch of temporary image 2022-04-01 18:50:23 +02:00
bors[bot] a9094e1fc2
Merge #4931
4931: Fix IME issue (fixes #4888) r=Jupeyy a=def-

by terminating string instead of assuming that rest of chars are \0, which was just luckily true before.

## 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: Dennis Felsing <dennis@felsin9.de>
2022-03-31 17:50:19 +00:00
Jupeyy 0b1a801b7e Use fewer threads on 32-bit to save memory 2022-03-31 18:00:33 +02:00
Dennis Felsing 3d51a0715c Remove some comments 2022-03-31 17:30:39 +02:00
Dennis Felsing 623f57d860 Fix container overflow in video renderer (fixes #4932) 2022-03-31 17:30:34 +02:00
Dennis Felsing 27488f042f Fix IME issue (fixes #4888)
by terminating string instead of assuming that rest of chars are \0,
which was just luckily true before.
2022-03-31 12:52:24 +02:00
Dennis Felsing 2c1dfb3684 m_DisplayStr -> m_aDisplayStr 2022-03-31 12:52:24 +02:00
bors[bot] f953a9850e
Merge #4930
4930: Adjustable hook collision line alpha r=def- a=sjrc6

Suggested by louis in https://github.com/ddnet/ddnet/issues/4928


![image](https://user-images.githubusercontent.com/22122579/160996132-68fe36c1-7e64-4b7e-b1d7-f41c11d69e51.png)
![image](https://user-images.githubusercontent.com/22122579/160996410-3447bc23-73e3-4f99-a22e-cfa8486582d1.png)


- [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
- [ ] 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: Tater <Mr.Potatooh@gmail.com>
2022-03-31 07:45:20 +00:00
bors[bot] 11af040689
Merge #4927
4927: Revert "Revert "Update players.cpp"" (fixes #4926) r=Jupeyy a=def-

This reverts commit 36bfe24522.

Tested and couldn't reproduce the original problem with this.

<!-- 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
- [ ] 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>
2022-03-31 07:08:36 +00:00
Tater 3a197aa3da Hook collision line alpha 2022-03-30 20:15:27 -05:00
bors[bot] ebb092211a
Merge #4924
4924: fix gohst transparency of hook hand and ninja skin r=def- a=C0D3D3V

 https://streamable.com/oquu51
 
 reported by lomination 
fixes #4207 again

## 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
- [ ] 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: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
2022-03-30 21:35:20 +00:00
Dennis Felsing 68c7044912 Revert "Revert "Update players.cpp"" (fixes #4926)
This reverts commit 36bfe24522.
2022-03-30 23:29:35 +02:00
c0d3d3v 005667b99c
fix gohst transparency of hook hand and ninja skin 2022-03-30 20:40:46 +02:00
bors[bot] d94bc56cca
Merge #4923
4923: Check if the resolution is "really" not supported before applying des… r=def- a=Jupeyy

…ktop resoltution

probably fixes his problems
https://steamcommunity.com/app/412220/discussions/0/3176733964137910697/

## 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: Jupeyy <jupjopjap@gmail.com>
2022-03-30 17:52:31 +00:00
bors[bot] c592e71353
Merge #4917
4917: Use std::size instead of sizeof(a) / sizeof(a[0]) r=Jupeyy 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
- [ ] 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>
2022-03-30 17:08:27 +00:00
Jupeyy 7bf967f05f Check if the resolution is "really" not supported before applying desktop resoltution 2022-03-30 19:07:21 +02:00
Dennis Felsing 843acf6a5a Use std::size instead of sizeof(a) / sizeof(a[0]) 2022-03-30 18:55:04 +02:00
bors[bot] 5fbef34de2
Merge #4921 #4922
4921: Revert "Hook collision calculation each frame" r=Jupeyy a=def-

This reverts commit ccc23161f6.

Caused inaccuracies. I tried checking what calculations the server does,
but couldn't figure it out quickly. `@sjrc6` 

Reported by Zeral:
https://user-images.githubusercontent.com/2335377/160875760-e639c752-d2e1-4ace-b98f-772dce689186.mp4

<!-- 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)


4922: Reset thread count too, so the implementention knows its not multi th… r=def- a=Jupeyy

…readed at this point anymore

<!-- 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>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2022-03-30 16:47:48 +00:00
Jupeyy 0d4904f0b5 Reset thread count too, so the implementention knows its not multi threaded at this point anymore 2022-03-30 18:31:09 +02:00
bors[bot] 8a942a21dd
Merge #4920
4920: Rename 3D analysis config variable, so it resets, bcs the gl major/mi… r=def- a=Jupeyy

…nor configs were renamed

<!-- 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: Jupeyy <jupjopjap@gmail.com>
2022-03-30 15:52:48 +00:00
Jupeyy 2eebb48bfc Rename 3D analysis config variable, so it resets, bcs the gl major/minor configs were renamed 2022-03-30 17:42:35 +02:00
Dennis Felsing 36bfe24522 Revert "Update players.cpp"
This reverts commit ccc23161f6.

Caused inaccuracies. I tried checking what calculations the server does,
but couldn't figure it out quickly.
2022-03-30 17:41:59 +02:00
Jupeyy fe530aec59 Clear command list & helper after the threads joined 2022-03-30 17:18:41 +02:00
bors[bot] ee5652ce7f
Merge #4915
4915: Upgrade zlib to 1.2.12 r=Jupeyy a=def-

"Fix a deflate bug when using the Z_FIXED strategy that can result in
out-of-bound accesses." sounds security relevant.

<!-- 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>
2022-03-30 14:04:53 +00:00
bors[bot] 8cd78a8325
Merge #4916
4916: Try default opengl settings first, when vulkan fails r=def- a=Jupeyy

<!-- 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: Jupeyy <jupjopjap@gmail.com>
2022-03-30 12:59:21 +00:00
Dennis Felsing 3d67ccfa1b Version 16.0 2022-03-30 14:58:58 +02:00
Jupeyy 0d8338f743 Try default opengl settings first, when vulkan fails 2022-03-30 14:58:27 +02:00
Dennis Felsing c64879343d Upgrade zlib to 1.2.12
"Fix a deflate bug when using the Z_FIXED strategy that can result in
out-of-bound accesses." sounds security relevant.
2022-03-30 14:31:35 +02:00
bors[bot] af0b9790df
Merge #4907
4907: Vk only allow asserts after initialization r=def- a=Jupeyy

fixes #4891

`@Chairn` can you test if this is enough.

Also I'd like to open an issue on SDL2. So some minor questions:
Is libvulkan1.so installed on your system?
What does `vulkaninfo | grep driverID` show on your system?


## 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: Jupeyy <jupjopjap@gmail.com>
2022-03-30 07:32:29 +00:00
srdante ddba1dfdc2 Fix styles 2022-03-29 17:39:16 -03:00
srdante b642f519c1 Fix whisper sending/receiving differentiation 2022-03-29 17:35:50 -03:00
srdante cb5fab5958 Fix tests 2022-03-28 20:27:14 -03:00
srdante b98a137064 Always show /top local records 2022-03-28 20:20:23 -03:00
srdante 3ee8070a46 Fix SQL duplicated top and PlayerTeamTop5 2022-03-28 16:53:35 -03:00
srdante dba7889399 Differentiate team top 5 from player team top 5 2022-03-28 16:51:50 -03:00
bors[bot] 404d9ecb7f
Merge #4900
4900: Super: Don't send sounds to self r=heinrich5991 a=def-

As reported by louis 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
- [ ] 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>
2022-03-28 18:17:40 +00:00
Dennis Felsing 751a828109 Fix team not started message (fixes #4884)
Thanks to c0d3d3v for noticing
2022-03-28 16:29:23 +02:00
Jupeyy 3bcb49f9d7 Vk only allow asserts after initialization 2022-03-28 11:29:02 +02:00
bors[bot] c9f462b70d
Merge #4901
4901: Fix websocket crash on client connect r=def- a=srdante

Currently when a client tries to connect using websocket it will throw a segmentation fault. This is happening because of the std::string is trying to convert a char array with empty values to string directly.

```
==2305850== Invalid write of size 8
==2305850==    at 0x48401E9: memcpy@GLIBC_2.2.5 (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2305850==    by 0x1E762D: websocket_callback(lws*, lws_callback_reasons, void*, void*, unsigned long) (in /home/ploi/ddnet/build/DDNet-Server)
==2305850==    by 0x4C7FB98: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C82F61: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C83206: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C9B84B: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C7E0B4: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C7E5C9: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C77EC6: lws_service_fd_tsi (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C9728A: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C974CC: ??? (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==    by 0x4C78114: lws_service (in /usr/lib/x86_64-linux-gnu/libwebsockets.so.15)
==2305850==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
```

<!-- 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
- [ ] 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: srdante <minidantebtc@gmail.com>
2022-03-26 22:19:05 +00:00
srdante 8f8b3e0a34 Convert char array to string 2022-03-26 18:31:32 -03:00
def 46f20754d5 Super: Don't send sounds to self
As reported by louis on Discord
2022-03-26 16:49:46 +01:00
bors[bot] ea852d8f1c
Merge #4852
4852: Fixed some useless double promotion r=def- a=Chairn

Double promotion occurs quite often when an operator is an hidden double, like constants written without the 'f' at the end. We might get a tiny micro improvement. Unfortunately, we can't do anything for all the double promotion occurring in printf like functions as it is the default for both C and C++.

Only this line might change physics:
4d47fcda09 (diff-d76009083687ba43c59dc7bb2c7357457c999c2eb9d913967d598e913c6fd01fR406)

## 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
- [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: Chairn <chairn.nq@hotmail.fr>
2022-03-25 18:29:02 +00:00
Dennis Felsing 939d5436b0 Retry tutorial join after 5 seconds 2022-03-25 17:37:55 +01:00
Dennis Felsing 3ee8d880fe Hacky way to join tutorial from LAN 2022-03-25 17:14:48 +01:00