Commit graph

7445 commits

Author SHA1 Message Date
heinrich5991 35dca7e17d Forgot to actually send Sv_RecordLegacy to old clients 2021-02-24 23:40:11 +01:00
heinrich5991 44437eed39 Fix return values for loading saves
Introduced by an incorrect rebase.
2021-02-24 20:43:07 +01:00
heinrich5991 83da81e8c3 Use ExecuteUpdate for SQL INSERT statements
Fixes
```
save score failed: (fetch:stmt:2014): Commands out of sync; you can't run this command now
```
2021-02-24 20:42:47 +01:00
bors[bot] 2fb1c723c9
Merge #3568
3568: Get rid of the MySQL C++ connector as a dependency and disable C++ exceptions r=Learath2 a=heinrich5991

We now use the C API directly. This has the advantage of using one
obscure dependency less, as the C++ connector also used the C API.

Also remove exceptions from database code.

The equivalent code with return codes is a human-assisted mechanical
translation of the old code, no attempts to improve correctness were
made.

This allows us to enable the -fno-exceptions flag.

## 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
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-02-24 16:43:16 +00:00
heinrich5991 9568d1055a Remove exceptions from database code
The equivalent code with return codes is a human-assisted mechanical
translation of the old code, no attempts to improve correctness were
made.

This allows us to enable the -fno-exceptions flag.
2021-02-24 17:39:48 +01:00
heinrich5991 794d768ccb Bump version for the new protocol to DDNet 15.4
This fixes interoperability with DDNet 15.3 which did in the end not
support the new messages.
2021-02-24 17:09:39 +01:00
Alexander Akulich 6b49bf1388 Make spectators stay specs on map changed
Based on PRs to the upstream:
https://github.com/teeworlds/teeworlds/pull/2065
https://github.com/teeworlds/teeworlds/pull/2066

