Commit graph

10207 commits

Author SHA1 Message Date
heinrich5991 bebc417e99 Ensure a snap is evaluated before the world is rendered the first time 2021-09-15 16:58:33 +02:00
heinrich5991 b7fe9b112c Clear game info on connect
Previously, the old game info persevered into the next server.
2021-09-15 16:22:50 +02:00
heinrich5991 ca2d85107e Update world config even if the local character is dead
Interesting for weapons etc.
2021-09-15 16:05:30 +02:00
heinrich5991 ac50cd1fe7 Split long system message into two lines
Thanks to @murpii for noticing the long line.
2021-09-15 14:47:20 +02:00
ChillerDragon de4e1ea644 Merge UnloadTexture with UnloadTextureNew 2021-09-15 13:19:54 +02:00
bors[bot] a49082d510
Merge #4164
4164: Use gametick as int for emoticon calculation, add the fraction sepera… r=def- a=Jupeyy

I had a wrong parentheses, which resulted in the calculation using floats instead of double, which isnt nice with high ticks, bcs of the float value range

Then I decided to use the gametick as int, bcs in the if before the calc it compared the float against -1, which isnt really nice anyway

So I split the vars, which then doesnt require double

Also simplified the math for readability

## 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>
2021-09-15 06:51:21 +00:00
Jupeyy 9deac14667 Use gametick as int for emoticon calculation, add the fraction seperately 2021-09-15 01:06:30 +02:00
Zwelf eacd314701 Move team and practice mode recording to the beginning of the tick 2021-09-14 22:33:09 +02:00
Zwelf 81f4263428 Record team practice mode making replay easier 2021-09-14 22:10:43 +02:00
Alexander Akulich 895a0b3451 CServer::ProcessClientPacket(): Adjust the debug message buffer size
We allocated 512 bytes to dump up to 32 data bytes in a hex form.
According to the str_hex() implementation, we need three bytes per the
source data byte (a byte is represented as a two-digit hexadecimal number
with appended space char) plus the null-termination.

We actually could re-use the last space char for the null, but it is not
implemented in str_hex(). Keep this logic as-is.

The stack-allocated buffer size reduced from 512 to 97 bytes.
2021-09-14 20:59:29 +03:00
Alexander Akulich 92abe8d545 Use str_hex() for CServer::ProcessClientPacket() debug output 2021-09-14 20:49:53 +03:00
Jupeyy 4982f8536e Fix shift + tab selecting second last index in console, player name chat & command chat 2021-09-14 13:15:09 +02:00
Jupeyy 1e07a00c3b Refactor CUIElements 2021-09-14 00:21:20 +02:00
Jupeyy 7f5ca0ffe1 Small graphic refactoring 2021-09-14 00:21:17 +02:00
trml c194c7e710 Send extended entity info 2021-09-13 22:22:02 +02:00
bors[bot] 1d9557de20
Merge #3783
3783: Further fixes for Haiku r=def- a=panos

- Haiku is Unix-like, but it still doesn't use libnotify.
- Haiku comes with its own sets of definitions for certain long variables. There's still a problem revolving around the variables, but I removed a duplicate, conflicting definition on the Haiku platform.
- Changed some definition-related logic in detect.h, because the gcc compiler in Haiku (version 8.3.0) complained about duplicate definitions. I chose to use 'unknown' rather than an empty string.

I think that I'm very close.

Co-authored-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
Co-authored-by: def <dennis@felsin9.de>
2021-09-13 19:26:25 +00:00
def b357007897 Fix clang-format 2021-09-13 21:13:39 +02:00
heinrich5991 243c1daa96 Use #include <> instead of #include "" for non-relative includes 2021-09-13 21:04:21 +02:00
Panagiotis Vasilopoulos cc49273cb4
Fixed typo
TO BE SQUASHED LATER
2021-09-13 20:12:21 +02:00
bors[bot] 18eabe0038
Merge #4158
4158: Make emoticons smoother r=heinrich5991 a=Jupeyy

It's still not 100% the same as with high bandwidth, but atleast animation wise it should look the same.
The client doesn't predict if an emote actually is triggered, so it still only triggeres them every second tick without high bandwidth.

~Since this changes demo playing quite a bit, it should defs be tested~(not really xd)

fixes #4156

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-09-13 15:51:04 +00:00
Jupeyy c06edd9aeb Update server list silently 2021-09-13 16:50:40 +02:00
heinrich5991 91b60e6981 Make emoticons smoother 2021-09-13 16:26:48 +02:00
Panagiotis Vasilopoulos 3b1c074842
Further fixes for Haiku
- Haiku is Unix-like, but it still doesn't use libnotify.
- Haiku comes with its own sets of definitions for certain long variables.
  There's still a problem revolving around the variables, but I removed a
  duplicate, conflicting definition on the Haiku platform.
- Changed some definition-related logic in detect.h, because the gcc compiler
  in Haiku (version 8.3.0) complained about duplicate definitions. I chose to
  use 'unknown' rather than an empty string on one occasion.
- Changed size of m_aLastSoundPlayed[CHAT_NUM] in
  `src/game/client/components/chat.cpp` due to an undocumented/undiscovered bug
  in Haiku.
2021-09-13 15:29:32 +02:00
ChillerDragon d60e330085 Pointer naming convention in UnloadTexture 2021-09-13 14:55:21 +02:00
bors[bot] 2916f1b7d4
Merge #3991
3991: Implement upstream download code style r=heinrich5991 a=ChillerDragon

