Commit graph

9295 commits

Author SHA1 Message Date
def f9be02c411 Version 15.2.1: Quick autoupdate fix 2020-11-17 17:04:21 +01:00
def d65af80291 Version 15.2 2020-11-17 13:27:23 +01:00
bors[bot] 39f4e94ba2
Merge #3312
3312: DoEditBox clamp cursor position r=def- a=TsFreddie

Fix freezing with DoEditBox
Pretty small patch but seems to be working
Also removed the linewidth limit in DoEditBox to avoid multiline

fixes #3256

## 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: Freddie Wang <tsfreddiewang@gmail.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-17 11:19:28 +00:00
def c0b48ad89f Disable ninja jetpack when player has telegun
Required for map Taceht because of weapon tele interaction with jetpack

As requested by Cøke
2020-11-16 20:28:17 +01:00
def c3f6d89cac Fix random map vote reason to set stars
Caused by the hotfix for solo cheat

As reported by maggi323
2020-11-16 17:32:48 +01:00
Jupeyy fbf0aedfb2 Fix statboard rendering 2020-11-15 09:06:03 +01:00
Jupeyy e2be287827 numeric robustness 2020-11-15 07:40:24 +01:00
Jupeyy 51a31774f8 Don't trigger text alignment for editboxes 2020-11-15 07:15:38 +01:00
Freddie Wang d31397ade4 doeditbox 2020-11-15 13:24:18 +08:00
def cfd3f84106 Found some more times with mins, use hours for consistency 2020-11-14 00:22:21 +01:00
bors[bot] d80d1df0db
Merge #3297 #3305 #3307
3297: Fix memleak in CServer on instant shutdown r=Jupeyy a=def-

```
Direct leak of 566869 byte(s) in 1 object(s) allocated from:
    #0 0x4f28e3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f28e3)
    #1 0x55b3c9 in CServer::LoadMap(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:2312:49
    #2 0x55bfdd in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2351:6
    #3 0x56add2 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3553:21
    #4 0x7f54401cd09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
```

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


3305: DemoRecorder: Only remove existing filenames r=Jupeyy a=def-

As noticed by Jupstar

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


3307: Don't crash with debug mode in demo r=Jupeyy a=def-

Since character doesn't exist then. Reported by murpi

Originally introduced in https://github.com/ddnet/ddnet/pull/2578

<!-- 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>
2020-11-13 10:31:20 +00:00
bors[bot] 5602d3e9fb
Merge #3306
3306: Respect friend color in spectate mode ♥ too r=Jupeyy a=def-

