Commit graph

7361 commits

Author SHA1 Message Date
bors[bot] 0b2eda2bd9
Merge #3434
3434: Add F-DDrace entities r=heinrich5991 a=fokkonaut



## 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>
2020-12-22 11:31:56 +00:00
bors[bot] e9b174a00f
Merge #3389
3389: Alternative alternative fix for malloc of size 0 r=def- a=heinrich5991

Has a short diff to the original code before a4f13ed4a8.
Supersedes #3353. Thanks for the idea, @timakro.

<!-- 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>
2020-12-22 11:23:40 +00:00
fokkonaut d4c4031f20 Add F-DDrace entities 2020-12-22 12:23:21 +01:00
bors[bot] e708f3a1b1
Merge #3405
3405: Keep veto right after joining dummy with lower ID (fixes #3404) 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-12-22 11:15:46 +00:00
bors[bot] 8a15bc15d5
Merge #3417 #3419 #3432
3417: Notify about vote when authed 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
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


3419: Only assign aOldName when we need it 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)


3432: Fix localization of version/game type/ping in server details 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
- [ ] 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-12-22 10:55:34 +00:00
def 57b1311b4b Fix localization of version/game type/ping in server details 2020-12-21 12:17:07 +01:00
bors[bot] f190e529b6
Merge #3427
3427: Remove hardcoded zoom level r=def- a=Jupeyy

E.g. on current tournament map its really annoying to not see the whole map at once to get a feeling for the map size

## 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-12-20 22:13:17 +00:00
bors[bot] f6ef42ce0d
Merge #3430
3430: Filter invalid kill messages r=def- a=Jupeyy

Fixes #3429

Also made it a bit safer by checking what the server sends