Co-authored-by: Jordy Ruiz <jordy.ruiz@univ-lille.fr>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-02-23 19:36:52 +03:00
Alexander Akulich 2790270abf Adopt upstream refactoring: Mark several functions as 'const' 2021-02-23 18:26:16 +03:00
Alexander Akulich dfc75806c6 CGameContext::SendVoteStatus: Hide the trick for 64 clients
as an implementation detail. This way the caller is synced with the upstream
and does not care about 64 players.
2021-02-23 18:26:16 +03:00
Alexander Akulich 688f11ef34 Move DDRace-specific player initialization code to the Controller 2021-02-23 18:26:16 +03:00
Alexander Akulich b0c0fb316c Get rid of gamemode.h with confusing definitions
We also have GAME_NAME macro in game/version.h and the macros
from gamemode are not used anywhere else.
2021-02-23 18:26:16 +03:00
Alexander Akulich a6bdda60ed GameController: Add OnPlayerConnect() like in the upstream 2021-02-23 18:26:16 +03:00
Alexander Akulich a9bc6190eb CGameControllerDDRace: Add Score() getter 2021-02-23 18:26:16 +03:00
Alexander Akulich ef6282d2e0 Replace remaining int64_t by int64 for the sake of consistency
The codebase uses int64 since commit f4344dc420.
2021-02-23 18:26:16 +03:00
Jupeyy 05dfc51770 Fix scoreboard overlapping 2021-02-21 12:58:45 +01:00
bors[bot] 141a738ba6
Merge #3634
3634: Fix zoom (fixes #3619) 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>
2021-02-20 22:24:46 +00:00
def 85aff4362a Version 15.3.2 2021-02-20 23:15:26 +01:00
def b2abbb54b5 Fix zoom (fixes #3619) 2021-02-20 23:15:07 +01:00
bors[bot] daf13cb85a
Merge #3630
3630: /times: Show country rank is from 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>
2021-02-20 22:09:30 +00:00
def 660d23adac /times: Show country rank is from 2021-02-20 23:07:02 +01:00
def 2efbd53cbc Version 15.3.1 2021-02-20 22:39:53 +01:00
bors[bot] a73bf0e9bd
Merge #3606 #3617 #3628 #3631
3606: Remove gfx_show_warnings 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)


3617: Update translations + update Brazilian Portuguese translation (supersedes #3616) r=heinrich5991 a=def-

Thanks to @rffontenelle for the Brazilian Portuguese translation update.

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


3628: Don't toggle Destructive in editor when pressing ctrl-shift-d r=heinrich5991 a=def-

As reported by texnonik on Discord

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

## Checklist

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


3631: Prevent editor crash when setting image to None r=heinrich5991 a=def-

As reported by Anoian

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
2021-02-20 16:46:00 +00:00
bors[bot] 71477de816
Merge #3581
3581: Improve performance of /top5points query, remove negative /top5points since it makes no sense anyway 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>
2021-02-20 16:36:20 +00:00
def 82f762c5ac Prevent editor crash when setting image to None
As reported by Anoian
2021-02-19 15:43:41 +01:00
bors[bot] 1ac07fe797
Merge #3626
3626: Rename save/load to conform to the code style r=def- a=Zwelf

Small cleanup

## 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: Zwelf <zwelf@strct.cc>
2021-02-16 22:47:32 +00:00
def 670f318779 Don't toggle Destructive in editor when pressing ctrl-shift-d
As reported by texnonik on Discord
2021-02-16 22:26:58 +01:00
Zwelf 9daf1274a4 Rename save/load to conform to the code style 2021-02-16 18:15:50 +01:00
Zwelf c59c41bd3f Inform player while loading when save exists, but they don't belong to the team 2021-02-16 17:54:13 +01:00
Jupeyy 00e22d8d14 Fix chat refind skins 2021-02-15 15:15:21 +01:00
bors[bot] 55a8293e7e
Merge #3608
3608: Fix crash on autoban unsupported client r=heinrich5991 a=fokkonaut

I moved the check where it returns to after the join message because if a client uses the new CLIENTVER system it would just drop without even a join message, looks weird if the chat only shows a player leaving, but not joining :D

## Checklist

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


Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2021-02-12 19:04:00 +00:00
bors[bot] 2b29a9a0c8
Merge #3610
3610: Fix top time not being displayed on old servers r=def- a=heinrich5991

Fix #3599.

(Forgot to check for both NETMSG_RECORD and NETMSG_RECORDLEGACY in one
place.)

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-02-11 23:49:20 +00:00
heinrich5991 f199b5101f Change record message to record@netmsg.ddnet.tw
Now that I understand that the message is still in use, rename it from
`weird-record@netmsg.ddnet.tw`.
2021-02-12 00:31:51 +01:00
heinrich5991 e1448bebc7 Fix top time not being displayed on old servers
Fix #3599.

(Forgot to check for both NETMSG_RECORD and NETMSG_RECORDLEGACY in one
place.)
2021-02-11 23:33:50 +01:00
fokkonaut c79bb91b16 Fix crash on autoban unsupported client 2021-02-11 12:51:56 +01:00
def 2a87814d84 Version 15.3 2021-02-11 10:45:20 +01:00
def 28eb4b15af Remove gfx_show_warnings 2021-02-10 23:02:34 +01:00
trml e6de475a72 Don't predict other teams 2021-02-07 23:27:45 +01:00
def c28d949f0c Improve performane of /top5points query
Thanks to Learath2

Also remove negative /top5points since it makes no sense anyway
2021-02-02 00:15:56 +01:00
def 15220d4545 Fix button presses after esc after color picker usage (fixes# 3575) 2021-02-01 23:49:44 +01:00
bors[bot] ed9abba485
Merge #3586 #3587
3586: Disallow some more switch entities r=heinrich5991 a=def-

As reported by ReD

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


3587: Fix color picker positioning (fixes #3574) r=heinrich5991 a=def-

![screenshot-20210201@193418](https://user-images.githubusercontent.com/2335377/106502369-93256080-64c4-11eb-832f-6c2318d63e87.png)
## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-02-01 20:49:35 +00:00
def 5e4481d9cc Fix color picker positioning (fixes #3574) 2021-02-01 19:34:41 +01:00
def 75a2ca613e Disallow some more switch entities
As reported by ReD
2021-02-01 15:01:46 +01:00
def 6f2c82c0d4 SUBSTRACT -> SUBTRACT 2021-02-01 14:55:26 +01:00
heinrich5991 18bb0ed92c Fix /pause not working
Caused by a logic error in a comparison, comparing a client ID with a
DDNet version.

Fixes #3578.
2021-02-01 00:58:09 +01:00
bors[bot] e2c7c81c55
Merge #3572
3572: Fix sizing in graphics menu r=heinrich5991 a=def-

As reported by louis
![screenshot-20210131@202748](https://user-images.githubusercontent.com/2335377/106395490-cc959780-6402-11eb-8217-77c026ce2b4f.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
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)



Co-authored-by: def <dennis@felsin9.de>
2021-01-31 22:17:25 +00:00
def f49e8b060d DDnet -> DDNet
As reported by Ravie
2021-01-31 20:29:43 +01:00
def 32f7a7979e Fix sizing in graphics menu
As reported by louis
2021-01-31 20:27:10 +01:00
bors[bot] 8be462af26
Merge #3557
3557: Log duplicate messages in console r=edg-l a=def-

As reported by fokkonaut

<!-- 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
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2021-01-31 14:55:45 +00:00
bors[bot] 2b5723cdef
Merge #3492 #3559 #3561 #3565
3492: Support F-Client and replace non-extended extension messages r=Learath2 a=heinrich5991

This continues what #3439 started, and also replaces non-extended messages that are DDRace extensions with extended messages. The DDNet server still sends the old message to old clients and the DDNet client still understands the old messages.

Supersedes #3439.

## Checklist

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


3559: Don't highlight us if we have no name (alternative fix for #3554) 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
- [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)


3561: Fix input message position in teehistorian files r=heinrich5991 a=Zwelf

Previously the message was recorded when incoming. But the time when the input should apply wasn't recorded. Now inputs are recorded right before they get applied in the game world.

And record exact tick where load/save result is returned.

## Checklist

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


3565: Add Arabic language translation by .Yukki r=heinrich5991 a=def-

![screenshot-20210131@093216](https://user-images.githubusercontent.com/2335377/106378755-747d7780-63a7-11eb-9553-6a1898907441.png)

## Checklist

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


Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Zwelf <zwelf@strct.cc>
2021-01-31 14:37:48 +00:00
Zwelf 80df59ba5a Clarify teehistorian code 2021-01-28 23:42:01 +01:00
Zwelf 04e8ce56a9 Record exact tick where load/save result is returned 2021-01-28 22:50:15 +01:00
Zwelf cd407a08a8 Fix teehistorian PLAYER_INPUT message position
Previously the message was recorded when incoming. But the time when the input
should apply wasn't recorded.
Now inputs are recorded right before they get applied in the game world.
2021-01-28 22:50:00 +01:00
Dennis Felsing 243f330e3c
Merge pull request #3550 from def-/pr-revert-freeze-rescue
Revert "rescue on freeze/dfreeze"
2021-01-28 18:53:07 +01:00
bors[bot] b08b93ee73
Merge #3556
3556: Don't highlight echo messages (fixes #3554) 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
- [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: def <dennis@felsin9.de>
2021-01-28 14:37:20 +00:00
def af8b306dfb Don't highlight us if we have no name 2021-01-28 15:36:30 +01:00
def 487bd18a39 Log duplicate messages in console
As reported by fokkonaut
2021-01-28 11:32:38 +01:00
def c30b596dab Don't highlight echo messages (fixes #3554) 2021-01-28 11:21:55 +01:00
def cbf5aa6e36 Reset filter: Refresh browser in DDNet/KoG tabs
so that countries/types is also updated
2021-01-27 19:24:10 +01:00
heinrich5991 43998ce41a Replace projectile hack with a new extended snapshot object
Still send the old hack to old clients, still accept the old hack from
old servers. This is so F-Client can support DDNet servers without such
hacks.
2021-01-26 20:58:42 +01:00
def f2cf038248 Revert "rescue on freeze/dfreeze"
This reverts commit 28cf3b31ba.
2021-01-26 14:44:01 +01:00
def e16dd5c1d2 HTTP Map Download: Time out faster
Since our maps2.ddnet.tw doesn't work well for players in China
2021-01-26 00:19:19 +01:00
bors[bot] a3ae016177
Merge #3531
3531: Add set_view camera position command r=heinrich5991 a=ChillerDragon

Allows to bind spectator camera positions. Can be used to write teleport binds for test server or quickly spectate specific spots of the map.

## Checklist

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


Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-01-25 11:46:32 +00:00
bors[bot] aa43e329b6
Merge #3538
3538: Improve error messages when you can't join team 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
- [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: def <dennis@felsin9.de>
2021-01-25 11:35:39 +00:00
bors[bot] f5280919f1
Merge #3541
3541: rank/teamrank: Display how much better you are r=def- a=def-

![screenshot-20210123@231642](https://user-images.githubusercontent.com/2335377/105615509-8c666180-5dd1-11eb-94b4-a3f5d9131383.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Zwelf <zwelf@strct.cc>
2021-01-24 17:34:07 +00:00
Zwelf 953ea87929 Use sql PERCENTAGE_RANK() window function 2021-01-24 16:41:43 +01:00
bors[bot] ab897f21f1
Merge #3539
3539: Inform player about possibility to keep the hook when loading r=def- a=Zwelf

Message is displayed when saving with an active hook

## Checklist

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


Co-authored-by: Zwelf <zwelf@strct.cc>
2021-01-24 14:50:43 +00:00
bors[bot] 319c382167
Merge #3343
3343: rescue on freeze/dfreeze (supersedes #3335) r=heinrich5991 a=def-

Fixed all the merges and clang-format (hopefully)

## 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: Vlad <gerdoexx@gmail.com>
2021-01-24 00:07:31 +00:00
def b28cdc933a rank/teamrank: Display how much better you are 2021-01-23 23:19:45 +01:00
ChillerDragon 9a3e8bb0a2 Add set_view camera position command 2021-01-23 17:36:35 +01:00
Zwelf a3702e8314 Inform player about possibility to keep the hook when loading
Message is displayed when saving with an active hook
2021-01-23 16:49:50 +01:00
bors[bot] a176990649
Merge #3537
3537: Fix condition for eye emote (fixes #3536) 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
- [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: def <dennis@felsin9.de>
2021-01-23 14:53:00 +00:00
def d39a17933d Improve error messages when you can't join team 2021-01-23 15:52:57 +01:00
def 4eeb14d2f4 Fix condition for eye emote (fixes #3536) 2021-01-23 12:04:14 +01:00
bors[bot] 14e70506e1
Merge #3535
3535: Fix a possible race in load code  r=def- a=heinrich5991

Previously, a save could possibly be loaded twice given enough latency
discrepancy between servers. The server only verified that it deleted
*some* save with the given password, not *the* save it is trying to
load. This is fixed by also checking the SaveID column that is random
and globally unique (except for the old NULLs). Since users can't create
new saves with NULL SaveID, these pose no problem.

Also change the default UUID for saves without save ID to something
nonzero, so we can't accidentally hit it due to a bug.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [x] 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: heinrich5991 <heinrich5991@gmail.com>
2021-01-23 10:14:32 +00:00
heinrich5991 7b0b1c4162 Fix a possible race in load code
Previously, a save could possibly be loaded twice given enough latency
discrepancy between servers. The server only verified that it deleted
*some* save with the given password, not *the* save it is trying to
load. This is fixed by also checking the SaveID column that is random
and globally unique (except for the old NULLs). Since users can't create
new saves with NULL SaveID, these pose no problem.

Also change the default UUID for saves without save ID to something
nonzero, so we can't accidentally hit it due to a bug.
2021-01-23 01:21:20 +01:00
heinrich5991 3539f2b183 Allow ParseUuid to report errors and add tests 2021-01-23 01:21:20 +01:00
def 9196a9a3d4 Fix crash on namechange (fixes #3444) 2021-01-22 19:17:21 +01:00
bors[bot] 93acedf00e
Merge #3523
3523: Handle switch number 0 r=heinrich5991 a=def-

Thanks to ReD for report

<!-- 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>
2021-01-22 17:31:35 +00:00
bors[bot] 77a9f41268
Merge #3530
3530: Improve ClShowDistance a bit 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>
2021-01-22 17:16:37 +00:00
def 23c145d760 Improve ClShowDistance a bit 2021-01-21 17:07:07 +01:00
bors[bot] 5d927f35b6
Merge #3502
3502: Some (mostly backported) refactor r=Learath2 a=Kaffeine

Port some cleanup and refactoring from the upstream and add some custom refactoring.

Changes overview:
- Backported angle() and direction() functions (upstream commit 7735557aa5)
- Backported vector math cleanup (remove some pointless templates, refactor other functions; upstream commit bdaabc10bc)
- `ddracechat.h` (used by both client and server) moved to a shared dir next to `ddracecommands.h`
- Backport `IGameController::DoActivityCheck()`
- Backport `IGameController::DoTeamChange()`
- Backport `IGameController::OnPlayerDisconnect()`
- Refactor Emote-related code (decouple the code and hide the details in CPlayer class)
- Fix: restore default emote on the emote override ended over.
- CCharacter::HandleTiles(): Move a part of DDRace-specific code to the DDRace GameController
- Add `IGameController::GetMaskForPlayerWorldEvent()` to port classes away from direct `CGameControllerDDRace/CGameTeams` usage.

Result overview:
- CPlayer does not depend on CGameControllerDDRace nor CGameTeams anymore
- CCharacter does not depend on CGameControllerDDRace anymore

I'm not sure that `GetMaskForPlayerWorldEvent()` is a good name for that. The idea of the method is to abstract the users of `CreateExplosion`, `CreatePlayerSpawn`, `CreateDeath`, `CreateSound`, and other world events from thinking about the player team.

I checked that the client and server work (didn't do deep testing though).

## Checklist

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


Co-authored-by: Alexander Akulich <akulichalexander@gmail.com>
Co-authored-by: BeaR <cinaera@web.de>
2021-01-21 10:56:38 +00:00
Zwelf 4375bc1ac6 Don't depend on table locking for savegame load/save synchronization 2021-01-20 21:42:44 +01:00
def cd8e67df66 Handle switch number 0
Thanks to ReD for report
2021-01-20 20:00:25 +01:00
Alexander Akulich c28bd693d3 CPlayer: Port to GetMaskForPlayerWorldEvent
The CPlayer class does not depend on CGameTeams anymore.
2021-01-19 22:36:23 +03:00
Alexander Akulich d2744d595a GameController: Introduce GetMaskForPlayerWorldEvent() 2021-01-19 22:36:23 +03:00
Alexander Akulich d536743dda DDRace GameController: Set Teams to CCharacter on Spawned
Since this commit, CCharacter does not directly depend on
CGameControllerDDRace anymore.
2021-01-19 22:36:22 +03:00
Alexander Akulich e0affc3f34 CCharacterCore: Join Init() methods 2021-01-19 22:36:09 +03:00
Alexander Akulich 33dc79d190 Character: Make the GameController set the Teleports info
CCharacter::HandleTiles() doesn't depend on the CGameControllerDDRace anymore.
2021-01-19 22:36:03 +03:00
trml 34d80e65c8 Don't predict input from the dummy when it is paused 2021-01-18 23:55:13 +01:00
bors[bot] 174eeab80d
Merge #3504
3504: Display median time instead of average (fixes #3399) r=heinrich5991 a=def-

Do we want average too or just median?

## 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: def <dennis@felsin9.de>
2021-01-17 16:40:50 +00:00
Alexander Akulich d5dbd94c66 CCharacter: Move Team-related tiles handling to the DDRace Controller 2021-01-16 03:20:58 +03:00
Alexander Akulich f7dfd8c9b9 CCharacter: Move start/finish tiles handling to the DDRace Controller 2021-01-16 03:20:58 +03:00
Alexander Akulich acfb541db9 DDrace GameController: Add GetPlayerTeam() 2021-01-16 03:20:58 +03:00
Alexander Akulich a14607f818 Introduce GameController::HandleCharacterTiles() 2021-01-16 03:20:58 +03:00
Alexander Akulich d924d9bf68 CCharacter: Extract ResetPickups() 2021-01-16 03:20:58 +03:00
Alexander Akulich 729262b896 GameController: Move the DDRace-specific code to the subclass
This leads to some small code duplication but let us remove the ugly casts.
2021-01-16 03:20:58 +03:00
Alexander Akulich 39938b6b2f Adjust the CGameControllerDDRace header file
- Reorder the methods as they're in the source file
- Move the member variables to the end (to later apply a special access-control)
- Mark Tick() override (we use C++11 and this is our own code)
2021-01-16 03:20:58 +03:00
Alexander Akulich cba66d96f2 CPlayer: Remove unused GameControllerDDRace include 2021-01-16 03:20:58 +03:00
Alexander Akulich 2191996254 CPlayer: Make the emote-related members private 2021-01-16 03:20:58 +03:00
Alexander Akulich 281186468f CPlayer: Correctly restore the default emote on override emote expired
We used to set EMOTE_NORMAL even on 'special' days ('events' config option).
2021-01-16 03:20:58 +03:00
Alexander Akulich f0e34c9c36 Move DefaultEmote logic into CPlayer 2021-01-16 03:20:58 +03:00
Alexander Akulich 4004fc093c CPlayer: Add missing reset for m_LastEyeEmote 2021-01-16 03:20:58 +03:00
Alexander Akulich 5a9af45f9a CPlayer: Rename EyeEmote to EyeEmoteEnabled (to be clear) 2021-01-16 03:20:58 +03:00
Alexander Akulich 2286771349 ConEyeEmote: Don't count the command if arguments not valid 2021-01-16 03:20:58 +03:00
Alexander Akulich 9197075654 Refactor the SetEmote code to remove custom CCharacter methods 2021-01-16 03:20:58 +03:00
Alexander Akulich b36a4fd8c3 Process CPlayer::m_DefEmoteReset in CPlayer 2021-01-16 03:20:58 +03:00
Alexander Akulich ecce5631ed Move Halloween emoticon to CPlayer and send it once per client
GameServer()->SendEmoticon() sends CNetMsg_Sv_Emoticon packet to everyone.

Calling SendEmoticon() from Character::Snap(ClientID) triggers as many
messages to everyone as there are active players.

Move the SendEmoticon() because it is not the Character (a world entity object)
responsibility to celebrate a day. Actually it is not CPlayer responsibility
either but CPlayer is the class where we deciding to celebrate (checking the
date) so at least let's keep the coupled stuff together.
2021-01-16 03:20:58 +03:00
Alexander Akulich 457f91ca8d CCharacter: Add GetLastAction() 2021-01-16 03:20:58 +03:00
Alexander Akulich 19234987c9 Backport IGameController::OnPlayerDisconnect() from the upstream
Upstream commit 5e4caa9b9c
2021-01-16 03:20:58 +03:00
Alexander Akulich 7512ad285b Backport IGameController::DoTeamChange from the upstream
Upstream commit 5e4caa9b9c
2021-01-16 03:20:58 +03:00
Alexander Akulich c4405c4811 GameController: Backport reorder from upstream
Upstream commit 5e4caa9b9c
2021-01-16 03:20:57 +03:00
Alexander Akulich e34f268bed Make CSaveTee and CPlayer not friends anymore 2021-01-16 03:20:57 +03:00
Alexander Akulich ffe3f110eb GameController: Extract DoActivityCheck()
Apply refactoring from the upstream.
2021-01-16 03:20:57 +03:00
Alexander Akulich 242aa63178 ddracechat.h is used by the client, so move it to src/game
where ddracecommands.h already is.
2021-01-16 03:20:57 +03:00
Alexander Akulich dfd60e6668 CGameContext: Remove ugly CGameControllerDDRace::m_Teams.Reset()
We called CGameControllerDDRace constructor on the previous line.
The CGameControllerDDRace invokes CGameTeams constructor which calls
Reset() on his own.

There is no chance how this can change anything.
2021-01-16 03:20:57 +03:00
Alexander Akulich 5d0bb4cf3c Backport vector functions cleanup from the upstream
Keep closest_point_on_line() as-is.

(commit 6b69f94dc8)
2021-01-16 03:20:57 +03:00
BeaR 9f0b0af862 Add angle<->direction conversion functions to vector math (Cleanup)
Keep angle() (ex. GetAngle()) as-is.

(cherry picked from commit 7735557aa5)
2021-01-16 03:20:57 +03:00
def 39d06c5e85 Display median time instead of average (fixes #3399) 2021-01-12 14:24:38 +01:00
def dccbf26ca0 Differentiate hook symbol 2021-01-12 10:22:39 +01:00
heinrich5991 9784726683 Replace remaining non-extended extension messages
Add backward compatibility stuff, but this allows newer clients to only
care for new messages.
2021-01-12 01:48:10 +01:00
heinrich5991 0d916e2ef6 Remove F-Client-specific messages
The PLAYERFLAG_AIM can now be set directly on DDNet servers via the 0.7
bridge and will be sent to clients identifying themselves as DDNet
clients.

Add a new extended message that mirror the old `Sv_TeamsState`.
2021-01-12 01:38:23 +01:00
fokkonaut 9940a806fa Support for F-Client 2021-01-12 01:38:23 +01:00
bors[bot] 5d45f061fa
Merge #3498
3498: Make netclipping of entities and events respect shown distance (fixes #3420) 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>
2021-01-11 22:21:01 +00:00
def cbda5b720a Make netclipping of entities and events respect shown distance (fixes #3420) 2021-01-11 23:11:28 +01:00
bors[bot] d0cdf23526
Merge #3493 #3497
3493: Keep showing last checkpoint after kill r=heinrich5991 a=def-

Some maps kill you quickly and you can't see how good your last run was,
for example "Buckle Up".

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


3497: No network clip in client prediction 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>
2021-01-11 20:21:44 +00:00
def f9aae5d53a No network clip in client prediction 2021-01-11 18:02:52 +01:00
def 9033968518 Freeview mouse moves faster when zoomed out (fixes #3459) 2021-01-11 17:54:33 +01:00
Zwelf 87d422df5a Remove unused onChangeTeamState 2021-01-11 14:29:01 +01:00
def 95e4418026 Keep showing last checkpoint after kill
Some maps kill you quickly and you can't see how good your last run was,
for example "Buckle Up".
2021-01-11 14:09:37 +01:00
bors[bot] c8b4ce9c92
Merge #3465
3465: Reset practice after team saved and got killed r=Zwelf a=def-

As reported by Polector on Discord

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-11 13:09:18 +00:00
def 4520ea3bb7 Reset practice after team saved and got killed
As reported by Polector on Discord
2021-01-11 00:23:36 +01:00
bors[bot] e0d6fa4670
Merge #3476 #3484
3476: Indicate strength of hook in nameplates r=heinrich5991 a=def-

off by default, cl_nameplates_strong 1 to enable

also shown in debug mode (ctrl-shift-d)

![screenshot-20210105@142505](https://user-images.githubusercontent.com/2335377/103651612-2b7e0300-4f62-11eb-8b45-09b8b125f2a6.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
- [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)


3484: Fix up/down keys in demo browser 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>
2021-01-10 16:57:26 +00:00
bors[bot] 6f4fb1a926
Merge #3468
3468: Improve grammar when locking team (fixes #3467) 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>
2021-01-10 16:46:08 +00:00
bors[bot] 124c4b1acf
Merge #3463
3463: Dynamically size scoreboard title r=heinrich5991 a=def-

![screenshot_2020-12-31_10-01-53](https://user-images.githubusercontent.com/2335377/103403147-80c7a800-4b4f-11eb-90d3-90d032439cf3.png)
![screenshot_2020-12-31_10-13-23](https://user-images.githubusercontent.com/2335377/103403580-ed8f7200-4b50-11eb-9798-01fd4e283405.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-10 15:46:11 +00:00
Alexander Akulich c2f276cee1 Port CConfig API from the upstream (0.7.5)
The old (g_Config) API is kept to not break the stuff.

See commits:
    de5859b371
    78076761eb
2021-01-10 17:10:19 +03:00
Alexander Akulich 77b2b22dd2 Entity: Restrict the access to some (now) private members
Follow upstream commit e86a486688
2021-01-10 14:25:12 +03:00
Alexander Akulich b0db610a47 Entities: Get rid of direct m_ID access 2021-01-10 14:25:12 +03:00
Alexander Akulich 035a50dd0b Entities: Get rid of direct m_ProximityRadius access 2021-01-10 14:25:12 +03:00
Alexander Akulich b865306b56 Entity: Add API changes from the upstream
The upstream restricted access to the class member.
Keep the some protected API as public and some private API as protected
for now to avoid massive changes in a hundreds places (related to m_Pos).

See upstream commit e86a486688.
2021-01-10 14:25:12 +03:00
Alexander Akulich 476c2c60d7 Cleanup includes
See the upstream commit 24bda2faa0
2021-01-10 14:25:12 +03:00
Alexander Akulich f16937b361 gamecontext.h: Remove unused player.h include
See the upstream commit 24bda2faa0
2021-01-10 14:25:12 +03:00
Alexander Akulich 164cb9907a player.h: Remove unused character.h include
See the upstream commit 24bda2faa0
2021-01-10 14:25:12 +03:00
Alexander Akulich 8ee8351b68 Move WEAPON enum from character.h to player.h
See the upstream commit 24bda2faa0
2021-01-10 14:25:12 +03:00
Alexander Akulich dc5b9340d5 Extract allocation macros to alloc.h (mimic the upstream)
See the upstream commit 24bda2faa0
2021-01-10 14:25:12 +03:00
Alexander Akulich 80539245c8 GameContext: Extract SendMotd() and SendSettings() methods
Partial cherry-pick from upstream d8d259a166
2021-01-10 00:47:06 +03:00
def 52616a5f35 Fix unused variable warnings 2021-01-08 11:43:26 +01:00
Дядя Женя afb4ce5fc7 Revert horizontal sliders 2021-01-08 11:43:26 +01:00
Дядя Женя 7d576c41b4 H Slider 2021-01-08 11:43:26 +01:00
Дядя Женя eb796c6b5c More fixes 2021-01-08 11:43:26 +01:00
Дядя Женя 38e6878c48 Temp fixes for controls 2021-01-08 11:43:26 +01:00
Дядя Женя b8ba2b226a Sliders 2021-01-08 11:43:26 +01:00
Дядя Женя aefcbf812d Vertical sliders and lists 2021-01-08 11:43:24 +01:00
def 83b5601d62 Fix up/down keys in demo browser 2021-01-07 10:42:13 +01:00
hhh26459 ef2dd39cf5
typo in gamecontext.cpp
specators...
2021-01-06 18:16:30 +01:00
bors[bot] 4fb8798fd1
Merge #3474
3474: Fix scrollbar going out of bounce (fixes #3416) 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
- [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: def <dennis@felsin9.de>
2021-01-06 16:08:47 +00:00
def 143985a68e Indicate strength of hook in nameplates
only shown in debug mode (ctrl-shift-d)
2021-01-05 19:32:53 +01:00
bors[bot] f68e7853be
Merge #3478
3478: Fix server crash with too many items (fixes #3477) 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>
2021-01-05 18:20:24 +00:00
def 5c4fc9471a Fix server crash with too many items (fixes #3477) 2021-01-05 19:09:29 +01:00
def 088420459f Fix scrollbar going out of bounce (fixes #3416) 2021-01-04 19:16:38 +01:00
Tim Schumacher 56bfab6f1c Make dragging quads in the editor more sensitive to small mouse deltas
Closes #963
2021-01-02 13:49:16 +01:00
def 134b644d40 Improve grammar when locking team (fixes #3467) 2021-01-01 23:40:34 +01:00
def 992683c772 Dynamically size scoreboard title 2020-12-31 10:13:53 +01:00
bors[bot] 871fd94531
Merge #3448 #3449
3448: Same default map as in autoexec_server.cfg 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)


3449: Fix x of y servers r=Jupeyy a=def-

as reported by louis

<!-- 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-29 15:11:47 +00:00
bors[bot] b1531642cd
Merge #3458
3458: Respect possible particle size increase, of worst case rotation r=def- a=Jupeyy

Particle's achsis aligned bounding box can increase in size if the particle is rotating.
Even if the particle images are all "pretty" round and so it wouldn't matter for default particles,
its not correct and with a custom image it could break.
following #3441

Basically this:
![image](https://user-images.githubusercontent.com/6654924/103292756-be60ef80-49ee-11eb-8518-dd120d19ca17.png)


## 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-29 15:02:20 +00:00
Jupeyy bce1f45a2b Respect possible particle size increase, of worst case rotation 2020-12-29 15:58:05 +01:00
bors[bot] 1c750a73ff
Merge #3457
3457: Don't render fully transparent quads r=def- a=Jupeyy

@def- i mean u could test the fps diff, its quite huge
and if u really only have 50fps, others will only have 30fps xd

## 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-29 14:12:37 +00:00
Jupeyy 288a18fa95 Don't render fully transparent quads 2020-12-29 14:59:17 +01:00
def 78870a5fcd Version 15.2.5 2020-12-29 14:30:00 +01:00
bors[bot] 505656313c
Merge #3451
3451: Add New Year season theme by mind and use for 2 days r=Learath2 a=def-

Map reduces my FPS from 60 to 53, mind can't optimize it further.

I'd release this as 15.2.5 in 1-2 days ideally with no other new changes in.

![screenshot_2020-12-28_14-51-48](https://user-images.githubusercontent.com/2335377/103228624-83e54d00-4931-11eb-96fd-c408a353cda0.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
- [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: def <dennis@felsin9.de>
2020-12-29 13:12:13 +00:00
bors[bot] 262439b5bb
Merge #3455
3455: Readd round start tick to the calculation r=def- a=Jupeyy

fixes #3454

@bretonium would you be so kind and test this quickly, if everything looks fine again? :D

## 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-29 11:37:53 +00:00
Jupeyy 30d089b45c Readd round start tick to the calculation 2020-12-29 03:08:28 +01:00
Zwelf 72455ed32d Fix use of uninitialized variable during /load of old saves 2020-12-28 18:02:43 +01:00
def 59f1c2cbe6 Add New Year season theme by mind and use for 2 days
Map reduces my FPS from 60 to 45, mind can't optimize it further.

I'd release this as 15.2.5 in 1-2 days ideally with no other new changes in.
2020-12-28 17:45:04 +01:00
def 5a23bc1ab1 Fix veto 2020-12-28 12:01:35 +01:00
def ff2d2f6fc4 Fix x of y servers
as reported by louis
2020-12-28 08:56:55 +01:00
def 98aec6bffc Fewer repetitions 2020-12-27 10:57:50 +01:00
def 21886f2741 Fix spacing of cl_show_ids by using figure space (U+2007) 2020-12-27 01:19:36 +01:00
def 89e2371b9b Improve some chat settings 2020-12-27 01:14:34 +01:00
def 18ccb39384 Add (un)endless_hook command
As requested by Kicker
2020-12-26 23:09:38 +01:00
Jupeyy 2ea2d67b56 Only render visible particles 2020-12-23 14:55:49 +01:00
def e981d1b477 Fix veto vote, simplified logic
Also allow IPs to change their vote when multiple players are connected,
with 1 player it always worked.

Reported by Lenah on Discord
2020-12-23 10:51:51 +01:00
Jupeyy f21687a927 remove unused chains 2020-12-22 19:25:32 +01:00
bors[bot] 440337eb5c
Merge #3384 #3437
3384: Add w as default bind for dummy hammer 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)


3437: Update .clang-tidy file to 11 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:40:35 +00:00
def 93a0dc3eee Add more commonly used binds
from https://forum.ddnet.tw/viewtopic.php?t=2537
2020-12-22 12:36:01 +01:00
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