In https://github.com/teeworlds/teeworlds/pull/2556 teeworlds introduced temporary download files for maps. DDNet already has that but a bit different. Those temporary files are now also deleted on error like it is done in the upstream. The main goal of this pr is to reduce code diff to upstream.

Tested official ddnet maps over http and other maps.

## 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: Robert Müller <robert.mueller@student.uni-siegen.de>
Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-09-13 12:00:29 +00:00
ChillerDragon 1e7dea54d6 Merge branch 'master' into pr_rm_incomplete_download 2021-09-13 13:57:09 +02:00
heinrich5991 43379503fc
Merge pull request #4114 from fokkonaut/pr-switch
Send switch states only for own team
2021-09-13 13:40:07 +02:00
oy 9e17281573 invalidate texture when unloading a texture.
Closes https://github.com/teeworlds/teeworlds/issues/1450

(cherry picked from commit 23a1b80f60)
2021-09-13 13:23:00 +02:00
bors[bot] 1a3eaff5f0
Merge #3851
3851: Record last 10 demos by default r=heinrich5991 a=def-

Opinions? Someone on Discord just had the issue that a gameplay on FNG wasn't recorded. I think keeping the last 10 demos around isn't too expensive disk-wise.

## 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>
2021-09-13 11:16:53 +00:00
bors[bot] 84ea62d769
Merge #4148
4148: Kill unfinishable teams if they don't enter /practice within a minute r=Learath2 a=heinrich5991

This is to avoid players playing in unfinishable teams for a long time
if they don't understand the system messages.

Fixes #4088.

## 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: heinrich5991 <heinrich5991@gmail.com>
2021-09-13 11:04:03 +00:00
bors[bot] ebd74c72a5
Merge #4155
4155: Remove a `#include <base/system.h>` r=Jupeyy a=heinrich5991

The variable isn't actually a path, just the test name formatted as file
name, so the 64 isn't actually too strict.

<!-- 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: heinrich5991 <heinrich5991@gmail.com>
2021-09-13 10:48:58 +00:00
heinrich5991 9b4b0cd4eb Remove a #include <base/system.h>
The variable isn't actually a path, just the test name formatted as file
name, so the 64 isn't actually too strict.
2021-09-13 12:40:40 +02:00
bors[bot] 38eba0c83c
Merge #4153
4153: Some char array naming convention r=heinrich5991 a=ChillerDragon

<!-- 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: ChillerDragon <ChillerDragon@gmail.com>
2021-09-13 10:39:39 +00:00
bors[bot] 89e3d694b9
Merge #4152
4152: Make use of IO_MAX_PATH_LENGTH r=heinrich5991 a=ChillerDragon

Inspired by
0a7d0fee7c

<!-- 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: ChillerDragon <ChillerDragon@gmail.com>
2021-09-13 10:31:26 +00:00
ChillerDragon 43b67b1c3a Remove commented out render code 2021-09-13 12:31:08 +02:00
ChillerDragon 5140854d68 Some char array naming convention 2021-09-13 12:21:56 +02:00
ChillerDragon 3eb3dcd48b Make use of IO_MAX_PATH_LENGTH
Inspired by
0a7d0fee7c
2021-09-13 12:14:50 +02:00
bors[bot] 357bc79310
Merge #4147
4147: Add -DHEADLESS option to cmake (nulled gfx) r=def- a=ChillerDragon

This allows compiling the client without graphics backend and thus it
can run also in a non graphical enviornment

<!-- 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
- [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: ChillerDragon <ChillerDragon@gmail.com>
2021-09-12 08:49:14 +00:00
heinrich5991 d8423884a3 Use CGameContext::SendChatTeam where possible 2021-09-11 20:23:27 +02:00
heinrich5991 d6c344853a Kill unfinishable teams if they don't enter /practice within a minute
This is to avoid players playing in unfinishable teams for a long time
if they don't understand the system messages.

Fixes #4088.
2021-09-11 20:23:27 +02:00
fokkonaut 7aa4652715 Always send correct zoom dimensions 2021-09-11 01:08:32 +02:00
ChillerDragon 1c8165adaa Cleaner nulled gfx
Remove not needed method definitions.
Feed the graphics engine with some fake data.

This removes valgrind warnings.

Thanks to @Jupeyy for helping a lot :)
2021-09-09 14:03:59 +02:00
ChillerDragon 5997304080 Add -DHEADLESS_CLIENT option to cmake (nulled gfx)
This allows compiling the client without graphics backend and thus it
can run also in a non graphical enviornment
2021-09-09 13:29:15 +02:00
bors[bot] dc03672af3
Merge #4142
4142: Fix parantheses warning r=Jupeyy a=def-

This condition is too complicated to understand I think...
```
src/game/client/components/players.cpp: In member function ‘void CPlayers::RenderPlayer(const CNetObj_Character*, const CNetObj_Character*, const CTeeRenderInfo*, int, float)’:
src/game/client/components/players.cpp:546:130: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  546 |         if(((!IVideo::Current() && (g_Config.m_ClShowDirection >= 1)) || (IVideo::Current() && g_Config.m_ClVideoShowDirection)) && ClientID >= 0 || DemoPlayer()->IsPlaying())
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
```
<!-- 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>
2021-09-04 11:28:51 +00:00
bors[bot] 845c04fc22
Merge #4143
4143: Fix cl_show_direction wrong maximum r=Jupeyy a=HamidReza585

The maximum for cl_show_direction was supposed to be 2 but it looks like I forgot to change it in #4133  so if someone check show local player's key presses in DDNet settings (or do cl_show_direction 2), it will be reset to 1 next time the client launches.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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: HamidReza <57710259+HamidReza585@users.noreply.github.com>
2021-09-04 11:19:52 +00:00
HamidReza 00e2206cc5 Fix cl_show_direction 2 wrong maximum 2021-09-04 15:37:37 +04:30
def f90722c817 Fix parantheses warning
This condition is too complicated to understand I think...