As suggested by Cøke
![screenshot_2020-11-12_19-17-01](https://user-images.githubusercontent.com/2335377/98979616-d7cfda00-251b-11eb-857d-b592655ef538.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
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-11-13 10:20:08 +00:00
bors[bot] cb9e546440
Merge #3303
3303: Respect outline in skin metrics r=def- a=Jupeyy

beast.png has no body at all,
so for this skin we need to calculate the metrics with the outline.

Sadly comes with more overheat ofc

old:
![screenshot_2020-11-12_08-42-52](https://user-images.githubusercontent.com/6654924/98910148-15544900-24c3-11eb-8cde-3c5bfb847527.png)
new:
![screenshot_2020-11-12_08-41-30](https://user-images.githubusercontent.com/6654924/98910094-0077b580-24c3-11eb-804b-7849a7d18d14.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)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-13 09:08:52 +00:00
def 81bb7e661c Improve list box behaviour, make it more consistent
Make keys work after searching in vote menu

Unify some duplicated code
2020-11-13 08:03:34 +01:00
def 0c416df935 Respect friend color in spectate mode ♥ too
As suggested by Cøke
2020-11-13 07:44:25 +01:00
def 7aa6be9e12 Don't crash with debug mode in demo
Since character doesn't exist then. Reported by murpi

Originally introduced in https://github.com/ddnet/ddnet/pull/2578
2020-11-12 22:56:50 +01:00
def 8c4beb987c DemoRecorder: Only remove existing filenames
As noticed by Jupstar
2020-11-12 14:53:42 +01:00
Jupeyy 0c231c3668 Respect outline in skin metrics 2020-11-12 08:45:10 +01:00
bors[bot] 11d5e87047
Merge #3255
3255: Add block list for drivers r=def- a=Jupeyy

Only briefly tested,
- the error message is bad
- the impl basically only works for the intel windows string, so its not really a generalized list

fixes #3234
## 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>
Co-authored-by: def <dennis@felsin9.de>
2020-11-12 07:40:10 +00:00
Zwelf 03179af14d Fix updating points on SQLite3 backend 2020-11-11 20:27:22 +01:00
bors[bot] a12ec3c9a8
Merge #3279
3279: Add a script to check for variable name style violations, fix some variable names r=def- a=heinrich5991

Didn't fix all variable names because there were far too many. Ideas? At least the second commit should probably go in.

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-11-11 17:42:12 +00:00
bors[bot] bddb02e34d
Merge #3292
3292: Some shader refactoring r=def- a=Jupeyy

Small refactoring for GL 3.3+ shaders.
Removes "if" checks where unneeded or CPU can calculate the result faster.

Also renames some uniforms to be consistent within all shaders.

## 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>
2020-11-11 17:32:04 +00:00
def 71674b13da Fix memleak in CServer on instant shutdown
Direct leak of 566869 byte(s) in 1 object(s) allocated from:
    #0 0x4f28e3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f28e3)
    #1 0x55b3c9 in CServer::LoadMap(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:2312:49
    #2 0x55bfdd in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2351:6
    #3 0x56add2 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3553:21
    #4 0x7f54401cd09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
2020-11-11 17:24:51 +01:00
Jupeyy 4d9f4da3ec Fix dragger logic 2020-11-11 05:41:42 +01:00
Jupeyy a77e3ca842 Remove some "if" checks from shader(check at compile time) & cleanup 2020-11-10 04:39:13 +01:00
bors[bot] b7f9e7a277
Merge #3284 #3289
3284: play command: Only quit when demo exists (fixes #3283) r=heinrich5991 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
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


3289: Fix server browser columns r=heinrich5991 a=Jupeyy

Fixes the wrong text calculation for playercount, ping, etc. as reported in #bugs on discord

## 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: Jupeyy <jupjopjap@gmail.com>
2020-11-09 21:24:52 +00:00
bors[bot] b44bcd7228
Merge #3285
3285: Fix invalid server-assigned utf8 names with (1) prefix (fixes #3269) r=heinrich5991 a=def-

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-09 21:15:35 +00:00
Jupeyy 06c2e0af50 Fix server browser columns 2020-11-09 21:24:06 +01:00
def 225787ea39 Fix invalid server-assigned utf8 names with (1) prefix (fixes #3269) 2020-11-09 18:10:55 +01:00
bors[bot] 8dd1cd50ed
Merge #3274
3274: Add skin metrics r=def- a=Jupeyy

Finally i had time for this.
This addresses the problem with skin sizes( yes @Banana090 I care for you :* )

Finally a way to calculate skin sizes correctly:

**new**
![image](https://user-images.githubusercontent.com/6654924/98458133-b1154a80-218d-11eb-9c80-1dccec36a250.png)

old:
![image](https://user-images.githubusercontent.com/6654924/98458263-1ddd1480-218f-11eb-9ff2-25c318e8e89a.png)

Maybe more obvious(left new, right old):
![image](https://user-images.githubusercontent.com/6654924/98458338-c5f2dd80-218f-11eb-83f0-d3020a39f1a2.png)


So we can center skins always.

Currently I only applied this to chat, but it should be used everywhere, where a skin is rendered(except the actual game skin)
- Scoreboard
- Skin selection
- and so on

@def- i'd really like to get this into this next release, because I know ppl with smaller skins will complain about the offset.
I'll test it a bit tomorrow, maybe others can test it too already.

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-09 10:44:56 +00:00
def e0f7a0d64f play command: Only quit when demo exists (fixes #3283) 2020-11-09 09:10:25 +01:00
Jupeyy a9631bf9cd Fix text color change 2020-11-08 19:43:01 +01:00
heinrich5991 7663641ed2 Fix some variable name's style 2020-11-08 17:15:48 +01:00
trml 984352dd00 Only use individual character flags for collision when ddnetchar is available 2020-11-08 14:05:44 +01:00
Jupeyy df4c7a08c8 Add skin metrics 2020-11-08 10:28:47 +01:00
bors[bot] 03fbb9f423
Merge #3273
3273: Fix spawnpoints calculation r=def- a=Jupeyy

m_aNumSpawnPoints wasn't increased causing no spawn points to be loaded at all.
Also the maximum value it can have should be 64, not 64 - 1, bcs it's the upper limit, not the index.

## 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>
2020-11-08 09:09:27 +00:00
bors[bot] f6bcc3ca41
Merge #3272
3272: Fix browser wrong alignment r=def- a=Jupeyy

Must be a 1 instead of -1, caused at 74515d4b95



## 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>
2020-11-08 09:00:38 +00:00
Jupeyy 6db4323daf Fix spawnpoints calculation 2020-11-08 03:42:35 +01:00
Jupeyy 6fbb161846 Fix wrong alignment 2020-11-08 01:41:12 +01:00
bors[bot] 848bbf543d
Merge #3268
3268: Fix ScaleFontSize with too long strings r=Jupeyy a=def-

Thanks to PopCorn181 for report
![screenshot_2020-11-08_00-03-19](https://user-images.githubusercontent.com/2335377/98453118-d1c1ae00-2155-11eb-97cf-cd5a455c00d3.png)

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

## 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: def <dennis@felsin9.de>
2020-11-07 23:07:38 +00:00
def 7c0e2212e2 Fix ScaleFontSize with too long strings
Thanks to PopCorn181 for report
2020-11-08 00:02:35 +01:00
bors[bot] be06146c49
Merge #3252
3252: cl_chat_tee + cl_chat_background => cl_chat_old (fixes #3106) r=Jupeyy a=def-

![screenshot-20201105@131601](https://user-images.githubusercontent.com/2335377/98240075-30760480-1f69-11eb-91ab-4be84ab84aab.png)
![screenshot-20201105@131537](https://user-images.githubusercontent.com/2335377/98240077-310e9b00-1f69-11eb-8454-71d2c6612a2a.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
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 21:27:19 +00:00
bors[bot] 556f64775e
Merge #3242
3242: Enable most clang-tidy bugprone-*, misc-*, performance-* checks r=Jupeyy a=def-

Fixes #3134

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 20:15:30 +00:00
bors[bot] 536295ec74
Merge #3266 #3267
3266: Fix chat scoreboard collision for 16:9 and disable scoreboard checks … r=def- a=Jupeyy

…for lower aspect ratios

fixes #3223

![screenshot_2020-11-07_19-04-54](https://user-images.githubusercontent.com/6654924/98448455-6d3e2900-212c-11eb-9352-730119577178.png)

![screenshot_2020-11-07_19-04-43](https://user-images.githubusercontent.com/6654924/98448454-6c0cfc00-212c-11eb-89dd-51a74e4aa8d3.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)


3267: Add czech translation by eNJi r=heinrich5991 a=def-

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2020-11-07 19:02:55 +00:00
def 7e0cbb5b09 Fix sizeof differently 2020-11-07 19:57:25 +01:00
def d04f2cf962 blocklist_driver unit test: also check gl version 2020-11-07 19:56:21 +01:00
bors[bot] 3d00ae4414
Merge #3257
3257: Add cl_showhud_timer option (requested by hussainx3) r=heinrich5991 a=def-

![screenshot-20201106@092559](https://user-images.githubusercontent.com/2335377/98343428-1a704e80-2012-11eb-8fa2-37fe734c5056.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
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 18:54:32 +00:00
bors[bot] 2583343a4a
Merge #3254
3254: Warn when connecting to new server with high gametime r=heinrich5991 a=def-

as suggested by HalfNoob on Discord

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 18:46:44 +00:00
bors[bot] 85c4384045
Merge #3245
3245: Don't access m_aaSpawnPoints out of bounds r=heinrich5991 a=def-

As discovered by ASAN:

```
/home/teeworlds/src/master/src/game/server/gamecontroller.cpp:142:3: runtime error: index 65 out of bounds for type 'vec2 [64]'
    #0 0x5de082 in IGameController::OnEntity(int, vector2_base<float>, int, int, int) /home/teeworlds/src/master/src/game/server/gamecontroller.cpp:142:3
    #1 0x5c9f43 in CGameContext::OnInit() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:3291:20
    #2 0x4ae3aa in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2473:20
    #3 0x4c265d in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
    #4 0x7f400fedc09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #5 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)
```

## 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>
2020-11-07 18:32:42 +00:00
Jupeyy 5f7e8a7901 Fix chat scoreboard collision for 16:9 and disable scoreboard checks for lower aspect ratios 2020-11-07 19:05:23 +01:00
bors[bot] 17895d701a
Merge #3265
3265: Fix scoreboard on ddnet server r=Jupeyy a=def-

![screenshot_2020-11-07_18-36-44](https://user-images.githubusercontent.com/2335377/98447851-5990c380-2128-11eb-8577-62a795aa915e.png)

Broken in https://github.com/ddnet/ddnet/pull/3251

Thanks to louis for report

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 17:46:58 +00:00
def 6da48a0bc3 Fix scoreboard on ddnet server
Broken in https://github.com/ddnet/ddnet/pull/3251

Thanks to louis for report
2020-11-07 18:36:26 +01:00
def d0437df51d Smooth Camera -> Smooth Dynamic Camera, only show if dyncam active
As suggested by Pipou
2020-11-07 12:10:59 +01:00
def 254c970a8e Fix behaviour with cl_confirm_disconnect_time 0 2020-11-07 11:00:30 +01:00
Jupeyy 81a11532c5 Track the driver state 2020-11-07 07:01:12 +01:00
bors[bot] 612c592ef2
Merge #3260
3260: "Connect to" popup: Don't disconnect on enter (fixes #3259) r=Jupeyy a=def-

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 00:56:46 +00:00
bors[bot] b0ea7585b8
Merge #3248
3248: Update translations for 15.2 release r=Jupeyy a=def-

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-06 23:31:03 +00:00
bors[bot] eae65b2f5d
Merge #3251
3251: Scoreboard same line height and font size for each team (fixes #3216) r=Jupeyy a=def-

supersedes #3219
![screenshot_2020-11-05_12-21-53](https://user-images.githubusercontent.com/2335377/98235019-8cd52600-1f61-11eb-8d28-29ba62308008.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
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-11-06 23:13:52 +00:00
bors[bot] a59f8495f4
Merge #3247
3247: Initialize pointer in dragger r=Jupeyy a=def-

How did this not blow up all day long for years?!
    
Found by UBSAN:

    /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29: runtime error: member call on address 0x0000013319b8 which does not point to an object of type 'CCharacter'
    0x0000013319b8: note: object has invalid vptr
     00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
                  ^~~~~~~~~~~~~~~~~~~~~~~
                  invalid vptr
        #0 0x5501de in CDragger::Move() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29
        #1 0x5522c2 in CDragger::Tick() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:153:3
        #2 0x5eb11e in CGameWorld::Tick() /home/teeworlds/src/master/src/game/server/gameworld.cpp:261:11
        #3 0x58d660 in CGameContext::OnTick() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:751:10
        #4 0x4afefe in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2558:19
        #5 0x4c26fd in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
        #6 0x7f2c8cc9309a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
        #7 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)


## 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>
2020-11-06 23:06:27 +00:00
def 373275dc6c Connect to menu: Don't disconnect on enter (fixes #3259) 2020-11-07 00:00:25 +01:00
def 62e291b4d1 Allow opengl version 2.0 2020-11-06 19:00:23 +01:00
def 3b90f97aa5 Pull out blocklist_driver.cpp and unit test it 2020-11-06 19:00:14 +01:00
def 5c79e9aa80 Less deep nesting in ParseBlocklistDriverVersions 2020-11-06 17:15:47 +01:00
def 75b7474443 Add cl_showhud_timer option (requested by hussainx3) 2020-11-06 09:25:21 +01:00
Jupeyy 54946518dc Add block list for drivers 2020-11-05 21:07:14 +01:00
def c478600935 Warn when connecting to new server with high gametime
as suggested by HalfNoob on Discord
2020-11-05 20:19:31 +01:00
def b03b75146c cl_chat_tee + cl_chat_background => cl_chat_old (fixes #3106) 2020-11-05 13:16:25 +01:00
def e75d7a2ff8 Scoreboard same line height and font size for each team (fixes #3216, supersedes #3219) 2020-11-05 12:15:27 +01:00
def 7a9a67c5d7 Enable most clang-tidy misc-* checks 2020-11-05 12:03:14 +01:00
def 312b9d3bd8 Enable clang-tidy performance-* checks 2020-11-05 11:34:20 +01:00
def b0f9dc2139 Update credits 2020-11-05 09:53:03 +01:00
def 5b5cfa7d9e nick name -> nickname 2020-11-05 09:32:14 +01:00
def 21d76ed31d NOLINT bugprone-parent-virtual-call where clang-tidy is stupid
/media/ddnet/src/game/editor/layer_game.cpp:42:35: warning: qualified name 'm_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile' refers to a member overridden in subclass; did you mean 'CLayerTiles'? [bugprone-parent-virtual-call]
                m_pEditor->m_Map.m_pFrontLayer->CLayerTiles::SetTile(x, y, through_cut);
                                                ^~~~~~~~~~~~~
                                                CLayerTiles::
/media/ddnet/src/game/editor/layer_game.cpp:42:35: note: FIX-IT applied suggested code changes
2020-11-05 08:25:34 +01:00
def 809ce102bd NOLINT bugprone-forward-declaration-namespace 2020-11-05 08:25:34 +01:00
def ed27c49eea Fix bugprone-unused-return-value 2020-11-05 08:25:34 +01:00
def bf8ae71b7d Fix and NOLINT bugprone-sizeof-expression 2020-11-05 08:25:34 +01:00
def 5e2776de0d Fix bugprone-misplaced-widening-cast 2020-11-05 08:25:34 +01:00
def 1877943ceb Fix bugprone-signed-char-misuse with tolower 2020-11-05 08:25:27 +01:00
def ba53c7e20c Add most bugprone checks 2020-11-05 08:25:26 +01:00
def 2c3000ba81 Minor code cleanup in dragger.cpp 2020-11-05 07:53:04 +01:00
def 5b5d4404a6 Don't access m_aaSpawnPoints out of bounds
As discovered by ASAN:

/home/teeworlds/src/master/src/game/server/gamecontroller.cpp:142:3: runtime error: index 65 out of bounds for type 'vec2 [64]'
    #0 0x5de082 in IGameController::OnEntity(int, vector2_base<float>, int, int, int) /home/teeworlds/src/master/src/game/server/gamecontroller.cpp:142:3
    #1 0x5c9f43 in CGameContext::OnInit() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:3291:20
    #2 0x4ae3aa in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2473:20
    #3 0x4c265d in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
    #4 0x7f400fedc09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #5 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)
2020-11-04 23:16:04 +01:00
def 5a9d93f160 Initialize pointer in dragger
How did this not blow up all day long for years?!

Found by UBSAN:

/home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29: runtime error: member call on address 0x0000013319b8 which does not point to an object of type 'CCharacter'
0x0000013319b8: note: object has invalid vptr
 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
    #0 0x5501de in CDragger::Move() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29
    #1 0x5522c2 in CDragger::Tick() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:153:3
    #2 0x5eb11e in CGameWorld::Tick() /home/teeworlds/src/master/src/game/server/gameworld.cpp:261:11
    #3 0x58d660 in CGameContext::OnTick() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:751:10
    #4 0x4afefe in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2558:19
    #5 0x4c26fd in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
    #6 0x7f2c8cc9309a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #7 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)
2020-11-04 23:06:45 +01:00
def fea4481f8d Fix network x_ check (thanks to Jupeyy) 2020-11-04 19:28:06 +01:00
bors[bot] dcfdd05911
Merge #3237
3237: Create fallback wordlist in sourcecode (fixes #3206) r=Learath2 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
- [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: def <dennis@felsin9.de>
2020-11-03 23:45:20 +00:00
Zwelf 5914dbb8fa Fix UUID in test case comment for teehistorian-ddnetver-old@ddnet.tw 2020-11-03 23:00:39 +01:00
def 06b534c07d Create fallback wordlist in sourcecode (fixes #3206) 2020-11-03 17:01:16 +01:00
bors[bot] 9b64b9ba1d
Merge #3222
3222: Kick-voting someone from team doesn't kill locked team (fixes #3207) r=heinrich5991 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
- [x] Changed no physics that affect existing maps
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-11-03 11:59:34 +00:00
bors[bot] 643bbb53c0
Merge #3233
3233: Fix clang-tidy in text.cpp 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>
2020-11-03 11:52:36 +00:00
def 2c98f2b76b Kick-voting someone from team doesn't kill locked team (fixes #3207) 2020-11-03 08:37:56 +01:00
def 27625832f7 Fix clang-tidy in text.cpp 2020-11-03 08:30:12 +01:00
TsFreddie 996e519fe6 hint for disabling debug mode 2020-11-03 15:06:31 +08:00
bors[bot] 4abf699726
Merge #3117
3117: Enable further clang-tidy checks to modernize the code r=heinrich5991 a=def-

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html

And fix the code:

    cmake -GNinja -DWEBSOCKETS=OFF -DMYSQL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVIDEORECORDER=ON -DAUTOUPDATE=OFF -DANTIBOT=OFF -DUPNP=OFF -DPREFER_BUNDLED_LIBS=OFF -DINFORM_UPDATE=OFF -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--fix-errors" -DCMAKE_C_CLANG_TIDY="clang-tidy;--fix-errors" .
    ninja -j 1

Manually fixed sizeof(auto) in a few occurences (i.e. server.cpp:1359)

First steps for #3088

Co-authored-by: def <dennis@felsin9.de>
2020-11-02 21:56:04 +00:00
bors[bot] 1ee2462078
Merge #3231
3231: Fix skin index r=def- a=Jupeyy

Beside that this was wrong anyway, i hoped i could atleast get the index from the sorted list insert, but that returns the last index in the list, instead of the new inserted index(just like rn), so just revert what I added in 8d6148b20b

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-02 21:48:33 +00:00
bors[bot] d1cc109933
Merge #3228
3228: Add m_PosEnv (of sound sources) as index that must be offset when appending a map r=heinrich5991 a=Patiga

If you append a map to another, all indices of it must be offset. This doesn't happen with the position envelope index of sound sources, meaning it would (if the original maps had at least one envelope) point to the wrong envelope.

## 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: Patiga <dev@patiga.eu>
2020-11-02 21:40:50 +00:00
def 63c093c065 Get rid of remaining strcpy calls 2020-11-02 22:40:41 +01:00
def 165857a5a8 Fix variable names manually 2020-11-02 22:40:40 +01:00
def b1f0fd8969 Enable modernize-loop-convert clang-tidy check
and run clang-format afterwards

https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2020-11-02 22:40:24 +01:00
def dad91eb763 Enable readability-qualified-auto clang-tidy check
https://clang.llvm.org/extra/clang-tidy/checks/readability-qualified-auto.html
2020-11-02 22:40:02 +01:00
bors[bot] 37ccb77377
Merge #3220
3220: Fix overlapping of combined binds with modifiers [Fixes #3182] r=heinrich5991 a=Banana090

Just fixes https://github.com/ddnet/ddnet/issues/3182

Works as it used to work, but does not call for binds with no modifier when the same key was used already for modified bind


Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-11-02 20:49:12 +00:00
bors[bot] 54b970b68b
Merge #3180
3180: Warn new players about name with points (fixes #3178) r=heinrich5991 a=def-

![screenshot-20201023@233252](https://user-images.githubusercontent.com/2335377/97056097-73f36a80-1588-11eb-8a43-dd42e4ef6e7d.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
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-11-02 20:34:49 +00:00