## 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-12-20 22:02:56 +00:00
Jupeyy cedb3e0b1f Filter invalid kill messages 2020-12-20 20:25:42 +01:00
Jupeyy 56d81678bd Remove hardcoded zoom level 2020-12-20 18:32:16 +01:00
bors[bot] 8d4e1a8b1a
Merge #3425
3425: Remove redundant check for pPlayer->m_IsReady r=Jupeyy 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-12-19 11:12:43 +00:00
def bdfb8bb06e Fix dragger being shown (fixes #3414)
Still doesn't seem to work with different team and /showothers 1, but
maybe that has always been the case
2020-12-19 11:30:56 +01:00
def 7eb26c62d1 Remove redundant check for pPlayer->m_IsReady 2020-12-19 10:20:18 +01:00
def 4d3d9d7049 Only assign aOldName when we need it 2020-12-18 23:18:55 +01:00
Дядя Женя b745feec73 Format 2020-12-18 23:35:22 +03:00
Дядя Женя 2c3d24d5b3 Merge branch 'pr_color_picker' of https://github.com/Banana090/ddnet into pr_color_picker 2020-12-18 23:29:52 +03:00
Дядя Женя b57d934b69 Polish 2020-12-18 23:28:33 +03:00
def fc75e95e35 Merge branch 'master' into pr_color_picker 2020-12-18 19:13:51 +01:00
def 6586ab20bc Play highlight sound on vote too when authed 2020-12-18 18:38:12 +01:00
def 567f0aa6d4 Notify about vote when authed 2020-12-18 12:58:01 +01:00
def da6930fba5 Version 15.2.4 2020-12-16 13:28:16 +01:00
Дядя Женя 9d77b8f716 Discard unnesaccery changes 2020-12-16 07:59:45 +03:00
Дядя Женя f4b8033056 Fixes 2020-12-16 07:55:41 +03:00
bors[bot] c564d788ad
Merge #3402
3402: Move PNG loading in SkinDL to fetch thread (fixes #3398) r=Jupeyy a=def-

Sorry for the trouble, seems to work.

<!-- 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
- [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-12-15 15:09:44 +00:00
bors[bot] 0f9f71d73c
Merge #3409
3409: Menu tabs animations r=def- a=Banana090

Cool menu tabs animations, please merge


Co-authored-by: Дядя Женя <spy090@yandex.ru>
Co-authored-by: def <dennis@felsin9.de>
2020-12-15 13:55:16 +00:00
Дядя Женя d80cdd20d4 Fix merge conflicts 2020-12-14 22:18:00 +03:00
Learath2 bd1c847300 Allow reordering in the settings editor 2020-12-14 12:06:11 +01:00
Дядя Женя ebee286f00 Another attempt to fix Lin & Mac build 2020-12-14 04:49:24 +03:00
Дядя Женя c084c9cde2 Fix Mac & Linux build 2020-12-14 04:18:04 +03:00
Дядя Женя 77f84ac831 Ready 2020-12-14 03:51:31 +03:00
def 82faad33e9 Fix clang-format 2020-12-13 19:31:37 +01:00
Дядя Женя 9b4dfc142a Merge branch 'master' into pr_color_picker
# Conflicts:
#	src/game/client/components/chat.h
#	src/game/client/components/menus_settings.cpp
2020-12-13 20:40:33 +03:00
Дядя Женя e234776de2 Merge branch 'master' into pr_animations_hud 2020-12-13 20:34:53 +03:00
def ea70c347a3 Keep veto right after joining dummy with lower ID (fixes #3404) 2020-12-13 17:58:24 +01:00
bors[bot] 483e7b2624
Merge #3403
3403: Allow resizing on Windows too r=def- a=Jupeyy

I actually wanted to fix the grabbing issue on Windows, but sadly couldn't fix it, while trying to fix it, i fixed the resizing stuff tho(tested with a vm on win10 and win7), also gfx_resizable 1 should be fine now with KDE too(couldn't reproduce that blackscreen bug anymore)

Tho I also want to share some things about the grabbing thing, maybe someone is interested in improving it:
I found out that disabling the console on windows and creating the window as fast as possible reduces the grabbing issues.
Even better was making the windows always on top so SDL doesn't call the grab when our window looses focus, while the IO stuff is blocking.
The code is really random but here are the things i tried(c881720137)



## 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-12-13 10:23:04 +00:00
Jupeyy bae42b9284 Recreate kill messages if required 2020-12-13 01:08:34 +01:00
Jupeyy cafd1a4e8f Allow windows resizing 2020-12-13 00:52:57 +01:00
def cd00c4c04b Move PNG loading in SkinDL to fetch thread (fixes #3398)
Sorry for the trouble, seems to work.
2020-12-13 00:08:46 +01:00
Zwelf 037bac8f13 Add /top5team s?i command to show all team ranks of a player 2020-12-10 13:44:11 +01:00
Zwelf b256250b7b Synchronize database thread via atomic_bool instead of use_count from shared pointer 2020-12-08 18:11:00 +01:00
def 2544c758a0 Add w as default bind for dummy hammer 2020-12-08 14:42:22 +01:00
heinrich5991 e805e42a94 Alternative alternative fix for malloc of size 0
Has a short diff to the original code before a4f13ed4a8.
Supersedes #3353. Thanks for the idea, @timakro.
2020-12-08 12:29:10 +01:00
Dennis Felsing 516c1cc599
Merge pull request #3382 from Zwelf/pr-fix-race-condition
Fix storing load/save result in main thread without incrementing usage count
2020-12-04 11:48:14 +01:00
Zwelf e15a91911e Fix storing load/save result in main thread without incrementing usage count
Resulting to race condition, since the main thread always thought that the
load/save thread already completed. Passing the shared_ptr by reference to
prevent a similar future bug to happen.

Fixes #3380
2020-12-04 11:09:21 +01:00
def b63d20a6e0 Check for m_pCharacter before accessing it (fixes #3372) 2020-12-02 11:37:55 +01:00
bors[bot] 0848df797a
Merge #3315
3315: Remove annoying "added option" logging r=heinrich5991 a=def-

Fills our logs all the time

<!-- 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-30 15:46:25 +00:00
def b32e421dff Remove annoying "added option" logging
Fills our logs all the time
2020-11-30 08:08:37 +01:00
bors[bot] 6eb56ffb13
Merge #3341
3341: Check finish of team after player joins spectators r=heinrich5991 a=def-

Reported by Jupeyy

<!-- 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
- [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-28 20:18:37 +00:00
def 9d66c2530b Check finish of team after player joins spectators
Reported by Jupeyy
2020-11-28 20:59:51 +01:00
bors[bot] b8fca40851
Merge #3340
3340: Fix vec_base constructors & remove useless operator r=heinrich5991 a=Jupeyy

Interestingly besides it found unused variables, this also found some "logic" errors, where vectors were used in `if`.

## 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-28 17:06:25 +00:00
bors[bot] 80a65c6326
Merge #3358
3358: Fix prediction with global collision off tiles and tunings (fix #2510) r=def- a=trml

Tested it now, and it seems that only the hook and collision off tiles were affected by this.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] 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>
2020-11-25 22:59:17 +00:00
trml 7bfd708405 Set ddnetchar flags when collision is disabled with server tunings 2020-11-25 23:38:29 +01:00
Jupeyy c0dbd4a6f5 Fix leak, initialize UI Element Rect 2020-11-25 13:11:34 +01:00
Headshot 9b460750fa
fix typo "authroized" 2020-11-24 21:50:10 -04:00
def bb43660cd4 Fix scroll bar (fixes #3347) 2020-11-21 18:30:24 +01:00
Vlad 28cf3b31ba rescue on freeze/dfreeze 2020-11-21 10:52:43 +01:00
Jupeyy f83d528f5d Fix vector constructor impl & remove useless operator 2020-11-20 12:14:33 +01:00
def d618c8e1e1 Fix assets menu
Multiple assets would be highlighted

Bug introduced in https://github.com/ddnet/ddnet/pull/3304
2020-11-19 18:11:00 +01:00
def 0278200da8 Version 15.2.3 2020-11-19 16:17:01 +01:00
bors[bot] 797116fbfe
Merge #3316
3316: Disable ninja jetpack when player has telegun r=heinrich5991 a=def-

Required for map Taceht because of weapon tele interaction with jetpack

As requested by Cøke

## 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>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2020-11-19 13:06:24 +00:00
Dennis Felsing 227405b645
Update src/game/server/entities/character.cpp
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-11-19 10:20:13 +01:00
bors[bot] b138c4038c
Merge #3304 #3310
3304: Improve list box behaviour, make it more consistent r=heinrich5991 a=def-

Make keys work after searching in vote menu
Unify some duplicated code

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


3310: Found some more times with mins, use hours for consistency r=heinrich5991 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-18 23:43:22 +00:00
bors[bot] 38d0bf3c40
Merge #3325
3325:  Add ball effects, even for invalid projectiles r=heinrich5991 a=Jupeyy

@pure-luck-999 can you test, if this is already enough?

fixes #3323

## 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-18 23:35:00 +00:00
Jupeyy 2a7ba8fe30 Add ball particles, even for invalid projectiles 2020-11-18 14:48:18 +01:00
bors[bot] 078247dd3e
Merge #3327
3327: Check skin/sprite images for correctness r=def- a=Jupeyy

I hope this helps with downloading things at wrong resolution again.

Note that this commit is smaller than it seems, bcs of renaming files and moving code to it.
Also this requires new translations.

In the skin database are invalid skins too:

![screenshot_2020-11-18_07-51-02](https://user-images.githubusercontent.com/6654924/99495409-e7637e80-2972-11eb-91ec-f8bb02a80e83.png)
![screenshot_2020-11-18_07-51-05](https://user-images.githubusercontent.com/6654924/99495410-e7fc1500-2972-11eb-94b8-aedc98e8ef67.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>
2020-11-18 12:27:47 +00:00
bors[bot] b4f8f7928f
Merge #3319
3319: Fix random map vote reason to set stars r=Learath2 a=def-

Caused by the hotfix for solo cheat

As reported by maggi323

## 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-18 11:49:36 +00:00
Jupeyy c989cd67f9 Check skin/sprite images for correctness 2020-11-18 07:59:15 +01:00
def f8b07f705e Version 15.2.2 2020-11-17 18:34:42 +01:00
bors[bot] 6e5d0cce6f
Merge #3321
3321: Mod by zero 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>
2020-11-17 17:08:04 +00:00
Jupeyy 6cefbcbbf9 Mod by zero 2020-11-17 18:01:23 +01:00
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
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
Jupeyy 0c231c3668 Respect outline in skin metrics 2020-11-12 08:45:10 +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
Jupeyy 4d9f4da3ec Fix dragger logic 2020-11-11 05:41:42 +01:00
Jupeyy 06c2e0af50 Fix server browser columns 2020-11-09 21:24:06 +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
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
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
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 75b7474443 Add cl_showhud_timer option (requested by hussainx3) 2020-11-06 09:25:21 +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 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 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
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
def 2c98f2b76b Kick-voting someone from team doesn't kill locked team (fixes #3207) 2020-11-03 08:37:56 +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
Jupeyy 532d845aed Fix skin load 2020-11-02 21:21:57 +01:00
Patiga 143074349e Add m_PosEnv as index that must be offset when appended 2020-11-01 23:04:33 +01:00
Jupeyy 1d912b2df6 Don't align text with scoreboard open 2020-11-01 04:56:50 +01:00
Jupeyy c984203c2d Revert "Disable Chat render on TAB and fix tee icon position"
This reverts commit 75987a26cf.
2020-11-01 04:48:10 +01:00
bors[bot] 84ed6b7be2
Merge #3221
3221: Revert "Show halloween skins only on Halloween" r=Jupeyy a=def-

People are clearly unhappy with this event, so let's revert it. On
servers I've set events 0 already.

This reverts commit ae90bdf3f9.

## 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-10-31 22:55:33 +00:00
bors[bot] 664fa86071
Merge #3214
3214: Sort skins without case (fixes #3213) r=Jupeyy a=def-

![screenshot-20201030@100602](https://user-images.githubusercontent.com/2335377/97680791-8f360c80-1a97-11eb-8cdf-87f8c2014d47.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-10-31 22:47:52 +00:00
def bb7ff2a482 Revert "Show halloween skins only on Halloween"
People are clearly unhappy with this event, so let's revert it. On
servers I've set events 0 already.

This reverts commit ae90bdf3f9.
2020-10-31 09:51:06 +01:00
Дядя Женя 119625d1c3
Merge branch 'master' into pr_animations_hud 2020-10-31 01:48:52 +03:00
Дядя Женя 7e180f93cb Fix rarest bug and typedef in UI animations 2020-10-31 01:45:46 +03:00
Дядя Женя 71079f0944 Fix overlapping of combined binds with modifiers 2020-10-31 01:23:07 +03:00
Дядя Женя c77648362d Some fixes to color picker 2020-10-30 22:30:06 +03:00
Дядя Женя 638a82b9bb Merge branch 'master' into pr_color_picker 2020-10-30 22:18:47 +03:00
Дядя Женя 75987a26cf Disable Chat render on TAB and fix tee icon position 2020-10-30 21:51:59 +03:00
bors[bot] 1f6eff2cd1
Merge #3204
3204: Much more readable Call Vote menu and code r=def- a=Banana090

I find "Call Vote" menu useless af right now, because it's simply impossible to read it. So when you want to call vote for a map you open website and find the one you want, after that making /map skipping the "Call Vote" menu completely. It's useful for calling for random map btw, but anyway too ugly to look at.

**OLD LOOK**
![callvoteold](https://user-images.githubusercontent.com/39315809/97338602-a48e1980-1892-11eb-8c93-5d8656d3abeb.png)

**NEW LOOK**
![callvotenew](https://user-images.githubusercontent.com/39315809/97339380-9096e780-1893-11eb-8c3c-1f8630096d9f.png)

**NEW LOOK (RconAuted)**
![callvotenewrcon](https://user-images.githubusercontent.com/39315809/97340605-0e0f2780-1895-11eb-898b-3c3b8258cced.png)



Changed nothing, but row and text size + View rect size, because for some reason it was small for preserving space for RCON Auted users. Why?
Also changed the name of rect "Extended" to "RconExtension" to make it more clear what is it for.

Would be cool also to remove all that junk that is not actual votes from DDNet server vote list (finishers, average time) and merge it into one line with map's name. 

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


Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-10-30 09:08:51 +00:00
def 055eadd88d Sort skins without case (fixes #3213) 2020-10-30 10:05:48 +01:00
Дядя Женя d681cc6787 Rcon Panel looks just like before in call vote 2020-10-30 06:40:15 +03:00
Дядя Женя 0f0e0caab9 ColorPicker 2020-10-30 00:39:07 +03:00
bors[bot] 641d4db676
Merge #3171
3171: Some chat fixes r=def- a=Jupeyy

Very round:
![screenshot_2020-10-22_22-16-56](https://user-images.githubusercontent.com/6654924/96926091-6a4d0280-14b5-11eb-81bf-387019f29562.png)

bit round:
![screenshot_2020-10-22_22-17-33](https://user-images.githubusercontent.com/6654924/96926098-6de08980-14b5-11eb-8086-6b1ffc48bc86.png)

No rounding left:
![screenshot_2020-10-22_22-18-16](https://user-images.githubusercontent.com/6654924/96926111-72a53d80-14b5-11eb-93d3-cb3e4ff8b475.png)

No rounding at all:
![screenshot_2020-10-22_22-18-54](https://user-images.githubusercontent.com/6654924/96926120-76d15b00-14b5-11eb-8ab8-1cb1dfc8c1a8.png)

old chat:
![screenshot_2020-10-22_22-28-43](https://user-images.githubusercontent.com/6654924/96926568-04ad4600-14b6-11eb-92eb-ff3400edc499.png)


Just gave some examples so its easier to see what is nice

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-29 17:04:14 +00:00
Дядя Женя 94e227c8c3 Color picker: Settings UI + Picker Logic, Editboxes left 2020-10-29 03:55:01 +03:00
Zwelf 6eb95c6b96 Fix random_map and random_unfinished_map on SQLite server 2020-10-28 22:36:54 +01:00
Дядя Женя e817a179da Started making color picker 2020-10-28 05:59:50 +03:00
Дядя Женя 15f5ec9297 Tweaked call vote values 2020-10-27 20:31:27 +03:00
Дядя Женя ccbdfbb823 Much more readable Call Vote menu and code 2020-10-27 20:23:20 +03:00
Dennis Felsing 1347537561 Fix style in render.cpp 2020-10-27 13:18:33 +01:00
Дядя Женя 05d6201a72 DrawRoundRectEx readability 2020-10-26 21:50:56 +03:00
Дядя Женя b18d72db1f using time_get_mircoseconds and storing it as int64 val 2020-10-26 17:47:26 +03:00
bors[bot] 9a257a76e1
Merge #3195
3195: Use str_truncate more often 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: Dennis Felsing <dennis@felsin9.de>
2020-10-26 12:08:34 +00:00
bors[bot] a03df3a4d1
Merge #3141
3141: More hours (fixes #3140) r=heinrich5991 a=def-

Will also look into #3140 and fix here.

Co-authored-by: def <dennis@felsin9.de>
2020-10-26 12:00:13 +00:00
Dennis Felsing 9c8c36456b Use str_truncate more often 2020-10-26 12:56:21 +01:00
bors[bot] 499cbb254d
Merge #3128
3128: Add add_map_votes command for easier local map testing r=heinrich5991 a=def-

No need to tell new players how to manually add a vote or load a map from rcon

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2020-10-26 11:52:39 +00:00
Dennis Felsing 9b810017e1 str_truncate instead of str_copy 2020-10-26 12:49:19 +01:00
Dennis Felsing bb2f446802 Escape map in change_map 2020-10-26 11:28:04 +01:00
bors[bot] 331c9f695c
Merge #3124
3124: Remove option to make map sounds external r=def- a=Patiga

![2020-10-17-180507_401x333_scrot](https://user-images.githubusercontent.com/44099679/96347669-8dd21080-10a3-11eb-8b24-abdab7f41020.png)
Right now it is impossible to have a working external sound. External
sounds render unusable the moment the map is saved and given to another
player. For the mapper it seems like everything is working since the
mapper has the sound file. For anyone else it simply won't work. Since
1. there is no use for it and
2. it adds unnecessary complexity and confusion, 
I propose removing it entirely.

None of the ddnet maps use external sounds, only 25 maps from the map archive have external sounds

Please have a look over the changed ui code.

Co-authored-by: Patiga <dev@patiga.eu>
2020-10-26 09:50:06 +00:00
Dennis Felsing 23c005144b consistent formatting for dbg_msg
no capital letters, no spaces
2020-10-26 10:04:03 +01:00
bors[bot] b0803b26e0
Merge #3077
3077: UI Elements r=def- a=Jupeyy

Build will fail bcs of clang-format,
i'll update this comment to explain.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-26 08:37:25 +00:00
Дядя Женя b6d94a85f3 Visual Improvements, Fixed check-style 2020-10-26 06:10:58 +03:00
Дядя Женя 9b3d9965fb More UI Animation settings, more tabs animated 2020-10-26 05:48:05 +03:00
Дядя Женя c02086a689 Fixes 2020-10-26 04:43:34 +03:00
Дядя Женя e40539c9fd Settings Tabs Animations 2020-10-26 04:10:55 +03:00
Jupeyy 19ce3fa20e Disable text alignment for editboxes 2020-10-25 22:19:19 +01:00
bors[bot] e75cc41a9b
Merge #3191
3191: Fix IME state softlock under fcitx and macos + Update DoEditBox logic to be the same as chat r=def- a=TsFreddie

IME state fix closes #3185 and closes #3150 
DoEditBox update closes #3186, now cursor behave the same as chat where only one cursor (either the real one or the editing one) will be shown.

## 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: TsFreddie <tsfreddiewang@gmail.com>
2020-10-25 21:05:29 +00:00
TsFreddie cc8fe178b5 Update DoEditBox logic to be the same as chat 2020-10-26 01:44:10 +08:00
TsFreddie f7ac41adeb Fix IME stuck when 0-len TEXTEDITING event is missing. 2020-10-25 23:48:12 +08:00
Jupeyy 13c5e039c9 Some chat fixes 2020-10-25 15:57:21 +01:00
Jupeyy 95824b24a3 Fix weapon muzzle texture cutoff 2020-10-25 15:40:22 +01:00
Jupeyy e96aba648b Reset quadsubset for muzzles 2020-10-25 14:34:02 +01:00
def b83b4c8e33 Warn new players about name with points (fixes #3178) 2020-10-23 23:37:49 +02:00
bors[bot] f74c3e5776
Merge #3176
3176: Fix float loops r=def- a=Jupeyy

Tested that one map from #bug channel

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-23 13:36:22 +00:00
Jupeyy 6414d8d879 Fix float loops 2020-10-23 15:12:59 +02:00
Jupeyy be23e92671 Remove one particle component 2020-10-23 14:57:20 +02:00
bors[bot] 6332f90852
Merge #3115
3115: Smooth Camera r=def- a=TsFreddie

closes #3096

Since nobody expressed any opinions, how about we get this in and see some reactions. it is off by default anyway.

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-10-23 11:39:52 +00:00
bors[bot] 9832829633
Merge #3157
3157: Show option to disable system messages in settings r=Jupeyy a=def-

## Summary

Makes it a bit easier to find, prefer it on a busy server. Also clarified the friend message toggle is for highlighting only.

![screenshot-20201020@182835](https://user-images.githubusercontent.com/2335377/96615964-41d0d700-1302-11eb-910e-4c56f0c8451c.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 [does not apply]
- [x] Written a unit test if it works standalone, system.c especially [does not apply]
- [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-10-22 15:19:31 +00:00
bors[bot] d9f08203a0
Merge #3169
3169: Allow zooming in further in Editor r=Jupeyy a=def-

As requested by Cøke

![screenshot-20201022@165820](https://user-images.githubusercontent.com/2335377/96890625-1a0b7b80-1488-11eb-9bf0-83d59f29c529.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-10-22 15:10:47 +00:00
def 64c7f2b731 Allow zooming in further in Editor
As requested by Cøke
2020-10-22 16:59:31 +02:00
Jupeyy 07ca9b796c Killmessages should reset screen 2020-10-22 16:58:49 +02:00
Jupeyy 6eacccfba6 Make gfx_quad_as_triangle 0 default 2020-10-20 19:11:19 +02:00
def 3397869b31 Show option to disable system messages in settings 2020-10-20 18:27:58 +02:00
bors[bot] 3bdded3c4f
Merge #3122 #3137
3122: Fix arithmentic problems r=def- a=Jupeyy

The first three commits are safe

The ones i'll add later will be inside the gamecore, so might alter behaviour.

I'll see which ones are critical, but takes me some time

i fixed most in #3081

3137: Add gfx debug r=def- a=Jupeyy

If someone wants to try, you have to execute the client with a config that contains dbg_gfx 1
If opengl debug is supported it will show "Enabled OpenGL debug mode" in the console

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-20 16:19:55 +00:00
bors[bot] e5870ab06f
Merge #3113
3113: Visual Chat Update r=def- a=Banana090

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

Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-10-20 16:03:57 +00:00
bors[bot] 2709afb007
Merge #3095
3095: Disallow player name changes when the player is muted r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-20 15:56:16 +00:00
def 655bbd2cb6 Clamp /emote duration
/home/teeworlds/src/master/src/game/server/ddracechat.cpp:1108:65: runtime error: signed integer overflow: 99999999 * 50 cannot be represented in type 'int'
2020-10-20 16:46:25 +02:00
Jupeyy 74515d4b95 UI Elements 2020-10-19 23:52:29 +02:00
bors[bot] c1dea54d80
Merge #3149
3149: Fix memory leak on team finish and read of uninitialized data r=def- a=Zwelf

Fixes #2522, fixes #3144 and fixes second leak from #3134.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-10-19 17:09:43 +00:00
bors[bot] dfe3bb44cb
Merge #3139
3139: Use NUM_DUMMYS for dummy array length r=def- a=ChillerDragon

Should make code more readable by explaining that the array is used for dummy. Also makes modders life easier if there is a need to scale up dummy count.

I left out two places that do not include client.h

3be8a592e5/src/game/client/prediction/gameworld.h (L92)

3be8a592e5/src/game/gamecore.h (L212)

Moving the enum to protocol.h for example is probably not nice.

Co-authored-by: ChillerDrgon <ChillerDragon@gmail.com>
2020-10-19 16:37:22 +00:00
Zwelf 81131c7831 Fix grammar mistake 2020-10-19 15:23:48 +02:00
Zwelf 6d11c34d63 Load game UUID on /load
Fixes #2522 and #3144
2020-10-19 15:21:23 +02:00
bors[bot] aca143cb7d
Merge #3129 #3138 #3143
3129: Editor: Fix selection of None value in auto rules (fixes #3013) r=Jupeyy a=def-

by starting the indexing at 0

3138: Fix out of bounds access in GetSolo r=Jupeyy a=def-

As discovered in #3135

3143: Ignore ddnet-info.json dl failure again r=Jupeyy a=def-

too aggressive, might just be bad internet at the moment

Co-authored-by: def <dennis@felsin9.de>
2020-10-19 12:46:44 +00:00
bors[bot] 4360d78753
Merge #3148
3148: Fix out of bounds array access in DoEditBox r=Jupeyy a=def-

Introduced in 186206d40c

Co-authored-by: def <dennis@felsin9.de>
2020-10-19 12:39:39 +00:00
def 8e6b9f017d Fix out of bounds array access in DoEditBox
Introduced in 186206d40c
2020-10-19 14:34:10 +02:00
bors[bot] 51b5858b7e
Merge #3146
3146: Disallow cl_text_entities_size 0 (fixes #3145) r=Jupeyy a=def-

@BannZay 

Co-authored-by: def <dennis@felsin9.de>
2020-10-19 12:30:33 +00:00
Jupeyy 90db24c356 clamp font size to atleast 2 (fixes #3145) 2020-10-19 14:18:23 +02:00
def 5ba8d8ecdb Disallow cl_text_entities_size 0 (fixes #3145) 2020-10-19 13:49:38 +02:00
def bd14545b47 Show times with hours in SQL (fixes #3140) 2020-10-18 23:47:13 +02:00
def 67178b0ea0 Use str_time/str_time_float everywhere 2020-10-18 23:47:09 +02:00
def 8dfcd67fe6 Add str_time/str_time_float
Handles centisecs < 0

Uses int64, otherwise we're limited to ~260 days
2020-10-18 23:44:47 +02:00
ChillerDrgon f1bb5b5bd9 Use NUM_DUMMIES for dummy array length 2020-10-18 23:15:25 +02:00
def 3d94f9c7af Finish chat msg: Add comment 2020-10-18 17:57:27 +02:00
def 0748ad7a6b Finish time in HUD: Show hours 2020-10-18 17:57:02 +02:00
def debf263326 Fix out of bounds access in GetSolo
As discovered in #3135
2020-10-18 16:52:29 +02:00
ChillerDragon c81eb50b50 Fix halloween logic 2020-10-18 10:26:52 +02:00
bors[bot] 91773cd991
Merge #3116
3116: Show halloween skins only on Halloween r=heinrich5991 a=def-

Making use of the skin downloader.

Skin choice is based on your name, only active on October 31 and November 1 with events 1 in settings

Co-authored-by: def <dennis@felsin9.de>
2020-10-18 00:33:47 +00:00
def 343e48248e Editor: Fix selection of None value in auto rules (fixes #3013)
by starting the indexing at 0
2020-10-18 00:33:04 +02:00
def 81bc68d9d0 Add add_map_votes command for easier local map testing
No need to tell new players how to manually add a vote or load a map
from rcon
2020-10-18 00:06:43 +02:00
def ad3bc98578 Revert "Make GL 1.5 default"
As discussed with Lerath2, we should try to debug

This reverts commit 537f47d11d.
2020-10-17 23:34:16 +02:00
bors[bot] 54c7a5bba5
Merge #3108
3108: Make GL 1.5 default r=def- a=Jupeyy

If ppl see white textures its related to
#2125
and you need to revert it, bcs thats not fixable, there is no extension for GL_GENERATE_MIPMAP or smth

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-17 21:09:11 +00:00
Jupeyy 896dd66dfe Don't render invalid laser 2020-10-17 21:34:10 +02:00
Jupeyy 3aef2ebfe0 Make closest_point_on_line safer
Does not change behaviour, all NaNs resulted in false checks
2020-10-17 20:22:13 +02:00
Patiga 8d7b00275f Remove obselete line 2020-10-17 20:16:26 +02:00
Jupeyy d52cd5c41a Check if distance is bigger than 0
Is safe, the first check even checks if Distance is > 0
The second check, checks if Distance is > something positive
2020-10-17 20:00:18 +02:00
Jupeyy 9f10dba7d1 Fix NaN in ninja muzzle 2020-10-17 19:58:17 +02:00
Jupeyy fa8b8b9324 More Target cleanup 2020-10-17 19:58:07 +02:00
Jupeyy 28ee13949b Fix NaN in gamecore move
Is safe, if the distance is zero and the NaN is created by 0 / 0.0
all values multiplied or checked stay NaN, so no new position is set
2020-10-17 18:45:59 +02:00
Jupeyy c9a1586dec Fix obvious division by zero 2020-10-17 18:24:34 +02:00
Jupeyy 6426e341f3 Fix NaNs created by bad initialization 2020-10-17 18:17:13 +02:00
Jupeyy 331249ed89 Fix NaN in LoadSkin 2020-10-17 17:59:18 +02:00
Patiga 14539a8046 Remove option to make map sounds external
Right now it is impossible to have a working external sound. External
sounds render unusable the moment the map is saved and given to another
player. For the mapper it seems like everything is working since the
mapper has the sound file. For anyone else it simply won't work. Since
1. there is no use for it and 2. it adds unnecessary complexity and
confusion, I propose removing it entirely.
2020-10-17 17:45:56 +02:00
Learath2 ba7b95f7ad Revert #3066
This reverts commits:
	a2b3f45f8b
	26a07c804f
2020-10-17 17:32:52 +02:00
bors[bot] b93896b37c
Merge #3112
3112: Fix and change text cursor r=def- a=Jupeyy

Pls check if u like the new cusor and if it works now
fixes #3110

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-17 15:00:57 +00:00
def 08045f6bd9 Only assign skin when non-Halloween skin has been chosen 2020-10-17 16:58:47 +02:00
Дядя Женя 6708a7a69d Chat visual update 2020-10-17 15:50:35 +02:00
Jupeyy 186206d40c Fix and change text cursor 2020-10-17 15:26:33 +02:00
bors[bot] 996270af18
Merge #3120
3120: Embed map sounds by default r=heinrich5991 a=Patiga

Not one ddnet map has a external map sound since there are none which would work that way

Co-authored-by: Patiga <dev@patiga.eu>
2020-10-17 13:16:55 +00:00
Patiga 17e531374c Embed sounds by default 2020-10-17 14:05:06 +02:00
def ae90bdf3f9 Show halloween skins only on Halloween
Making use of the skin downloader.

Skin choice is based on your name, only active on October 31 and November 1 with events 1 in settings
2020-10-17 12:10:56 +02:00
def 28250897d3 Version 15.1.3 2020-10-15 18:59:17 +02:00
Jupeyy 537f47d11d Make GL 1.5 default 2020-10-15 18:47:06 +02:00
Learath 85f385b37b Optimize nameplate rendering. Fix #3103 2020-10-15 15:35:25 +02:00
bors[bot] 9e060d78b0
Merge #3100
3100: Fix offline client that is not in menu r=heinrich5991 a=Jupeyy

E.g. popups like "ddnet-info.json" failed will cause weird NaN glitches, bcs the impl relys on ChangePosition to clean movetime and animation start

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:54:46 +00:00
bors[bot] 09549ebc85
Merge #3101
3101: Fix hookchains r=heinrich5991 a=Jupeyy

Its already increased by the for loop.
Might have made the hook shorter(for very very long hooks) the past 3 years xd

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:47:21 +00:00
bors[bot] 6ed79fff5f
Merge #3099
3099: Add missing UpdateRenderInfo call r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:27:28 +00:00
Jupeyy ca645bf53e Fix hookchains 2020-10-14 23:03:14 +02:00
Jupeyy 6eb6fad867 Fix offline client that is not in menu 2020-10-14 22:10:48 +02:00
Jupeyy fd0848291d Add missing UpdateRenderInfo call 2020-10-14 19:00:39 +02:00
heinrich5991 070504b5c8 Update ghost format to v6: Replace CRC with SHA256
To be friendly to other implementors of the format, the CRC field is now
zeroed out instead of completely gone.

Drop support for v2 and v3 of the ghost format, the ghost files should
have been automatically converted by the client already.
2020-10-14 17:08:58 +02:00
heinrich5991 6ff53358d3 Remove code for CRC in most places, except where needed for net compat
This should path the way to remove it altogether in the future.
2020-10-14 17:08:58 +02:00
heinrich5991 246d2ac3d6 Allow IServer users to check when client's names change
Use that available interface to process name change spam protection more
cleanly.
2020-10-14 16:42:35 +02:00
def 87b06d307f Fix clang-analyzer-core.UndefinedBinaryOperatorResult
/media/ddnet/src/game/client/animstate.cpp:54:27: warning: The left operand of '*' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
        pSeq->m_X += pAdded->m_X * Amount;
                                 ^
2020-10-14 15:45:47 +02:00
def 6443e708b5 Fix clang-analyzer-core.CallAndMessage
/media/ddnet/src/game/editor/auto_map.cpp:94:17: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
                                int RunID = pCurrentConf->m_aRuns.add(NewRun);
                                            ^
2020-10-14 15:45:47 +02:00
def 0867424749 Fix clang-analyzer-security.insecureAPI.strcpy
/media/ddnet/src/engine/server/sql_string_helpers.cpp:74:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
2020-10-14 15:45:47 +02:00
def 98d4baabed Fix clang-analyzer-core.NonNullParamChecker
/media/ddnet/src/game/server/entities/projectile.cpp:201:37: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker]
                                        Found = GetNearestAirPosPlayer(pTargetChr->m_Pos, &PossiblePos);
                                                                       ^
2020-10-14 15:45:47 +02:00
def 5c1b8cd221 Fix clang-analyzer-deadcode.DeadStores
/media/ddnet/src/game/client/components/statboard.cpp:288:3: warning: Value stored to 'tw' is never read [clang-analyzer-deadcode.DeadStores]
2020-10-14 15:45:47 +02:00
def a4f13ed4a8 Fix clang-analyzer-optin.portability.UnixAPI
and mark some false positives

/media/ddnet/src/engine/client/backend_sdl.cpp:329:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
2020-10-14 15:45:43 +02:00
def 911cb5cb9b CAutoMapper: Delete pUpdateLayer
/media/ddnet/src/game/editor/auto_map.cpp:433:1: warning: Potential leak of memory pointed to by 'pUpdateLayer' [clang-analyzer-cplusplus.NewDeleteLeaks]
}
^
2020-10-14 14:54:33 +02:00
def 7d476c3858 Fix clang-analyzer-security.FloatLoopCounter
[81/219] Building CXX object CMakeFiles/game-shared.dir/src/game/collision.cpp.o
/media/ddnet/src/game/collision.cpp:1197:2: warning: Variable 'f' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
        for(float f = 0; f < d; f++)
        ^
2020-10-14 14:54:33 +02:00
TsFreddie 6006c9d85b smooth camera 2020-10-14 08:43:30 +08:00
heinrich5991 5b4c64005f Disallow player name changes when the player is muted 2020-10-14 01:19:41 +02:00
Jupeyy 8e9baedf9a Use pointer directly for tile layer building 2020-10-13 19:52:14 +02:00
Jupeyy 4c87b0cf05 Make menu background camera impl more robust 2020-10-13 15:37:34 +02:00
Patiga a252097e9a Fix comments 2020-10-13 09:53:33 +02:00
Patiga 06e90505b1 Use the same value as vanilla 2020-10-13 09:50:03 +02:00
def fedb031250 Version 15.1.2 2020-10-12 15:13:22 +02:00
Jupeyy ec16abdb54 Fix skin load 2020-10-12 12:31:43 +02:00
bors[bot] 1d961a262f
Merge #3069
3069: Recreate score hud when any score changed r=Learath2 a=def-

Fixes problem with too long strings because we display the score centered

Thanks to ExP for report:
![screenshot_2020-10-11_17-18-45](https://user-images.githubusercontent.com/2335377/95682429-7a2b3380-0be5-11eb-8186-c1dbf922b960.png)

Fixed:
![screenshot-20201011@171419](https://user-images.githubusercontent.com/2335377/95682443-88794f80-0be5-11eb-9d10-79ea5df785c0.png)
![screenshot-20201011@171423](https://user-images.githubusercontent.com/2335377/95682441-857e5f00-0be5-11eb-805a-8312e43f5ba1.png)


Co-authored-by: def <dennis@felsin9.de>
2020-10-11 15:45:35 +00:00
def d0005d3866 Right-align hud scores 2020-10-11 17:27:55 +02:00
def 2a06b3ccb5 Recreate score hud when any score changed
Fixes problem with too long strings because we display the score centered

Thanks to ExP for report
2020-10-11 17:15:43 +02:00
bors[bot] ea1acfd22c
Merge #3067
3067: Document highest and lowest values for cl_video_crf r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:54:03 +00:00
bors[bot] 91619b9886
Merge #3051
3051: Fix some undefined behaviour r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:46:44 +00:00
bors[bot] 7e84e1ef43
Merge #3066
3066: Disallow more commands with testing mode r=def- a=heinrich5991

Also show some useful error message

Supersedes #2778.

Co-authored-by: Andrii <bannzay3@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-11 14:39:29 +00:00
def ae1a266dac CCharacterCore::Tick caused out of bounds
src/game/teamscore.cpp:27:78: runtime error: index -1 out of bounds for type 'int const[64]'
    #0 0xf5b948 in CTeamsCore::CanKeepHook(int, int) const src/game/teamscore.cpp:27
    #1 0xf46fe1 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:325
    #2 0xaf7366 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2441
    #3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
    #4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
    #5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
    #6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #7 0x557fda in main src/engine/client/client.cpp:4341
    #8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #9 0x433e29 in _start (build/DDNet+0x433e29)

src/game/teamscore.cpp:34:78: runtime error: index -1 out of bounds for type 'int const[64]'
    #0 0xf5be68 in CTeamsCore::CanCollide(int, int) const src/game/teamscore.cpp:34
    #1 0xf46458 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:271
    #2 0xaf7374 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2442
    #3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
    #4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
    #5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
    #6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #7 0x557fda in main src/engine/client/client.cpp:4341
    #8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #9 0x433e29 in _start (build/DDNet+0x433e29)
2020-10-11 16:37:03 +02:00
def 476a912b3f Fix CRaceDemo + CGhost out of bounds access
#0 0x9f70dd in CRaceDemo::OnMessage(int, void*) src/game/client/components/race_demo.cpp:134
    #1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
    #2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
    #3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
    #4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
    #5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #6 0x557fda in main src/engine/client/client.cpp:4341
    #7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #8 0x433e29 in _start (build/DDNet+0x433e29)

src/game/client/components/ghost.cpp:600:35: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x78201a in CGhost::OnMessage(int, void*) src/game/client/components/ghost.cpp:600
    #1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
    #2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
    #3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
    #4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
    #5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #6 0x557fda in main src/engine/client/client.cpp:4341
    #7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #8 0x433e29 in _start (build/DDNet+0x433e29)
2020-10-11 16:37:03 +02:00
def 6680ec388c Reset CCharacterCore at start
Hopefully fixes these by initializing m_Pos:

src/game/collision.cpp:345:10: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55e85a8f0967 in CCollision::IntersectLineTeleHook(vector2_base<float>, vector2_base<float>, vector2_base<float>*, vector2_base<float>*, int*) /media/ddnet/src/game/collision.cpp:345:10
    #1 0x55e85a90767b in CCharacterCore::Tick(bool) /media/ddnet/src/game/gamecore.cpp:255:27
    #2 0x55e85af8e477 in CCharacter::Tick() /media/ddnet/src/game/client/prediction/entities/character.cpp:562:9
    #3 0x55e85afc867f in CGameWorld::Tick() /media/ddnet/src/game/client/prediction/gameworld.cpp:193:10
    #4 0x55e85af500b8 in CGameClient::UpdatePrediction() /media/ddnet/src/game/client/gameclient.cpp:2279:16
    #5 0x55e85af48b9b in CGameClient::OnNewSnapshot() /media/ddnet/src/game/client/gameclient.cpp:1675:3
    #6 0x55e85a9fdf8c in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2767:22
    #7 0x55e85aa0cefe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #8 0x55e85aa2eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7feedbc65151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55e85a77be0d in _start (/media/ddnet/DDNet+0x705e0d)

src/base/math.h:22:40: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55e85a900c2f in round_to_int(float) /media/ddnet/src/base/math.h:22:40
    #1 0x55e85a90cac1 in CCharacterCore::Write(CNetObj_CharacterCore*) /media/ddnet/src/game/gamecore.cpp:515:22
    #2 0x55e85a90e171 in CCharacterCore::Quantize() /media/ddnet/src/game/gamecore.cpp:574:2
    #3 0x55e85af90be9 in CCharacter::TickDefered() /media/ddnet/src/game/client/prediction/entities/character.cpp:580:9
    #4 0x55e85afc8a1b in CGameWorld::Tick() /media/ddnet/src/game/client/prediction/gameworld.cpp:201:10
    #5 0x55e85af500b8 in CGameClient::UpdatePrediction() /media/ddnet/src/game/client/gameclient.cpp:2279:16
    #6 0x55e85af48b9b in CGameClient::OnNewSnapshot() /media/ddnet/src/game/client/gameclient.cpp:1675:3
    #7 0x55e85a9fdf8c in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2767:22
    #8 0x55e85aa0cefe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #9 0x55e85aa2eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #10 0x7feedbc65151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #11 0x55e85a77be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 60f4e078b7 Out of bounds access in RenderPlayer
src/game/client/components/players.cpp:197:5: runtime error: index -2 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x56548eec0487 in CPlayers::RenderPlayer(CNetObj_Character const*, CNetObj_Character const*, CTeeRenderInfo const*, int, float) /media/ddnet/src/game/client/components/players.cpp:197:37
    #1 0x56548ec97234 in CGhost::OnRender() /media/ddnet/src/game/client/components/ghost.cpp:344:26
    #2 0x56548ef92b26 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #3 0x56548ea4659e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #4 0x56548ea7b90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #5 0x56548ea9bb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #6 0x7f7c844f1151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #7 0x56548e7e8e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 47299e8586 Out of bounds access in CMenus::RenderGame
src/game/client/components/menus_ingame.cpp:108:16: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a64c4 in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:108:73
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/game/client/components/menus_ingame.cpp:108:16 in
src/game/client/components/menus_ingame.cpp:109:14: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a699a in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:109:71
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def f94d476cf2 Don't divide by 0 in LoadSkin
src/game/client/components/skins.cpp:142:14: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55b6bd0f49e1 in CSkins::LoadSkin(char const*, char const*, int, int*) /media/ddnet/src/game/client/components/skins.cpp:142:14
    #1 0x55b6bd0f0942 in CSkins::SkinScan(char const*, int, int, void*) /media/ddnet/src/game/client/components/skins.cpp:55:16
    #2 0x55b6bcb33928 in fs_listdir /media/ddnet/src/base/system.c:2033:6
    #3 0x55b6bcb04024 in CStorage::ListDirectory(int, char const*, int (*)(char const*, int, int, void*), void*) /media/ddnet/src/engine/shared/storage.cpp:316:5
    #4 0x55b6bd0f9e2f in CSkins::Refresh() /media/ddnet/src/game/client/components/skins.cpp:222:13
    #5 0x55b6bd0f6e33 in CSkins::OnInit() /media/ddnet/src/game/client/components/skins.cpp:194:2
    #6 0x55b6bd14c63f in CGameClient::OnInit() /media/ddnet/src/game/client/gameclient.cpp:322:28
    #7 0x55b6bcc5f9f8 in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3089:16
    #8 0x55b6bcc84b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7f1144ded151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55b6bc9d1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 612f665a6e Document highest and lowest values for cl_video_crf 2020-10-11 16:29:39 +02:00
heinrich5991 a2b3f45f8b Reintroduce CMDFLAG_TEST
Add some more helpful messages for executing test/game commands.
2020-10-11 16:27:28 +02:00
def b7c8da54a3 Make clan plates fit & only show when name plates enabled
Thanks to HamidReza for report
2020-10-11 16:24:01 +02:00
Andrii 26a07c804f Disallow game-related commands unless testing is enabled 2020-10-11 16:02:10 +02:00
bors[bot] 6ab806fde8
Merge #3048 #3063
3048: Add GUI & Game sound volume sliders r=heinrich5991 a=def-

As requested by Pipou

3063: increase buffer size for name_ban messages r=heinrich5991 a=12pm

otherwise reason can be cut off

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-10-11 13:00:23 +00:00
Andrii 52efb23545 Update demo browser on demo save 2020-10-11 15:45:31 +03:00
bors[bot] e44df2d136
Merge #3059
3059: Add box offset to align better on spec tab r=def- a=ardadem

Old:
![2020-10-11-12:07:54-screenshot](https://user-images.githubusercontent.com/13207692/95674696-91a0f700-0bba-11eb-8291-275cc263b6c1.png)

New:
![2020-10-11-12:08:36-screenshot](https://user-images.githubusercontent.com/13207692/95674697-92d22400-0bba-11eb-8b60-36f0d85fbae4.png)

Very small visual change but heart fits better now for >32 players.

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-11 09:15:25 +00:00
def 4327194d27 Add GUI & Game sound volume sliders
As requested by Pipou
2020-10-11 10:16:38 +02:00
def 284c287c99 Version 15.1.1 2020-10-11 10:14:21 +02:00
bors[bot] a68fca6d7c
Merge #3036
3036: Consider as not-afk on emoticon, chat, vote, r=heinrich5991 a=def-

call vote, spectator mode, info change

Co-authored-by: def <dennis@felsin9.de>
2020-10-11 00:26:30 +00:00
def 507f7f6085 Version 15.1 2020-10-11 00:00:33 +02:00
Jupeyy 58bd8dcbb6 Fix virtual call in Constructor 2020-10-10 12:16:27 +02:00
bors[bot] 9d39e1da6d
Merge #3046
3046: Remove usages of qsort r=def- a=Learath2

Caught my eye while doing the integrity PR.

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-10 08:38:12 +00:00
Learath2 d8c9a71e18 Remove usages of qsort 2020-10-10 01:18:42 +02:00
bors[bot] 2917681bf5
Merge #3047
3047: Fix ui_page/ui_settings_page ranges r=Learath2 a=def-

For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 23:16:51 +00:00
def 10e7b2ed7b Fix ui_page/ui_settings_page ranges
For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered
2020-10-09 22:51:16 +02:00
Arda Demir 75cd653f4c Add box offset to align better on spec tab 2020-10-09 22:14:54 +03:00
ChillerDragon 263fdbd8e1 Use 0.7 gameskin by @Zatline
a5105264ff
db08239506
31c6d2684d
2020-10-09 21:04:06 +02:00
bors[bot] f93c8e4fdb
Merge #2987
2987: Modulize skins, particles, emoticons and game r=def- a=Jupeyy

fixes #2203 

Puh, something i always wanted todo.
Need to error read, bcs alot of copy paste.

Modulizes all images, so that all images are mipmap indepedent, without texeloffset problems

I also added the ninja bar analyzer for #2921


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 15:20:48 +00:00
bors[bot] ce9ba5ec09
Merge #3018
3018: Editor: Improve usability of server settings r=Jupeyy a=def-

- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 14:48:59 +00:00
def ea8bee4d34 Focus command field when something changed 2020-10-09 16:40:59 +02:00
bors[bot] b208ee3a81
Merge #3039
3039: Show friends on spectate tab r=def- a=ardadem

![2020-10-08-13:22:48-screenshot](https://user-images.githubusercontent.com/13207692/95447050-d5e98880-0969-11eb-923a-2b647933774d.png)
![2020-10-08-13:23:14-screenshot](https://user-images.githubusercontent.com/13207692/95447054-d71ab580-0969-11eb-8ace-a893cfa80a97.png)

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-09 14:38:12 +00:00
bors[bot] cf6ace1744
Merge #3022
3022: Text alignment r=def- a=Jupeyy

i think the round borders create a bit of optical illusion, e.g. the "V" in edtior is only 1 pixel of, but looks like its completly left xd

i checked at few resolutions with gimp and only saw around 1 pixel margin of error, but go ahead and test yourself :D

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 14:31:25 +00:00
Jupeyy 8d6148b20b Modulize skins, particles, emoticons and game 2020-10-09 09:07:19 +02:00
Jupeyy 94a20d11fa Use renderinfo for player death effect 2020-10-08 21:54:53 +02:00
Arda Demir 84c36b3423 Show friends on spectate tab 2020-10-08 13:25:05 +03:00
bors[bot] 2d0c65bf53
Merge #3038
3038: Use std::sort instead of bubble_sort r=def- a=Jupeyy

Noticed, that its really slow, when you have alot of auto demos

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 08:36:53 +00:00
bors[bot] cbec1a5eb4
Merge #3037
3037: Init date for demo dirs r=def- a=Jupeyy

Just to not rely on uninitialized values

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 08:30:05 +00:00
Jupeyy 52911e4302 Use std::sort instead of bubble_sort 2020-10-08 08:00:01 +02:00
Jupeyy a4b32d19a1 Init date for demo dirs 2020-10-08 07:20:32 +02:00
bors[bot] 6376890fc1
Merge #3035
3035: Fix button rendering in "Render demo" r=Jupeyy a=def-

hopefully. For me "Show chat" didn't work, works now. For Дядя Женя
"Use sounds" was flickering, but can't reproduce

![screenshot-20201007@231230](https://user-images.githubusercontent.com/2335377/95388468-a3e90f80-08f2-11eb-8818-5b9e91116c49.png)

Co-authored-by: def <dennis@felsin9.de>
2020-10-08 04:59:34 +00:00
def 04b840f542 Consider as not-afk on emoticon, chat, vote,
call vote, spectator mode, info change
2020-10-07 23:24:50 +02:00
def 51b967085a Fix button rendering in "Render demo"
hopefully. For me "Show chat" didn't work, works now. For Дядя Женя
"Use sounds" was flickering, but can't reproduce
2020-10-07 23:12:18 +02:00
Arda Demir 9ead551b98 Render afk emote instead of chat emote 2020-10-07 22:04:07 +03:00
Tim Schumacher 29644780af
Redownload skins of other players on skin directory refresh (closes #3030) 2020-10-07 12:19:38 +02:00
Jupeyy 5ebabe2ece Text alignment 2020-10-07 04:44:35 +02:00
bors[bot] 4a30ef1e9a
Merge #3020
3020: Fix all Multiplication type alerts by CodeQL r=heinrich5991 a=def-

> Multiplication result converted to larger type

> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.

Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster

Co-authored-by: def <dennis@felsin9.de>
2020-10-07 00:56:19 +00:00
bors[bot] bbd87eb128
Merge #3025
3025: Don't make width depend on localized text r=heinrich5991 a=def-

or we end up with totally broken input boxes

As reported by Rezee:
![unknown](https://user-images.githubusercontent.com/2335377/95226414-31e2ce80-07fd-11eb-8ea6-a612bc2397bb.png)

Co-authored-by: def <dennis@felsin9.de>
2020-10-06 21:40:14 +00:00
def 6a0a1ce522 Don't make width depend on localized text
or we end up with totally broken input boxes
2020-10-06 17:55:24 +02:00
bors[bot] 1a4866182e
Merge #3023
3023: Add refresh button for skins, closes #2979 r=def- a=Blacksky780i

![image](https://user-images.githubusercontent.com/72441389/95212455-00163b80-07ee-11eb-953e-2e0593b8cfea.png)


Co-authored-by: Irisk <>
2020-10-06 15:14:46 +00:00
bors[bot] 4706b0f5be
Merge #3005
3005: Use rest instead of string in some commands r=heinrich5991 a=def-

where it makes sense, means you don't need to quote strings for those

Co-authored-by: def <dennis@felsin9.de>
2020-10-06 15:06:45 +00:00
Irisk fb0372b97f Add refresh button for skins, closes #2979 2020-10-06 16:04:59 +02:00
bors[bot] 1f7d544349
Merge #3010 #3014
3010: Use hours in score hud and record r=Learath2 a=def-



3014: Scale auto mapper text size (partially fixes #3013) r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 11:22:06 +00:00
bors[bot] 25e025dd16
Merge #3008
3008: Censor string multiple times r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 11:04:45 +00:00
bors[bot] 79b5852e17
Merge #3021
3021: only load + save auto mappers for tile layers, not physics layers r=def- a=Patiga

If I'm not mistaken, loading a map without auto mappers, then saving would've caused uninitialized values to be written to the auto mappers of physics layers.

Co-authored-by: patiga <dev@patiga.eu>
2020-10-06 07:37:26 +00:00
bors[bot] ecb5e4c790
Merge #3015
3015: Allow quitting instantly with SDL_QUIT when non-warning dialog showing r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 00:33:04 +00:00
patiga 95fadea794 Fix style properly 2020-10-05 20:09:19 +02:00
patiga 09a9ca9699 Conform to style 2020-10-05 19:59:48 +02:00
patiga d123d928b4 only load + save auto mappers for tile layers, not physics layers 2020-10-05 19:44:26 +02:00
def 62dc12aacb Fix all Multiplication type alerts by CodeQL
> Multiplication result converted to larger type

> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.

Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster
2020-10-05 19:03:54 +02:00
bors[bot] 75bdcce3ce
Merge #2980
2980: Fix laser prediction for non ddrace mods r=def- a=Jupeyy

Correct me, if this is wrong, but only ddrace based mods cannot shot laser through itself.
Tested on vanilla, ictf and fng(with antiping on and prediction on)

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-05 16:29:35 +00:00
def 032ae67814 Editor: Improve usability of server settings
- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke
2020-10-05 17:16:48 +02:00
bors[bot] 1b253bfbfd
Merge #3002
3002: Make animations more consistent with high float values r=def- a=Jupeyy

fixes what is described in #2997

Old client animation when server time is huge:

[vid_old.zip](https://github.com/ddnet/ddnet/files/5322484/vid_old.zip)

 client animation when server time is huge:

[vid_new.zip](https://github.com/ddnet/ddnet/files/5322486/vid_new.zip)

@Fireball-Teeworlds maybe u can try, if that fixes the stuff for u

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-05 14:48:09 +00:00
def 5b06f54d06 censorlist without case 2020-10-05 10:55:32 +02:00
Jupeyy 50b20fb1cd Make animations more consistent with high float values 2020-10-05 02:32:50 +02:00
def 1a83651cf1 Allow quitting instantly with SDL_QUIT when non-warning dialog showing 2020-10-04 22:46:28 +02:00
def c25aede8ea Scale auto mapper text size (partially fixes #3013) 2020-10-04 22:39:43 +02:00
def d5fc613b8b Revert "Show File button in demo player"
As reported by Soreu, doesn't work on Windows (Can't open file warning
pops up)

This reverts commit 8efff70d88.
2020-10-04 18:24:15 +02:00
def 1067e2b844 Use hours in score hud and record
to be consistent with score board
2020-10-04 18:20:29 +02:00
def 5ec702ad2f Use rest instead of string in some commands
where it makes sense, means you don't need to quote strings for those
2020-10-04 17:52:05 +02:00
def 04f2fc5d41 Censor string multiple times 2020-10-04 17:49:19 +02:00
bors[bot] 2b7b92355f
Merge #3006
3006: Only ignore ctrl+shift for press, not release r=Jupeyy a=def-

@Jupeyy How about this?

Co-authored-by: def <dennis@felsin9.de>
2020-10-04 11:26:29 +00:00
def 6507b1b802 Only ignore ctrl+shift for press, not release 2020-10-04 12:14:16 +02:00
bors[bot] 9df4299bb5
Merge #2999 #3001 #3003
2999: Add Serbian Cyrillic translation r=def- a=cobisimo

This is adding Serbian Cyrillic translation and contain complete translation with latest strings.

by Veljko Radovanovic (VekiPro)

3001: Use skin pointer directly r=def- a=Jupeyy

Can't tell if setting the hot item in gui invalidly can potentially break stuff, also a skin refresh button would make this useless anyway

3003: Update brazilian_portuguese.txt r=def- a=rffontenelle



Co-authored-by: Nikola Radovanovic <nikola.r@toptal.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2020-10-04 08:01:53 +00:00
bors[bot] b33b3295c0
Merge #2997
2997: Make menu background animations smoother r=def- a=Fireball-Teeworlds

time_get_microseconds() can potentially return big numbers (on my system it seems to be equal to uptime) and at some point float's precision is no longer enough for every 1/60th of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.

Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-10-04 07:55:23 +00:00
bors[bot] 9717c4453f
Merge #2982 #2985 #2996
2982: Update french translation r=Jupeyy a=def-

by SunnyPistache & Pipou

2985: No country flag for Traditional Chinese r=Jupeyy a=def-



2996: Make types/countries fit ingame (fixes #2989) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-04 02:22:18 +00:00
Jupeyy 7f78ecde82 Use skin pointer directly 2020-10-04 00:56:19 +02:00
Fireball 88c31a4711 Make menu background animations smoother
time_get_microseconds() count starts from 1970-01-01 and float's precision is not enough for every 1/60 of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.
2020-10-03 20:07:14 +01:00
def 3a55ff86d6 Make types/countries fit ingame (fixes #2989) 2020-10-03 21:02:36 +02:00
bors[bot] 1040b59c05
Merge #2994
2994: Fix multiple layer editing r=def- a=Learath2

Idk how I thought this ever worked. Fixes #2981 

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-03 18:59:04 +00:00
Learath2 db9a762f58 Fix multiple layer editing. Close #2981 2020-10-03 18:35:45 +02:00
def 1e900af5fa Disable +xxx binds when pressing ctrl+shift
Seems a bit more general than hardcoding ctrl+shift+d, ctrl+shift+g, ctrl+shift+e
2020-10-03 10:03:20 +02:00
def 830352fd70 Revert "Fix ctrl+shift+d moving tee (fixes #2930)"
This reverts commit 9b0081de57.
2020-10-03 09:57:20 +02:00
Jupeyy 54bbf69488 Fix laser prediction for non ddrace mods 2020-10-03 03:10:54 +02:00
bors[bot] b27b54a051
Merge #2893 #2972 #2974
2893: Determine binary dir independently of data dir (fixes #2891) r=heinrich5991 a=def-

@Learath2 Could you check if this can be extended to also find the DDNet-Server executable on Mac?

2972: Add explicit button for current map as BG r=heinrich5991 a=def-



2974: Fix autoformatting wrt. generated files r=def- a=heinrich5991

Fix #2962.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-02 17:43:04 +00:00
bors[bot] 839f0862fb
Merge #2968 #2969
2968: Create codeql-analysis.yaml r=heinrich5991 a=def-



2969: Print error when opening config file for writing fails r=heinrich5991 a=def-



Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:35:09 +00:00
bors[bot] 663d60fa9a
Merge #2941
2941: Fix ctrl+shift+d moving tee (fixes #2930) r=heinrich5991 a=def-

@plsplsplslol ok from your side?

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:21:39 +00:00
bors[bot] d2df9c6a66
Merge #2948 #2956 #2965
2948: Show File button in demo player r=heinrich5991 a=def-

to easily get the file instead of having to search for it in the file browser again. Complements #2946

2956: Add Background music volume slider r=heinrich5991 a=def-

as requested by hussainx3

2965: Clean up some data r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:56:17 +00:00
bors[bot] 5dd1721e63
Merge #2958 #2961 #2963
2958: AntiPing limit is unintuitive, remove from settings r=heinrich5991 a=def-



2961: Fix hash in formatting-revs.txt r=heinrich5991 a=def-



2963: Handle PNG read errors (fixes #2959) r=heinrich5991 a=def-

and print a more telling error message

I'll check all our existing maps for failures now:
```
$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done
```
For skins Soreu and the skin DB team is already taking care. (but I checked and the ones in Skin DB now can all be loaded without error)

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:31:13 +00:00
bors[bot] 4383b8a7e7
Merge #2942 #2943
2942: Update swedish translations (by cur.ie) r=heinrich5991 a=def-



2943: Need to send info when updating skin in text field r=heinrich5991 a=def-

As reported by abcqwerty on Discord

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:23:49 +00:00
bors[bot] 2a76cddb4e
Merge #2922
2922: Don't show wrong decisecs in game time in HUD r=heinrich5991 a=def-

I think .me' reported this to me 7 years ago and I've been noticing that they're wrong since then. Time to remove I guess, they don't seem useful anyway.

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:16:55 +00:00
bors[bot] 4a6a299d2e
Merge #2973
2973: initialize physics layer pointer, layer item version (partially fixes #2971) r=def- a=Patiga

Note that the zlib compression still makes it non-deterministic across different machines/versions

Co-authored-by: patiga <patigatus21@gmail.com>
2020-10-02 15:59:38 +00:00
patiga fc9e1bc325 initialize physics layer pointer, layer item version 2020-10-02 17:45:28 +02:00
Dennis Felsing 317bf6bba4 Don't try to load %current% as a normal map 2020-10-02 16:23:16 +02:00
Dennis Felsing 2dc725e0f6 Rename CURRENT to CURRENT_MAP 2020-10-02 16:21:18 +02:00
Dennis Felsing 0f177bad46 Add explicit button for current map as BG 2020-10-02 16:20:19 +02:00
Dennis Felsing 6839e5f20d QUITING -> QUITTING 2020-10-02 16:06:21 +02:00
Dennis Felsing 2ba9535529 Use warnings popups for some io failures 2020-10-02 16:06:16 +02:00
bors[bot] 74550e2c45
Merge #2932
2932: Don't change SpectatorID when not spectating r=def- a=Fireball-Teeworlds

This prevents a confusing situation where /pause and /spec lead to spectating yourself: https://youtu.be/9MzvDoXtMLc (looks as if /pause is broken unless you notice that you are spectating yourself).

This could've happened when you pressed spectate_next button while playing and SpectatorID got changed to yourself. I think it doesn't make sense to allow changing SpectatorID when playing at all.

I've also tried to simplify the code: the number of `for` loops in the updated code goes down from 10 to 3.

Things tested with this change:
1. Cycling through players when spectating (works)
2. Changing SpectatorID when not spectating (no longer possible)
3. Spectating yourself (still possible with "spectate N" command but no longer happens accidentally because of 2)
4. "spectate_closest" command (works)
5. Replaying demos where player goes into spectators (works)


Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-10-02 07:55:30 +00:00
def 134400158a Clean up MapLayers 2020-09-30 23:59:50 +02:00
def 12f150393b Free assets 2020-09-30 23:59:38 +02:00
Pure luck 9a89b6fc68 fix for a SixUp vote creator id which wasn't set 2020-09-30 18:01:50 +03:00
def 1560a88413 AntiPing limit is unintuitive, remove from settings 2020-09-30 10:17:17 +02:00
def ba258d7343 Add Background music volume slider
as requested by hussainx3
2020-09-30 10:06:55 +02:00
def 973a4caf4b Show days and hours in game time 2020-09-29 22:58:34 +02:00
def 1b1d8f7964 Don't show wrong decisecs in game time in HUD 2020-09-29 22:58:34 +02:00
def 9b0081de57 Fix ctrl+shift+d moving tee (fixes #2930) 2020-09-29 22:58:26 +02:00
def 10355851ca Need to send info when updating skin in text field
As reported by abcqwerty on Discord
2020-09-29 22:58:09 +02:00
def 8efff70d88 Show File button in demo player
to easily get the file instead of having to search for it in the file
browser again. Complements #2946
2020-09-29 22:57:55 +02:00
def b6e4626053 Add clear button to server address field
as suggested by Cøke
2020-09-29 22:41:41 +02:00
Dennis Felsing 1a7eed4937
Merge pull request #2951 from def-/pr-repeated
Reset m_TimesRepeated on new line
2020-09-29 19:02:34 +02:00
def 90211d18ef Reset m_TimesRepeated on new line
otherwise random lines will mistakenly show [2]
2020-09-29 17:01:57 +02:00
Learath 88c054261a Fix multiple layer selection for groups 2020-09-29 13:31:22 +03:00
bors[bot] 7432f569e2
Merge #2946
2946: Add directory buttons r=def- a=Jupeyy

fixes #2944

windows:

![screenshot_2020-09-29_03-16-32](https://user-images.githubusercontent.com/6654924/94502023-78d03300-0203-11eb-8807-ba9d9dca801b.png)

skin:

![screenshot_2020-09-29_03-20-32](https://user-images.githubusercontent.com/6654924/94502035-85548b80-0203-11eb-8105-d1e52593f1e5.png)


but no chance for demo:
![screenshot_2020-09-29_03-23-13](https://user-images.githubusercontent.com/6654924/94502044-8b4a6c80-0203-11eb-8161-4897082a5a66.png)

naming suggestions are welcome
theme directory, themes directory
whatever

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-29 09:30:39 +00:00
Jupeyy 456625893b Add directory buttons 2020-09-29 10:24:40 +02:00
def e4023cb18b Dynamic Camera button: Use g_Config.m_ClDyncam as pID 2020-09-29 08:25:38 +02:00
Dennis Felsing 16f965a0e6
Merge pull request #2940 from def-/pr-empty-lines
Fix empty lines in chat (fixes #1835)
2020-09-29 07:51:12 +02:00
Dennis Felsing b88b33cea4
Merge pull request #2928 from Jupeyy/pr_multiple_pngs
Add changeable assets
2020-09-29 07:46:43 +02:00
def 18ad5b58c0 Fix empty lines in chat (fixes #1835) 2020-09-28 23:25:04 +02:00
Jupeyy 0e71a47708 Add customization 2020-09-28 23:21:32 +02:00
Fireball d06e956739 Don't change SpectatorID when not spectating, simplify code
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
2020-09-28 19:55:47 +01:00
plsplsplslol 236015c474 print out modifiers when unbinding 2020-09-27 17:38:50 -07:00
bors[bot] af958704ca
Merge #2887
2887: Join identical chat lines to prevent spam r=def- a=edg-l

![image](https://user-images.githubusercontent.com/15859336/93714967-6f412e00-fb66-11ea-9b56-2ff2c053b8c1.png)

May fix https://github.com/ddnet/ddnet/issues/259

Needs a bit more testing

Co-authored-by: Edgar <git@edgarluque.com>
2020-09-27 19:28:55 +00:00
Edgar 5391ff8cc9
fix auto rules scrollbar bugs 2020-09-27 17:20:41 +02:00
Edgar 12161cc55b
change and fix how counter is displayed 2020-09-27 13:28:50 +02:00
def 2deb8aa380 Fix Windows compilation 2020-09-27 11:05:54 +02:00
Edgar 1d8a20f17a join multiple identic chat lines 2020-09-27 00:39:16 +02:00
bors[bot] 6bb8cda483
Merge #2926
2926: clang-format entire repo r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-26 22:10:58 +00:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
def 0bac9f0de8 Manual preparation for cleaner clang-format
Also include what you use explicitly
2020-09-26 21:41:01 +02:00
bors[bot] 50b8771d04
Merge #2931
2931: Only auto dilate for transparent images r=def- a=Jupeyy

As reported by mind

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-26 19:37:32 +00:00
def f74cc43f4c Remove pure server filters, add space for Countries/Types
Not so relevant anymore
2020-09-26 21:33:25 +02:00
Jupeyy c69c765507 Only auto dilate for transparent images 2020-09-26 18:57:19 +02:00
def dcfa752e61 After initialization: Agressively try to grab window again
Since some users on Windows report window not being initially focussed
2020-09-26 09:09:05 +02:00
bors[bot] 8b399ba1be
Merge #2861
2861: Implement censoring words on server r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-25 23:07:15 +00:00
bors[bot] c6ade7eeeb
Merge #2917
2917: Create ALLOW_X_SKINS game info flag r=heinrich5991 a=def-

To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.

Co-authored-by: def <dennis@felsin9.de>
2020-09-25 21:22:38 +00:00
def f2386d5c02 Address reviewer comments 2020-09-25 22:25:45 +02:00
bors[bot] 5f6ba345b8
Merge #2923 #2924
2923: Don't str_copy into string itself r=Learath2 a=def-

when reconnecting after server was full:

[2020-09-25 15:39:34][client]: offline error='This server is full'
Source and destination overlap in strncpy(0xd3328e2, 0xd3328e2, 255)
   at 0x483DFDC: strncpy (vg_replace_strmem.c:550)
   by 0x249180: str_copy (system.c:2328)
   by 0x27E1F5: CClient::Connect(char const*, char const*) (client.cpp:707)
   by 0x287864: CClient::Update() (client.cpp:2914)
   by 0x28891B: CClient::Run() (client.cpp:3216)
   by 0x28EDEC: main (client.cpp:4309)

2924: Fix Score/Time alignment r=def- a=Learath2

![screenshot_2020-09-25_16-52-30](https://user-images.githubusercontent.com/490500/94275676-e81dfc80-ff4f-11ea-9f21-dbf5d1cf73a9.png)

Also adds hours to the time

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
2020-09-25 14:55:51 +00:00
Learath 32c3cba4fa Fix scoreboard alignment issues 2020-09-25 17:44:37 +03:00
Pure luck 3cd0f30d55 laser_damage bugfix styling 2020-09-25 17:41:17 +03:00
Pure luck e7d830a01e bugfix: laser_damage was removed from tunes of 0.7 protocol 2020-09-25 17:25:59 +03:00
bors[bot] 32c77faecc
Merge #2920
2920: stop disabling textinput during connecting r=def- a=TsFreddie

closes #2919 

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-25 05:51:32 +00:00
TsFreddie 712e9e90c0 stop disabling textinput during connecting 2020-09-25 01:08:48 +01:00
def 9ab8de5718 fix clang-format 2020-09-24 19:05:30 +02:00
def 00b66362c3 Allow zooming on city mod 2020-09-24 19:05:30 +02:00
def 9f9ccaccf7 Create ALLOW_X_SKINS game info flag
To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.
2020-09-24 19:05:30 +02:00
bors[bot] 7000987ff5
Merge #2884
2884: Add scrollbar to auto rules list, fixes #2514 r=def- a=edg-l

![image](https://user-images.githubusercontent.com/15859336/93710826-afde7e80-fb49-11ea-9754-c44c79d5ff94.png)

It doesn't show a scrollbar when there aren't more than 5 rules.

Co-authored-by: Edgar <git@edgarluque.com>
2020-09-24 17:01:19 +00:00
Edgar fb3b40917a
fix style script 2020-09-24 18:53:11 +02:00
Edgar 76f3dbfe64
fix scrolling triggering zoom 2020-09-24 18:52:31 +02:00
def f7cf854c36 Make sure turning dyncam off in settings works
Even if players have cl_mouse_followfactor turned on

Alternative fix for #2761 since players keep reporting confusion about this
2020-09-24 18:27:31 +02:00
Edgar af29d8da99
remove unnecessary condition 2020-09-24 18:09:35 +02:00
def ebb4e3debe Center update info text, add -DINFORM_UPDATE flag
to be used for Steam release, since autoupdates are enforced anyway and
players don't need to be reminded to update
2020-09-24 13:41:59 +02:00
def eb725f800e Allow specifying -DGAME_RELEASE_VERSION
to be used for nightlies and release candidates to be able to tell them
from regular releases more easily. For example:

CPPFLAGS="-DGAME_RELEASE_VERSION=\\\"15.0.5-rc1\\\"" cmake .
2020-09-24 12:20:38 +02:00
bors[bot] ceefdacfbc
Merge #2894
2894: Add new renderer(as streamed vertices) for editor r=def- a=Jupeyy

Does not improve performance in editor!

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-24 08:06:42 +00:00
def d9719a3c15 Fix spacing in themes selection 2020-09-23 23:38:29 +02:00
Jupeyy 8235df7752 Add menu background map 2020-09-23 23:38:28 +02:00
bors[bot] d707b3883c
Merge #2909
2909: Set IME Window Position & Prevent Input from fighting with IME r=def- a=TsFreddie

Mainly solves the backspace problem where you were able to delete from chat and ime comps at the same time.
Also set the position of composition window

Need some testing from other languages' users.
Need https://github.com/ddnet/ddnet-libs/pull/14 to work on windows

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-23 21:23:02 +00:00
Dennis Felsing bedd559988
Merge pull request #2900 from def-/pr-15.0.5
Version 15.0.5
2020-09-23 17:32:57 +02:00
nobody-mb 78040b31e5
automatically kick k-client (#2912) 2020-09-23 16:52:50 +02:00
Jupeyy 84cad658d6 Add new renderer(as streamed vertices) for editor 2020-09-23 16:45:32 +02:00
bors[bot] 1b26312e3c
Merge #2902
2902: Don't rely on snapshot for ddnet gametype r=heinrich5991 a=Jupeyy

@fokkonaut you need to test again if you mod works.
This time i also did the test for masked entites(but not for non masked ones).

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-23 14:15:01 +00:00
patiga 4e893561c8 run fix_style script 2020-09-23 08:15:06 +02:00
patiga df72c0ee7c set the correct variable 2020-09-23 08:14:37 +02:00
Jupeyy 7e436ff2b1 Don't rely on snapshot for ddnet gametype 2020-09-23 08:14:33 +02:00
def 91d2f89b54 Version 15.0.5 2020-09-23 08:14:28 +02:00
Jupeyy eb7c84cd7f Add hover for demo list 2020-09-22 18:42:03 +02:00
TsFreddie d4da82f977 clang-format 2020-09-22 17:02:03 +01:00
TsFreddie 387bc53030 ime window position & ime input handling 2020-09-22 17:01:13 +01:00
Jupeyy 0ddc7fddb4 Don't rely on snapshot for ddnet gametype 2020-09-22 17:42:19 +02:00
bors[bot] fddb8b34c0
Merge #2898 #2901 #2908
2898: Inform players that they are in team already r=heinrich5991 a=def-



2901: Remove failed downloaded files immediately r=heinrich5991 a=def-

Especially skins were only deleted after they were requested again

2908: Don't log skin downloading progress r=heinrich5991 a=def-

since it's not really interesting for most players, as long as things work fine

Co-authored-by: def <dennis@felsin9.de>
2020-09-22 14:57:20 +00:00
def 56b152e962 Remove failed downloaded files immediately
Especially skins were only deleted after they were requested again
2020-09-22 16:51:40 +02:00