src/game/client/components/players.cpp: In member function ‘void CPlayers::RenderPlayer(const CNetObj_Character*, const CNetObj_Character*, const CTeeRenderInfo*, int, float)’:
src/game/client/components/players.cpp:546:130: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  546 |         if(((!IVideo::Current() && (g_Config.m_ClShowDirection >= 1)) || (IVideo::Current() && g_Config.m_ClVideoShowDirection)) && ClientID >= 0 || DemoPlayer()->IsPlaying())
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
2021-09-04 11:22:43 +02:00
bors[bot] c108d683c9
Merge #4139
4139: Fix spec-char not being shown r=def- a=fokkonaut

Caused by #4124, sorry for that. Characters are being removed from the Gameworld when entering /spec, therefore they dont get processed and the spec-char was not shown at all.
Also removed the m_Paused check in CCharacter::Snap because it does not even get called.

Edit: This still keeps the wanted effect from #4124, using CanSnapCharacter()

## 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: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2021-09-02 08:21:21 +00:00
fokkonaut 1da212207e Fix spec-char not being shown 2021-09-02 10:20:58 +02:00
fokkonaut ea08601435 Allow placing unused tiles from other layers (#fixes 3794) 2021-09-01 11:43:32 +02:00
bors[bot] 646a4c9fcd
Merge #4133
4133: Add cl_show_local_direction (fixes #3978) r=def- a=HamidReza585

cl_show_local_direction allows you to see your own key presses during the game.

I changed the statements so it will allow local player to have key press arrows (inside the game), and I added a statement for configs (settings), so if you have cl_show_local_direction enabled, it will render the directions (arrows) for the local player. (Also affects demos and videos, same as cl_show_direction)

![ScreenShot](https://user-images.githubusercontent.com/57710259/131379491-c32047ef-7941-40eb-9ed5-381ea0cf5497.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
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: HamidReza <57710259+HamidReza585@users.noreply.github.com>
2021-08-31 08:51:04 +00:00
HamidReza 8dbebab524 Remove cl_show_local_direction and add cl_show_direction 2 2021-08-31 03:04:44 +04:30
HamidReza 79a0fabb82 Update players.cpp 2021-08-30 23:37:11 +04:30
HamidReza cc88cb96ff Revert "Update players.cpp"
This reverts commit 9e5a0b8e21.
2021-08-30 23:27:28 +04:30
HamidReza 9e5a0b8e21 Update players.cpp 2021-08-30 23:21:17 +04:30
bors[bot] d2bfb1e12a
Merge #4132
4132: document CComponent r=Jupeyy a=edg-l

I think this will make it easier for future people looking into this class.

## 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: Edgar Luque <git@edgarluque.com>
2021-08-30 18:43:09 +00:00
HamidReza 8bc5ec9bcc Add cl_show_local_direction
cl_show_local_direction allows you to see your own key presses during the game.
2021-08-30 21:26:23 +04:30
Edgar eb426c42e1
missed dots 2021-08-30 18:31:46 +02:00
Edgar f6220ed18d
document CComponent 2021-08-30 17:38:22 +02:00
bors[bot] a22f4ffc1e
Merge #4100
4100: Cleaned AFK checking r=def- a=gerdoe-jr

<!-- What is the motivation for the changes of this pull request -->

Using `bool` instead of `int` for `m_SendNAfkMsg`
Deleted `m_pAfkMsg` from `CPlayer` declaration
Cleaned last activity check code

Please test this PR, because I don't know what can go wrong here :P

## 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: Vlad <gerdoexx@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2021-08-30 15:08:41 +00:00
def 7d196976ce fix clang-format 2021-08-30 17:08:18 +02:00
Vlad df6f6bafc6 code re-use 2021-08-30 17:51:28 +03:00
bors[bot] f48249786c
Merge #4127
4127: Editor Bug Fixed r=def- a=HamidReza585

Fixed reported bug: #4007 

![ScreenShot](https://user-images.githubusercontent.com/57710259/131328675-41404b79-1b60-4e2b-8ab5-215c552432eb.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
- [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: HamidReza <57710259+HamidReza585@users.noreply.github.com>
2021-08-30 11:03:59 +00:00
HamidReza bc210df380 Editor Bug Fixed 2021-08-30 15:11:28 +04:30
bors[bot] 76db1d77f4
Merge #4121 #4124
4121: Editor Improvements r=def- a=HamidReza585

Added the option to write separate explanations for different entities and fixed the wrong explanation bug.

![ScreenShot](https://user-images.githubusercontent.com/57710259/131142608-a03ca2d3-6d34-4a8f-ac68-c99e1fb7c8e9.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
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4124: Fix specchar transparency and move spec-char to character snap (fixes #4123, #3816) r=def- a=fokkonaut

Fixes spec-char being rendered with transparency leading in almost invisible spec chars, aswell as moves spec-char to the character snap serverside.
Fixes #4123, #3816

## 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: HamidReza <57710259+HamidReza585@users.noreply.github.com>
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2021-08-30 09:10:53 +00:00
bors[bot] 121173b5d6
Merge #4111
4111: Fix filesystem/IO with unicode filenames on windows r=def- a=Robyt3

It was previously not possible to load a map or really any file with a filename containing unicode, e.g. german umlauts.

Now all filenames are converted from multibyte to widechar on windows, and the correct functions and structs (with the `W` suffix) are used consistently.

Some changes are made to synchronize ddnet's implementation with upstream (once https://github.com/teeworlds/teeworlds/pull/2936 has been merged there):
- The unused and not working `IOFLAG_RANDOM` is removed (on upstream ddnet's `IOFLAG_APPEND` is added instead).
- The `fs_listdir_info` function is renamed to `fs_listdir_fileinfo` and now using the parameter object `CFsFileInfo` that contains the filename, modified date and creation date, making it easier to add more properties in the future. `FS_LISTDIR_INFO_CALLBACK` is renamed to `FS_LISTDIR_CALLBACK_FILEINFO`.

## 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: Robert Müller <robert.mueller@uni-siegen.de>
2021-08-30 09:02:24 +00:00
Vlad a10ffd8dfa Merge branch 'master' of https://github.com/ddnet/ddnet into pr-unnecessary-multi-use 2021-08-29 11:49:44 +03:00
fokkonaut 73a21cab62 Fix specchar transparency and move spec-char to character snap 2021-08-29 03:04:22 +02:00
HamidReza 3ca09259be New Tiles & Improvements 2021-08-28 22:21:38 +04:30
HamidReza 009a951635 clang-format 2021-08-28 13:13:18 +04:30
BloodWod b9d660dd95 Add colors for dbg_msg console 2021-08-28 04:42:42 +05:00
HamidReza c9018a2117 More Tiles 2021-08-28 01:50:39 +04:30
HamidReza 8b69ffef22 clang-format 2021-08-27 22:58:11 +04:30
HamidReza 91d7a676b1 Update explanations.cpp 2021-08-27 19:58:51 +04:30
HamidReza 8dbefa734f Editor Improvements
Added possibility to write separate explanations for different entities and fixed a bug.
2021-08-27 18:36:27 +04:30
def 9dd65b4dce Fix offset of strong symbol in nameplate
As reported by Skeith
2021-08-27 15:46:55 +02:00
fokkonaut ae7e6c05f0 Send switch state of team 0 if character is not alive 2021-08-24 22:56:39 +02:00
bors[bot] a8c36540e5
Merge #4117
4117: Make fullscreen changes better (especially under windows) r=def- a=Jupeyy

This bug already existed in our current release, so its not related to some SDL update

## 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>
2021-08-24 16:29:55 +00:00
Jupeyy 7234c04c15 Make fullscreen changes better (especially under windows) 2021-08-24 18:23:31 +02:00
bors[bot] 43c3391124
Merge #3967
3967: Add state if no master was found r=Learath2 a=Jupeyy

fixes #3951

by adding a state if no master was found

## 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>
2021-08-24 12:31:55 +00:00
bors[bot] 73e71951b9
Merge #3960 #4006 #4103
3960: Display colors for strong / weak hook states r=Jupeyy a=BloodWod-513

<!-- What is the motivation for the changes of this pull request -->
Off by default, cl_nameplates_strongweak 1 to enable;
Also shown in debug mode (ctrl-shift-d);
You can change the colors in the HUD.

![hkUp2p8chGA](https://user-images.githubusercontent.com/33897884/126379859-1dc29c09-57fb-4d4b-9810-a4f0b09599a0.jpg)
![WCZx_ZR8fQ0](https://user-images.githubusercontent.com/33897884/126379863-3f25295a-ca36-4184-a0ed-1946b40ed967.jpg)
## Checklist
- [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
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4006: Add /team -1 r=Jupeyy a=gerdoe-jr

<!-- What is the motivation for the changes of this pull request -->

## Checklist
In addition for #4005.

Now /team -1 forces player to first empty team.

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4103: Fix swap resets switches. r=Jupeyy a=edg-l

Fixes #3806

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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: BloodWod <dayn_2013@mail.ru>
Co-authored-by: Ilya <33897884+BloodWod-513@users.noreply.github.com>
Co-authored-by: gerdoe-jr <gerdoexx@gmail.com>
Co-authored-by: Edgar Luque <git@edgarluque.com>
2021-08-24 12:23:12 +00:00
Jupeyy bde7e854ac Update GLEW 2021-08-24 14:05:35 +02:00
Jupeyy b216b6744a Add Android build scripts 2021-08-24 12:18:20 +02:00
bors[bot] acb87171a9
Merge #4107
4107: Upgrade resolution list r=def- a=Jupeyy

Quick overview about the changes made
- Add refresh rate to fullscreen modes
- Show current resolution(on window mode for example update the resolution). Current behavior is, that the list index isn't updated -> see picture below
- Save current resolution, even on windowed mode
- Move get videomodes to main thread, like all window API(probably safer)
- Better window states updates, e.g. in maximized state it should remove maximize flag, when resized by the resolution list
  And also update resolution when e.g. changing from fullscreen to windowed.
- No resolution list on desktop fullscreen, as this isn't intended anyway

windowed mode:
![screenshot_2021-08-22_13-30-07](https://user-images.githubusercontent.com/6654924/130354590-b92a2161-3207-498c-818e-34410092d2ed.png)

fullscreen:
![screenshot_2021-08-22_14-18-09](https://user-images.githubusercontent.com/6654924/130354801-821692ac-b1c3-41ad-a7b6-5ca59ceb6caa.png)


## 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>
2021-08-24 07:52:08 +00:00
fokkonaut b75c5b015f
Only send switch states of own team 2021-08-24 00:43:12 +02:00
fokkonaut 69fe35f288 Send switch states per team and cleanup 2021-08-23 23:26:36 +02:00
Robert Müller 2171373e3c fix code format 2021-08-23 15:29:31 +02:00
Robert Müller c89cdc6806 add fs_file_time 2021-08-23 13:29:33 +02:00
Learath 4014385a42 Clean up CDoor 2021-08-23 14:28:38 +03:00
Robert Müller 355466e0bf fix fs_is_dir with unicode on windows 2021-08-23 12:57:31 +02:00
Robert Müller f6954c8001 fix io_open with unicode on windows 2021-08-23 12:56:23 +02:00
Robert Müller 4a375242c5 fix fs_listdir and fs_listdir_fileinfo with unicode on windows 2021-08-23 12:49:15 +02:00
Robert Müller 75662b6c1a remove unused and not implemented IOFLAG_RANDOM, add assert 2021-08-23 12:30:12 +02:00
Jupeyy c7580b374c Remove Windows XP code 2021-08-23 12:05:01 +02:00
Jupeyy ac56075b1b Upgrade resolution list 2021-08-22 15:00:12 +02:00
bors[bot] da59deea84
Merge #4105
4105: fix console name of GfxDesktopWidth 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>
2021-08-21 20:31:20 +00:00
Jupeyy 36ad87f70a fix console name of GfxDesktopWidth 2021-08-21 21:38:30 +02:00
Väinö Mäkelä d94f52b447 Fix fullscreen resolution setting on SDL 2.0.16
SDL_SetWindowSize's documentation tells that SDL_SetWindowDisplayMode
should be used to set the sizes of fullscreen windows. SDL commit
72d812852023450b7c3850b8e87b63575df041ee changed SDL_SetWindowSize's
behavior so that it can no longer be used to set the screen resolution
with windows that are created in fullscreen mode.
SDL_SetWindowDisplaymode is used instead when the window is fullscreen.
2021-08-21 21:33:40 +03:00
bors[bot] 42f21c6dd9
Merge #3986
3986: Use consistent case for error messages r=def- a=ChillerDragon

Use the style introduced by `@def-` in
61e47422f6

consistency :)

## 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: ChillerDragon <ChillerDragon@gmail.com>
2021-08-21 10:03:10 +00:00
Edgar d7107da2f1
Fix swap resets switches.
Fixes #3806
2021-08-21 10:02:45 +02:00
def 9a03b6d01f Fix long maps not showing as finished (fixes #4092)
Only used client-side so no protocol change
2021-08-21 09:30:32 +02:00
Vlad 22df8707a1 less code, less memory use 2021-08-20 19:06:05 +03:00
bors[bot] 4ad16b0f74
Merge #4098
4098: Remove unused gfx_alphabits config variable and dead code r=def- a=Robyt3

The config variables are unused.

(First commit is also https://github.com/teeworlds/teeworlds/pull/2913)

## 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: Robert Müller <robert.mueller@uni-siegen.de>
2021-08-20 15:35:02 +00:00
bors[bot] 3de25b7290
Merge #4099
4099: Use minimum instead of std::min r=Learath2 a=Robyt3

This replaces remaining usages of `std::min` with `minimum`. Fixes build for me on Windows with Visual Studio 2015.

## 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: Robert Müller <robert.mueller@uni-siegen.de>
2021-08-20 15:27:08 +00:00
bors[bot] dba212112d
Merge #4089 #4093 #4094
4089: log git revision hash to stdout/console r=def- a=edg-l

Fixes #3963

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4093: Make fallback stronger and safer r=def- a=Jupeyy

- Save renderer & version string, so the fallback isn't portable between driver updates or system changes
- Only allow modern GL on modern systems(windows)
- Don't show modern GL in settings, if the driver is on the blocklist(this prevents Intel users from doing it, they can still force it over F1 console)

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


4094: Add prediction for switch tiles r=def- a=trml

Prediction of freeze and other tiles in switch layer (for #3990)

## 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
- [ ] 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>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: trml <trml@users.noreply.github.com>
2021-08-20 15:18:59 +00:00
Robert Müller 1820c72513 use minimum instead of std::min 2021-08-20 17:16:18 +02:00
Robert Müller 769ae98279 remove dead code 2021-08-20 17:09:46 +02:00
bors[bot] 863f7a9951
Merge #4096
4096: Allow floats arguments for zoom r=def- a=Jupeyy

fixes #3716

## 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>
2021-08-20 15:09:44 +00:00
Robert Müller fd66957f3a remove unused gfx_alphabits config variable 2021-08-20 16:58:39 +02:00
Robert Müller 8fa7610463 remove obsolete engine/shared/message.h 2021-08-20 16:23:29 +02:00
Jupeyy fea9eb5be5 Allow floats arguments for zoom 2021-08-19 22:13:04 +02:00
trml 08ef63a64c Add prediction for switch tiles 2021-08-19 01:11:38 +02:00
Jupeyy 372dbf702e Don't promote modern GL setting in menu, if the driver is on blocklist 2021-08-18 12:42:40 +02:00
Jupeyy 55abc3f7bb Make fallback stronger and safer 2021-08-18 12:42:30 +02:00
BloodWod 4dd37f63a6 refactoring 2021-08-17 21:33:14 +05:00
Edgar 200af585d3
check if GIT_SHORTREV_HASH exists
Co-authored-by: Emir Marincic <learath2@gmail.com>
2021-08-16 18:29:24 +02:00
Jupeyy 915ab512bc Add STATE_NO_MASTER 2021-08-16 18:27:43 +02:00
Jupeyy 6101782290 Make clicking refresh before current load is finished to calculate best master again 2021-08-16 18:27:43 +02:00
Learath a9c11d07b3 Check for null. Fix #4090 2021-08-16 19:11:43 +03:00
Edgar 74fac43376
log git revision hash to stdout/console
Fixes #3963
2021-08-16 16:38:44 +02:00
bors[bot] 3594d89f85
Merge #4003
4003: Use GL_ARRAY_BUFFER r=Learath2 a=Jupeyy

For older OpenGL contexts

`@Learath2` can you check 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>
2021-08-16 12:31:30 +00:00
bors[bot] 8d9fa1045c
Merge #4084
4084: Send switch state to the client r=Learath2 a=edg-l

<!-- What is the motivation for the changes of this pull request -->

This PR is related to #3990

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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>
2021-08-16 12:12:17 +00:00
bors[bot] 6b9bdbc259
Merge #4080
4080: Fix collecting weapon in solo part not making any sound. r=Jupeyy a=edg-l

fixes #3822
fixes #2219

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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>
2021-08-16 09:52:45 +00:00
Edgar 1dd91feec6
send switch state to the client 2021-08-16 11:15:23 +02:00
bors[bot] 6ff6570c83
Merge #4083
4083: Fix transparent shotgun bullets r=Jupeyy a=trml

Fixes #3591

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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: trml <trml@users.noreply.github.com>
2021-08-15 13:54:08 +00:00
trml 1977464f4b Fix transparent shotgun bullets 2021-08-15 11:33:45 +02:00
bors[bot] 140d36137e
Merge #3996
3996: Make the country/type selection more intuitive r=edg-l a=def-

I watched a live stream where someone struggled with this, not knowing
that right click has different functionality from left click, and had to
manually click on each entry to remove them all except one.

<!-- 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>
2021-08-15 08:28:18 +00:00
bors[bot] bfe8fac232
Merge #4008
4008: removed the operator int() from IGraphics::CTextureHandle and ISound:… r=Jupeyy a=ChillerDragon

…:CSampleHandle in order to catch more bugs

(cherry picked from commit 563f1d0c52)



## 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: Magnus Auvinen <magnus.auvinen@gmail.com>
2021-08-15 08:14:02 +00:00
Edgar 1148d0aaa4
fix style 2021-08-15 10:11:00 +02:00
Edgar 34bf70ab5f
Fix collecting weapon in solo part not making any sound.
Fixes #3822
2021-08-15 09:12:59 +02:00
Magnus Auvinen f8153a4f2a removed the operator int() from IGraphics::CTextureHandle and ISound::CSampleHandle in order to catch more bugs
(cherry picked from commit 563f1d0c52)
2021-08-14 21:54:18 +02:00
BloodWod 5894c26724 refectoring 2021-08-14 18:57:57 +05:00
Zwelf d6912f7ced Record team change in teehistorian 2021-08-14 15:22:13 +02:00
Zwelf aa41b60934 Don't record sv_reserved_slots_pass in teehistorian 2021-08-14 15:22:13 +02:00
Zwelf 6c452c15cf Record tee position at the end of the tick
priviously spawning players were recorded one tick too late
and add teehistorian minor version for the validator to recognize the
change
2021-08-14 15:22:13 +02:00
bors[bot] 94624c16ed
Merge #3984
3984: Disable chat sounds when recording without chat (fixes #3983) r=Learath2 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>
2021-08-14 13:10:52 +00:00
bors[bot] 5f1f13da95
Merge #4002
4002: Populate jetpack field properly r=Jupeyy a=Learath2

Noticed by Anime.pdf on discord

Doesn't seem to break anything else unintendedly but I'd be more comfortable with it if `@trml` takes a look.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Learath <learath2@gmail.com>
2021-08-14 12:59:58 +00:00
bors[bot] c10508fbae
Merge #3981
3981: Add /emote normal description (thanks to tela) 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: def <dennis@felsin9.de>
2021-08-14 12:49:20 +00:00
Ilya adb4729464
add description for bind 2021-08-14 16:53:43 +05:00
BloodWod 75289d1272 add strong/weak icon 2021-08-14 03:48:49 +05:00
BloodWod 0aa2e37bff check extended data 2021-08-12 23:23:44 +05:00
BloodWod b44dabd00d add bind and diff arrows 2021-08-12 16:22:28 +05:00
Ilya 1661d51794 fix display colors 2021-08-11 16:28:25 +05:00
gerdoe-jr eb92bd2453 Whoopsie 2021-08-10 23:12:11 +03:00
gerdoe-jr 1cf43b48ae Add /team -1 2021-08-10 22:26:07 +03:00
Jupeyy ac5d731b91 Use GL_ARRAY_BUFFER 2021-08-08 16:55:19 +02:00
Learath c1446c5ce4 Populate jetpack field properly 2021-08-08 13:36:25 +03:00
def 20f0078206 Make the country/type selection more intuitive
I watched a live stream where someone struggled with this, not knowing
that right click has different functionality from left click, and had to
manually click on each entry to remove them all except one.
2021-08-05 11:28:33 +02:00
def 7dcca97900 Revert "Fix client use-after-free reported by mmmds"
Seems to cause problems:

> Hussain wrote
> :last update+ beta
> my dummy stuck ( this second time)
> disconnect and connect again useless still stuck
> and disconnect server too
> have to restart the game

This reverts commit ce2f29b5f1.
2021-08-04 16:30:25 +02:00
Robert Müller f974117ce0 download to .%pid%.tmp, rename to .map when done
The commit message is misleading. DDNet already had the pid.tmp behavior.
This just uses more the teeworlds style of doing it.

(cherry picked from commit 0da0cb8044)
2021-08-04 14:09:29 +02:00
Robert Müller 4ba3d206a0 also remove incomplete map when restarting download
(cherry picked from commit b67b55448a)
2021-08-04 11:11:41 +02:00
Robert Müller 2e31cf3258 delete incomplete map file when download is aborted
(cherry picked from commit github.com/teeworlds/teeworlds/commit/494f74902dcb0271235d3a0831ecd4c6db58b7e9)
2021-08-04 11:03:31 +02:00
bors[bot] 4a77882fcc
Merge #3988
3988: improved the debug graphs. r=def- a=ChillerDragon

Closes https://github.com/teeworlds/teeworlds/issues/1058

(cherry picked from commit bf61d41c49)

No hard feelings from my side about the clamp. I am just hunting down em diffs to the upstream. But `@heinrich5991` seemed a bit concerned [back in 2013](https://github.com/teeworlds/teeworlds/issues/1058#issuecomment-12178577)

Old:
![screenshot_2021-08-04_10-12-54](https://user-images.githubusercontent.com/20344300/128148556-e818d45d-a455-4021-89a3-6f61cf187c93.png)


New:
![screenshot_2021-08-04_10-15-08](https://user-images.githubusercontent.com/20344300/128148516-b5a5fc79-2db8-4379-9d20-1a39c4d6285a.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
- [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: oy <Tom_Adams@web.de>
2021-08-04 08:29:58 +00:00
oy deea648bcd improved the debug graphs.
Closes https://github.com/teeworlds/teeworlds/issues/1058

(cherry picked from commit bf61d41c49)
2021-08-04 09:58:50 +02:00
ChillerDragon 02abc95c18 Use consistent case for error messages
Use the style introduced by @def- in
61e47422f6
2021-08-03 16:41:04 +02:00
bors[bot] b475d4ffc5
Merge #3987
3987: Fix client use-after-free reported by mmmds r=def- a=ChillerDragon

Fix https://github.com/teeworlds/teeworlds/issues/2645

The `Sv_ReadyToEnter` net message is only valid while we're still
loading stuff, it is used to signal that we can send the `ENTERGAME`
system message. Simply ignoring the server message while we're in the
wrong part of the state machine works.

(cherry picked from commit a97f8a22de)


## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-08-03 14:40:33 +00:00
heinrich5991 ce2f29b5f1 Fix client use-after-free reported by mmmds
Fix https://github.com/teeworlds/teeworlds/issues/2645

The `Sv_ReadyToEnter` net message is only valid while we're still
loading stuff, it is used to signal that we can send the `ENTERGAME`
system message. Simply ignoring the server message while we're in the
wrong part of the state machine works.

(cherry picked from commit a97f8a22de)
2021-08-03 16:36:15 +02:00
bors[bot] 06823e06db
Merge #3985
3985: remove unused MenuTick, reuse existing m_LocalStartTime r=def- a=ChillerDragon

(cherry picked from commit 009b072c34)

Ok that was a weird cherry pick... 90% was already in :D


Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
2021-08-03 13:48:59 +00:00
Robert Müller c335d84373 remove unused MenuTick, reuse existing m_LocalStartTime
(cherry picked from commit 009b072c34)
2021-08-03 15:41:00 +02:00
def 677c55613c Disable chat sounds when recording without chat (fixes #3983) 2021-08-03 15:13:54 +02:00
Alexander Akulich ed8955e60f math: Rename frandom() to random_float() to match with random_int()
(cherry picked from commit 5e4c7b66c5)
2021-08-03 14:29:52 +02:00
def 0b8380a593 Add /emote normal description (thanks to tela) 2021-08-03 12:38:17 +02:00
heinrich5991 1f68e11445 Mark the inverted exclamation mark as confusable with i
They look pretty much the same in our font, but for some reason, the
inverted exclamation mark doesn't have confusables.
2021-07-27 02:43:04 +02:00
heinrich5991 707e13ff7a Update confusables_data.h to Unicode 13.0.0 2021-07-27 02:41:55 +02:00
bors[bot] d0b7802d9f
Merge #3969
3969: Stop accepting invalid ipv4's r=heinrich5991 a=gerdoe-jr

<!-- What is the motivation for the changes of this pull request -->
Fixes #3774.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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: Vlad <51330274+gerdoe-jr@users.noreply.github.com>
2021-07-27 00:19:42 +00:00
bors[bot] baff204b71
Merge #3971
3971: Disabling quick editing in the console r=def- a=BloodWod-513

<!-- What is the motivation for the changes of this pull request -->
I think it should fix #3925.

Previously, the game stopped due to the fact that it was possible to turn on the selection by a random click, but if you disable the quick edit flags, then the selection can be made only by right-clicking the mouse and selecting an necessery option. 

The game will also stop, but after copying it will immediately continue, and this eliminates accidental pressing, that is, the person is fully responsible for his actions.
![console](https://user-images.githubusercontent.com/33897884/126964490-89bb6138-3bdf-4325-8241-30fff3bfb7f0.jpg)
## 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: Ilya <33897884+BloodWod-513@users.noreply.github.com>
Co-authored-by: BloodWod <dayn_2013@mail.ru>
2021-07-26 12:01:19 +00:00
Vlad af3de10e72
Enable related tests 2021-07-26 13:48:12 +03:00
BloodWod 89bd2c6b15 disabling quick editing in the console 2021-07-26 14:27:27 +05:00
bors[bot] ffcc722e8b
Merge #3970
3970: Fix pressing Home or End in server address field changes the selected server r=Learath2 a=BloodWod-513

<!-- What is the motivation for the changes of this pull request -->
I think it should fix #3964.
# Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [ ] 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: BloodWod <dayn_2013@mail.ru>
2021-07-26 06:51:15 +00:00
BloodWod 48cd8ea740 fix home/end buttons 2021-07-26 11:34:31 +05:00
Vlad 01822cada8
EOF x2 2021-07-26 01:30:01 +03:00
Vlad e78ba96f3b
EOF 2021-07-26 01:23:10 +03:00
Vlad 28c34bd101
Stop accepting invalid ipv4's 2021-07-26 01:13:05 +03:00
bors[bot] b98263bfdb
Merge #3952
3952: Remove global components and global gameclient instance r=heinrich5991 a=Jupeyy

Prevents global constructors/destructors and is a bit of cleanup

would also fix the issue from #3948

## 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: Jupeyy <jupjopjap@gmail.com>
2021-07-25 09:49:08 +00:00
bors[bot] 9bfe4ec76a
Merge #3966
3966: Fix "tee hasn't hit the start line yet" error r=def- a=heinrich5991

It has been happening to all teams. Send `CGameTeams::OnCharacterStart`
even if the team has already started.

## 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: heinrich5991 <heinrich5991@gmail.com>
2021-07-24 22:37:41 +00:00
BloodWod 49686d81be delete hud and config variables 2021-07-25 01:22:36 +05:00
bors[bot] 95c936d6c9
Merge #3956
3956: Fix out of bounds in editor render image r=heinrich5991 a=Jupeyy

## 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>
2021-07-24 11:34:53 +00:00
heinrich5991 78d5cd8d76 Shuffle a condition around to get cleaner code 2021-07-24 13:04:03 +02:00
heinrich5991 b5363d4c01 Fix "tee hasn't hit the start line yet" error
It has been happening to all teams. Send `CGameTeams::OnCharacterStart`
even if the team has already started.
2021-07-24 12:57:06 +02:00
heinrich5991 b24fad1006 Make "can tee start the race" condition readable 2021-07-24 12:56:23 +02:00
heinrich5991 8b2c5949e4 Fix save codes (symptom: always jumping after load)
"\t" was missing for one variable.
2021-07-23 01:17:06 +02:00
Jupeyy c10a74c396 Go back to constructor destructor 2021-07-22 21:49:26 +02:00
bors[bot] 5ff7b7f9b5
Merge #3959
3959: Try to fix "start line skipping" r=Learath2 a=heinrich5991

Previously, tees could go around the start line on some maps, going
directly to the finish line while leaving one tee behind at the start.
By letting that sole tee start and kill itself, the team could be
directly at the finish at time 0:00.

Fix this by requiring every tee of a team to hit the start line before
being able to finish. Tees can still get some advantage by skipping the
start line, but it will no longer be a 0:00 finish.

<!-- 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: heinrich5991 <heinrich5991@gmail.com>
2021-07-22 17:27:34 +00:00
heinrich5991 9f57293ce8 Warn teams after 30s if not every tee has started
Part of fixing startline skipping.
2021-07-21 17:54:46 +02:00
heinrich5991 4c2bd53e9b /save each tee's starting state
Part of fixing start line skipping.
2021-07-21 17:54:46 +02:00
heinrich5991 35402b07d7 Try to fix "start line skipping"
Previously, tees could go around the start line on some maps, going
directly to the finish line while leaving one tee behind at the start.
By letting that sole tee start and kill itself, the team could be
directly at the finish at time 0:00.

Fix this by requiring every tee of a team to hit the start line before
being able to finish. Tees can still get some advantage by skipping the
start line, but it will no longer be a 0:00 finish.
2021-07-21 17:54:46 +02:00
bors[bot] 2aafda3fcb
Merge #3949
3949: Remove unused m_LastInput r=Learath2 a=Jupeyy

fixes #3948

## 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>
2021-07-21 10:37:13 +00:00
BloodWod f66abb79bf Added color for strong and weak states 2021-07-20 22:39:44 +05:00
Jupeyy 4338b4fda6 Fix out of bounds in editor render image 2021-07-17 12:53:16 +02:00
Jupeyy 432568bfd4 Fix disallowing arrow keys in editor edit box 2021-07-17 12:48:22 +02:00
Jupeyy 7e55b64556 Remove global CGameClient instance 2021-07-12 12:53:08 +02:00
Jupeyy 26c5332dc6 Remove components pointers 2021-07-12 12:14:02 +02:00
Jupeyy 8451775821 Make components member of CGameClient 2021-07-12 12:07:31 +02:00
Jupeyy f67a0055e7 Remove unused m_LastInput 2021-07-11 17:41:22 +02:00
bors[bot] dbc05f6bb0
Merge #3947
3947: Allow zooming to levels. Close #3923 r=def- a=Learath2

I guess no harm in adding this since it's such a trivial addition? If it's useful to someone might as well have it.

Closes #3923 

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Learath2 <learath2@gmail.com>
2021-07-10 14:16:20 +00:00
Learath2 1a6de7caf8 Allow zooming to levels. Close #3923 2021-07-10 15:53:23 +02:00
def 2a74ca331e Avoid double free on m_pScore (fixes #3939) 2021-07-08 20:21:22 +02:00
def 6598e0a543 Another MacOS -> macOS in translations 2021-07-08 09:08:08 +02:00
def 2cb3c575f5 Merge master into pr_use_cpp 2021-07-04 16:09:20 +02:00
bors[bot] f23475665f
Merge #3942
3942: Allow the antibot to get more insight into the network r=Learath2 a=heinrich5991

E.g. allow it to see the messages the server sends.

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-07-01 14:55:12 +00:00