Commit graph

9900 commits

Author SHA1 Message Date
Jupeyy c0d6ce6d25 Add GLES support 2021-05-01 01:39:37 +02:00
bors[bot] 826a979b05
Merge #3778
3778: Fix composed binds involving F-keys r=def- a=Learath2

<!-- What is the motivation for the changes of this pull request -->
This fixes the issues for the meanwhile, but I think I want to rewrite this. We are kind of wasting memory and it behaves really oddly with multiple binds that match the chord progression. The bug was introduced in #2675

Fixed #3771 for now. @fokkonaut please check

## Checklist

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


Co-authored-by: Learath2 <learath2@gmail.com>
2021-04-30 15:53:46 +00:00
Freddie Wang 20dbd20769 Avoid spawn effect being clipped 2021-04-30 15:37:20 +08:00
bors[bot] db52fab0ad
Merge #3790
3790: Fix crash on test servers (fixes #3789) r=heinrich5991 a=def-

Thanks to Cøke for report

## 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-04-25 13:58:23 +00:00
bors[bot] c82970cf09
Merge #3788
3788: Allow unpredicted TuneZone settings for projectiles and lasers r=def- a=TsFreddie

Video demo: https://cdn.discordapp.com/attachments/293493549758939136/834971531464671252/2021-04-23_09-57-35.mp4
(notice the speed difference between player's shotgun bullets and the bouncing ones)

Video demo2: https://cdn.discordapp.com/attachments/293493549758939136/834990657147764736/demotopleftisnew.mp4
(Right: before, Left: after)

Since TuneZones are known (baked into the map), and entities' position received are known. We have a pretty good reason, if the server is believed to make use of it (GAMEINFOFLAG_PREDICT_DDRACE_TILES), to make entities always reference TuneZone settings, even if they are not predicted. 

Introduced a new worldconfig, `m_UseTuneZones`, that ignores antiping settings and apply TuneZone where applicable if the server is believed to support TuneZone.

When antiping is off, predictedworld is still inactive and only the rendering are affected, making them still **unpredicted** but now with correct intra-tick interpolations.


## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options (with different antiping settings and ping)
- [ ] 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 (client-side only)
- [ ] 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>
2021-04-25 09:38:12 +00:00
def 47b167c697 Fix crash on test servers (fixes #3789) 2021-04-23 16:44:19 +02:00
Freddie Wang b1051d2398 always use inferred tuning instead of current one 2021-04-23 13:53:54 +08:00
Freddie Wang f18a47ae30 set m_usetunezones before local char spawns 2021-04-23 13:17:41 +08:00
Freddie Wang d2faabe913 force tunezone 2021-04-23 11:01:38 +08:00
Freddie Wang bef5dee897 Fix dummy's airjump trigger 2021-04-22 20:58:30 +08:00
Freddie Wang 75d185cf18 fix airjump for antiping 2021-04-22 20:52:49 +08:00
Freddie Wang 00540deaef initialize CClient::m_HasPersistentData 2021-04-21 15:45:58 +08:00
Jupeyy e958e0f33c Fix serverbrowser crash 2021-04-20 22:13:59 +02:00
bors[bot] 6572f9e4fe
Merge #3779
3779: Copied Teeworld patches for the Haiku operating system r=def- a=panos

I initiated a port of ddnet and received a lot of help from the IRC in order to do so as seen in #2986. Unfortunately, my efforts went stale after one point. Fortunately, however, @threedeyes released a [set of patches for Teeworlds](2ea72967cd/games-action/teeworlds/patches/teeworlds-0.7.5.patchset). I decided to take down my repository with my own work and attempt to port Gerasim's work, which includes code for setting the directories that ddnet should use the same way one would do so in a Mac OS X-system in `src/base/system.c`, which was precisely the part where I got stuck in on my first attempt.

The changes have not been tested thoroughly yet and were the result of methodic copying and pasting.

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

## Checklist

- [ ] Tested the change ingame
- [ ] 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: Panagiotis Vasilopoulos <hello@alwayslivid.com>
2021-04-17 18:15:34 +00:00
Panagiotis Vasilopoulos 6c02076c05 Copied Teeworld patches for the Haiku operating system
Co-authored-by: Gerasim Troeglazov <3dEyes@gmail.com>
2021-04-17 20:10:56 +02:00
Learath2 4275dfed75 Fix composed binds. Close #3771 2021-04-17 17:37:39 +02:00
heinrich5991 8d6b62d8f8 Fix parsing an IPv6 address without port
The port in the NETADDR struct was left uninitialized.

Add some tests to ensure behavior.

CC #3774 #3775
2021-04-17 16:05:39 +02:00
ChillerDragon 67f4944630 Fix auto reconnect while in game 2021-04-15 12:44:24 +02:00
bors[bot] faaf47bbbf
Merge #3768
3768: Fixed hook being lost for specific teleports r=def- a=kyle-bradley

Removed the reset of external tees hooks on the specific teleport types. 

For issue #3766 

## 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: kyle-bradley <kyle@houseme.co.za>
Co-authored-by: Kyle Bradley <kyle@house.me>
2021-04-12 09:23:23 +00:00
Jupeyy 0012e72d34 Add console chain for assets, reload current asset on reload button click 2021-04-11 14:34:08 +02:00
Kyle Bradley b4a5956f72 Kept hook when needed 2021-04-10 17:29:20 +02:00
Jupeyy 7c992e296a Center more tees 2021-04-09 20:11:53 +02:00
Kyle Bradley cad6b82cd9 Removed unintended format changes 2021-04-08 16:39:17 +02:00
Kyle Bradley 13fae16817 Reset hook of all players in a team whenever swap occurs.
Standardized hook resets
2021-04-08 16:36:43 +02:00
bors[bot] d969e8a922
Merge #3763
3763: Make AddCommand usage in graphics class safer r=def- a=Jupeyy

so it doesnt add commands without rechecking if the command was actually added

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-04-07 22:34:35 +00:00
Jupeyy ec03261aa5 Refactor add command in graphics_threaded class 2021-04-07 19:03:07 +02:00
heinrich5991 c29874daf1 Fix team rank updating not working
With the MySQL C API, we need to distinguish between SQL statements that
return result sets and those that do not, UPDATE is one of those that
don't produce a result set.

Fixes #3725.
2021-04-07 17:19:53 +02:00
Emir Marincic 565cd76d31
Merge pull request #3753 from Jupeyy/pr_generalize_some_ui_stuff
Fix out of list clip clickable/hoverable items
2021-04-07 16:43:46 +02:00
Emir Marincic b66a9d6283
Merge pull request #3759 from def-/pr-swap
sv_swap_timeout <=
2021-04-07 16:37:40 +02:00
def 9a56b229ca sv_swap_timeout <= 2021-04-07 16:16:50 +02:00
Dennis Felsing 567e555b5a
Merge pull request #3755 from Jupeyy/pr_remove_windowed_fullscreen
Only remove windowed fullscreen and restore mouse focus loss behavior
2021-04-03 09:45:22 +02:00
Dennis Felsing 805966537d
Merge pull request #3754 from def-/pr-choseong-filler
Detect hangul choseong filler character as whitespace (fixes #3752)
2021-04-02 23:37:52 +02:00
Jupeyy 8eac8b0afc Only remove windowed fullscreen and restore mouse focus loss behavior 2021-04-02 22:45:49 +02:00
def 1d636a4b43 Detect hangul choseong filler character as whitespace (fixes #3752) 2021-04-01 18:32:04 +02:00
Jupeyy 75cdd8042c Fix out of list clip clickable/hoverable items 2021-04-01 16:48:38 +02:00
Jupeyy a293470e89 Different screenshot console color(by Ravie) 2021-03-30 11:39:38 +02:00
bors[bot] 73b62cbb1e
Merge #3577
3577: Differenciate better between window modes r=def- a=Jupeyy

Yeah no idea, without dropdown it looks weird xd, so more of an idea:

hopefully fixes #3571 by making it clear what borderless is intended to be(not fullscreen)

![screenshot_2021-01-31_21-55-43](https://user-images.githubusercontent.com/6654924/106397735-213f0f80-640f-11eb-8f0f-3394834209f0.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>
2021-03-30 08:10:52 +00:00
Jupeyy f0160b5313 Differenciate better between window modes 2021-03-30 10:07:41 +02:00
def 50d08036e2 Lower save/swap delay 2021-03-28 11:27:51 +02:00
Jupeyy c23f1e51be Print GPU info into console 2021-03-26 11:38:03 +01:00
def 8c9e7c1231 Version 15.4 2021-03-25 07:58:27 +01:00
bors[bot] e55f7fbc0a
Merge #3733
3733: Please wait %d seconds 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>
2021-03-25 05:59:10 +00:00
def afe16b7e53 Please wait %d seconds 2021-03-24 19:16:00 +01:00
bors[bot] 76b6a07afa
Merge #3729
3729: Clear up documentation of cl_dummy_control 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>
2021-03-24 07:49:00 +00:00
def 9a0243821a Fix scrolling in controls settings with ui_scale < 100 (fixes #3727) 2021-03-23 23:16:28 +01:00
def 5a6da005a0 Clear up documentation of cl_dummy_control 2021-03-23 14:54:47 +01:00
bors[bot] 02feecf41e
Merge #3707 #3709
3707: Set search field active when opening vote menu ingame r=Jupeyy a=def-

As suggested by RafaelFF

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


3709: Switch back to using a stable sort r=Jupeyy a=def-

so that for example demos stay sorted the same way when sorting by demo
markers and removing a demo, otherwise they get totally reordered every
time.

as reported by Shyzo

<!-- 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-03-23 13:09:43 +00:00
bors[bot] 23a6c6e206
Merge #3718
3718: No negative count in server browser r=Jupeyy a=def-

With "Count playery only" and "Filter connecting players" both activated

<!-- 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-03-23 12:59:15 +00:00
def 03c2caaa1a Different comparators for skins in UI (no case) and regular skins (with case)
Broke x_ skins, caused by https://github.com/ddnet/ddnet/pull/3214
2021-03-23 13:39:54 +01:00
bors[bot] 027e1d8b14
Merge #3654
3654: Added swap functionality to server client: r=def- a=houseme-kyle

Added a new chat command /swap based on the discussion in the associated issue: 
https://github.com/ddnet/ddnet/issues/1103

Swaps the character's position with another tee using the existing Save/Load functionality. 

Restrictions:
- Has to be in a team similar to the save/load feature

Possible additions:
- Time penalty

**Disclaimer**
This is my first contribution to the project. I tried my best to apply the correct coding standards and understand the purpose of each class/method. Please do provide feedback if used incorrectly. 

![Initiate Swap](https://user-images.githubusercontent.com/25198124/109426245-46ff0a80-79f5-11eb-935a-2b228a72695e.JPG)
![Pre-Acceptance](https://user-images.githubusercontent.com/25198124/109426249-4bc3be80-79f5-11eb-986a-eea9c6b84334.JPG)
![Post-Swap](https://user-images.githubusercontent.com/25198124/109426251-4e261880-79f5-11eb-80a3-772e23a23013.JPG)

## 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: Kyle Bradley <kyle@house.me>
Co-authored-by: houseme-kyle <kyle@houseme.co.za>
Co-authored-by: def <dennis@felsin9.de>
2021-03-21 09:04:21 +00:00
houseme-kyle 6ecd326b4c
Scenario of (invalid) or (connection) names breaking /swap
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-03-21 10:58:50 +02:00
Kyle Bradley 35991ea973 Fixed names 2021-03-20 18:33:34 +02:00
bors[bot] daef3d6c98
Merge #3694
3694: Fix automapper crash (fixes #3675) r=Learath2 a=def-

Thanks to bojidar-bg for the way to fix, verified locally

<!-- 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-03-20 16:31:58 +00:00
Kyle Bradley 23c36e637f Reverted test config 2021-03-20 18:09:43 +02:00
Kyle Bradley decaeb8934 PR feedback:
- Changed names of variables
- Changed config descriptions
- Fix for perma timeout
2021-03-20 18:08:54 +02:00
Learath2 a3dd47d7e8 Actually check all tees. Fixes #3697 2021-03-20 15:45:11 +01:00
def ae34e2df6f Banned for life -> Banned
Since we mostly use them for limited global bans
2021-03-19 15:02:28 +01:00
def ac6ae40806 No negative count in server browser
With "Count playery only" and "Filter connecting players" both activated
2021-03-19 11:46:02 +01:00
bors[bot] b35e8f880c
Merge #3715
3715: Add dummy_reset and remove +resetdummy r=def- a=ardadem

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

It's works now for both on console/cfg and as bind. Also tried to fix annoying dummy hammer issue when reset dummy

## 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: Arda Demir <ddmirarda@gmail.com>
2021-03-19 08:18:01 +00:00
Patiga 55117fcfaa Externalize only images with vanilla names 2021-03-19 01:06:37 +01:00
Kyle Bradley 6c9cbee41c Merge branch 'feature-swap' of https://github.com/houseme-kyle/ddnet into feature-swap 2021-03-17 21:23:52 +02:00
Kyle Bradley a68b28fc14 Further tests and edge cases dealt with 2021-03-17 21:23:41 +02:00
def 61b3a7c554 Fix clang-format
By using clang-format-10 from AUR clang-format-static package
2021-03-17 20:19:35 +01:00
Kyle Bradley 2d4834ffcf Edge case for player state when changing team 2021-03-17 20:51:52 +02:00
houseme-kyle e11345807f
Merge pull request #5 from ddnet/master
Merge
2021-03-17 19:07:18 +02:00
Arda Demir 2aefdf2a5e Add dummy_reset and remove +resetdummy 2021-03-17 18:09:39 +03:00
Kyle Bradley 1a35e3be12 Removed comments and added variable reset 2021-03-17 00:48:24 +02:00
Kyle Bradley 73aea2426b Style fixes 2021-03-17 00:33:48 +02:00
Kyle Bradley 4afe62a596 Updated to include penalty, cooldown and timeout 2021-03-17 00:31:16 +02:00
def a4bb2f8764 Switch back to using a stable sort
so that for example demos stay sorted the same way when sorting by demo
markers and removing a demo, otherwise they get totally reordered every
time.

as reported by Shyzo
2021-03-15 23:36:25 +01:00
Kyle Bradley 0b6da7ece1 Applied community feedback.
- Always show global /top5
2021-03-15 15:38:53 +02:00
def 9f58b0f608 Set search field active when opening vote menu ingame
As suggested by RafaelFF
2021-03-14 19:57:23 +01:00
Jupeyy 331ee9aa56 Center tees in more places 2021-03-12 21:23:29 +01:00
def 5350f98e8d Fix automapper crash (fixes #3675)
Thanks to bojidar-bg for the way to fix, verified locally
2021-03-11 20:31:45 +01:00
Kyle Bradley 6ed2b2277d Added break on primary message while still processing subsequent 2021-03-11 09:20:26 +02:00
heinrich5991 f694dd68e9 Don't bypass the anti-spam system
Quick-fix for
https://github.com/ddnet/ddnet/pull/3669#issuecomment-794805243.

Probably breaks that feature a bit.
2021-03-10 21:50:56 +01:00
bors[bot] 46864c0e08
Merge #3683 #3684
3683: More colors from components in console r=heinrich5991 a=Jupeyy


![screenshot_2021-03-08_01-18-23](https://user-images.githubusercontent.com/6654924/110260454-9d97b600-7fac-11eb-9437-e5b31c9146ab.png)

dunno how to trigger that echo chat, but rest looks fine i think

## Checklist

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


3684: Increase max ban duration from 1 month to 1 year r=heinrich5991 a=def-

to show ban message more accurately when player gets globally banned

<!-- 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>
Co-authored-by: def <dennis@felsin9.de>
2021-03-09 21:41:23 +00:00
bors[bot] 01dd157995
Merge #3687
3687: Free Client.m_PersistentData r=heinrich5991 a=def-

Caused by https://github.com/ddnet/ddnet/pull/3605

Found by ASAN:
```
==11628==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 64 object(s) allocated from:
    #0 0x4f36b3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f36b3)
    #1 0x5536a7 in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2362:31
    #2 0x562408 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3594:21
    #3 0x7f6ee56d209a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
```
<!-- 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-03-09 21:30:49 +00:00
Kyle Bradley c79f874c54 Removd unusual characters and added a base dash to mirror previous implementation 2021-03-09 18:41:48 +02:00
Kyle Bradley 0a183673c5 Hide local when there are duplicates 2021-03-09 18:27:25 +02:00
def 5261764fb0 Free Client.m_PersistentData
Caused by https://github.com/ddnet/ddnet/pull/3605

Found by ASAN:

==11628==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 64 object(s) allocated from:
    #0 0x4f36b3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f36b3)
    #1 0x5536a7 in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2362:31
    #2 0x562408 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3594:21
    #3 0x7f6ee56d209a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
2021-03-09 11:44:20 +01:00
bors[bot] e2cb24b7d9
Merge #3669
3669: Local ranking info viewable in-game r=def- a=houseme-kyle

The feature is based on the issue below:
https://github.com/ddnet/ddnet/issues/3655

The main concern was the impact it would have if we had to double our ranking/point commands to support it. I took the feedback into account and combined the info into one command. The PR is in draft as I don't want to implement it for the remaining commands before getting thoughts on the approach taken.

**Feature**
Display local stats alongside global while using the same commands

**Implementation**
- /rank, /top5 etc to display their local position alongside global. 
- Top 5 changed to top 3 due to space limitations
- Message limit increased by 1
- Don't show "requested by" when the request was made by the same individual

**Reason for feature**
- Foster growth in the smaller communities as they compete amongst each other in their own leaderboard
- The names become more relevant to all communities as they can better relate to the names displayed 

**TODO**
~- Tested with production sqlite data but not MySQL storage~
~- Expand concept to other relevant ranking commands~

(Example of NovaShock who is the top player in South Africa)
![image](https://user-images.githubusercontent.com/25198124/109824890-f03a4080-7c41-11eb-84dc-ad319cb98f1e.png)
![image](https://user-images.githubusercontent.com/25198124/109824910-f6302180-7c41-11eb-9013-f3254c08f068.png)

## Checklist

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


Co-authored-by: houseme-kyle <kyle@houseme.co.za>
Co-authored-by: Kyle Bradley <kyle@house.me>
Co-authored-by: = <=>
2021-03-08 22:51:05 +00:00
Jupeyy af2e19c4e7 Add color for non chat(binds, ghost, client, demo) 2021-03-08 18:39:25 +01:00
def 271ab5f9de Increase max ban duration from 1 month to 1 year
to show ban message more accurately when player gets globally banned
2021-03-08 18:15:00 +01:00
Kyle Bradley b1e200df88 Formatted player.cpp using ClangFormat 2021-03-08 15:56:20 +02:00
Kyle Bradley 8957005f48 Kept rank spam protection 2021-03-08 15:33:26 +02:00
Kyle Bradley ecf70319fc Fixed formatting issues 2021-03-08 14:53:35 +02:00
Jupeyy 853e00ed15 More colors from chat in console 2021-03-08 01:20:28 +01:00
bors[bot] 75e9b20e45
Merge #3680
3680: Fix legacy serverinfo with reserved slots and num_players > 15 (fixes #3678) 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-03-07 23:49:17 +00:00
= 380664aae4 PR feedback 2021-03-08 00:41:48 +02:00
= f6ddfe830d Added PR feedback:
- Server name included in output
- Better output for unranked local
2021-03-08 00:39:11 +02:00
def 9ea88f1197 Remove 45° aim too 2021-03-07 23:12:57 +01:00
def fb8f689460 Remove deepfly binds (fixes #3667)
Anyone have a better idea?
2021-03-07 23:11:53 +01:00
def b1ed91b835 Fix legacy serverinfo with reserved slots and num_players > 15 (fixes #3678) 2021-03-07 23:11:09 +01:00
heinrich5991 d6097cb64c Automatically use HTTPS compression if the server supports it
Our typical HTTPS answer is reduced by 85% by this. Our JSON seems to
compress really well.
2021-03-07 22:41:34 +01:00
def e5bcac3ca2 std::max -> maximum 2021-03-07 11:14:37 +01:00
def 9e009e280d Support localizing discord link
link to http://chat.teeworlds.cn/ for Simplified Chinese

Maintained by TsFreddie, KaiHei is a Chinese Discord clone
2021-03-05 17:29:18 +01:00
Kyle Bradley f950f27424 Formatting fixes 2021-03-03 16:50:43 +02:00
Kyle Bradley 50966f04e1 Updates config variables 2021-03-03 16:49:11 +02:00
Kyle Bradley ef1b30661e Add local rank and top 5 2021-03-03 15:23:18 +02:00
Kyle Bradley d276005697 Fixed missing variable 2021-03-02 21:42:53 +02:00
Kyle Bradley 2c11fedfb0 - Added name to message
- Fixed format issue
2021-03-02 16:35:29 +02:00
bors[bot] f78bbb5864
Merge #3662
3662: Don't allocate the windows console default r=def- a=Jupeyy

fixes #3661

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-03-02 08:03:25 +00:00
bors[bot] 8e4e4940d2
Merge #3664
3664: Add initial delay to talking in chat r=heinrich5991 a=Learath2

<!-- What is the motivation for the changes of this pull request -->
This adds a delay before one can chat. It should help mods in situations where people are spamming chat
## 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: Learath2 <learath2@gmail.com>
2021-03-01 20:10:14 +00:00
Learath2 f1af68dff9 Add initial delay to talking in chat 2021-03-01 20:37:07 +01:00
bors[bot] 7be0f30037
Merge #3665
3665: Add a way to block people from chatting on vpns r=def- a=Learath2

<!-- What is the motivation for the changes of this pull request -->
Another tool that should help moderators
## 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: Learath2 <learath2@gmail.com>
2021-03-01 19:27:43 +00:00
Learath2 5f50d1dc57 Add a way to block people from chatting on vpns 2021-03-01 19:54:59 +01:00
Jupeyy 7e00407659 Fix chat repeated messages 2021-03-01 18:35:06 +01:00
Jupeyy c20b9801d4 Don't allocate the windows console default 2021-03-01 15:25:45 +01:00
bors[bot] a6aa74f520
Merge #3658
3658: Fix /mapinfo displaying a time when not having finished r=def- a=heinrich5991

The C API doesn't return 0.0f for NULL values, check for them
explicitly.

Fixes #3653.

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

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-02-28 23:53:24 +00:00
heinrich5991 9f41b5d910 Fix /mapinfo displaying a time when not having finished
The C API doesn't return 0.0f for NULL values, check for them
explicitly.

Fixes #3653.
2021-03-01 00:37:38 +01:00
Kyle Bradley 44bd43f38b Fixed for formatting check 2021-03-01 00:47:22 +02:00
Kyle Bradley 894885eef0 Removed space 2021-03-01 00:40:59 +02:00
Kyle Bradley cf7fb72dbf - Added timeout penalty
- Applied PR feedback
2021-03-01 00:37:49 +02:00
def c92f818a3c Don't leak memory on Windows in logger
Thanks to 拓真 on Discord for report
2021-02-28 23:22:18 +01:00
Vlad a780dd691d Memory leak in system.c
> Here I get a memory leak
> https://github.com/ddnet/ddnet/blob/master/src/base/system.c#L167

Thanks to @kurosio
2021-02-28 23:22:15 +01:00
Kyle Bradley 94dbae981f Added swap functionality to server client:
- New chat command
- Swaps character's position with other tee using existing Save/Load methods.
2021-02-28 18:35:35 +02:00
heinrich5991 dd964316cb Fix duplicate teamranks getting inserted
There was a logic error that caused the loop to never execute.
2021-02-27 22:35:44 +01:00
heinrich5991 d7f0de3f29 Use ExecuteUpdate instead of Step for INSERT INTO
Forgot an instance of this in mysql.cpp in the previous commit.
2021-02-27 22:34:44 +01:00
heinrich5991 bdcabe8a2d Fix ": " being included in "*** : abc" server messages 2021-02-27 16:21:42 +01:00
heinrich5991 61b46746d7 Fix /times query by reordering fields
Pull request #3630 started showing the countries where ranks are from,
but created a mismatch between the two queries, one selected

Time, Ago, Stamp

the other

Time, Ago, Stamp, Name, Server

but both tried accessing the server. Add Server to the former query and
swap Name and Server in the second query to fix the problem.

Fixes #3643.
2021-02-26 23:44:26 +01:00
Jupeyy 33b75bde9a Make statboard work with up to 32 players 2021-02-26 12:46:32 +01:00
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 d37b62e91d Get rid of unused IN_USE status for db connections 2021-02-24 17:39:45 +01:00
heinrich5991 d7019a244e Get rid of the MySQL C++ connector as a dependency
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.
2021-02-24 17:34:08 +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
bors[bot] 908646eea5
Merge #3605
3605: Adopt some more refactoring from upstream r=heinrich5991 a=Kaffeine

- Backport 'Make spectators stay specs on map changed'
- Adopt upstream refactoring: Mark several functions as 'const'
- CGameContext::SendVoteStatus: Hide the trick for 64 clients
- GameController: Add OnPlayerConnect() like in the upstream
- Move DDRace-specific player initialization code to the Controller. Dependencies:
  - CGameControllerDDRace: Add Score() getter
  - Get rid of gamemode.h with confusing/conflicting definitions (re-defined `GAME_NAME`)
- Replace remaining int64_t by int64 for the sake of consistency

I checked the changes in-game (I ran a server and tested with two players)

## 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: Alexander Akulich <akulichalexander@gmail.com>
2021-02-23 18:22:28 +00: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
def 7f9110b67c Remove fifo file on shutdown 2021-02-21 17:31:25 +01: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
Jupeyy 50e6b3c4d8 Update missing file from dilate 2021-02-13 14:04:42 +01:00
def dd3062a61b Use same warning text for both warnings
so we only have to translate it once
2021-02-13 11:30: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] e6846827cf
Merge #3614
3614: Mac OS X -> macOS r=heinrich5991 a=def-

Changing the filenames of the releases will be a bit more annoying, so
not sure we want to do that

> Apple shortened the name to "OS X" in 2012 and then changed it to "macOS" in 2016

<!-- 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-12 13:49:29 +00:00
def e985632fae OSX -> macOS
Changing the filenames of the releases will be a bit more annoying, so
not sure we want to do that
2021-02-12 13:41:41 +01:00
bors[bot] d37baf9f1a
Merge #3611
3611: Don't try to update .so files on Windows r=Jupeyy a=def-

```
[2021-02-12 10:33:01][storage]: failed to rename: Z:\DDNet-15.2.5-win64/discord_game_sdk.dll -> Z:\DDNet-15.2.5-win64/discord_game_sdk.dll.old
[2021-02-12 10:33:01][storage]: failed to rename: Z:\DDNet-15.2.5-win64/discord_game_sdk.so -> Z:\DDNet-15.2.5-win64/discord_game_sdk.so.old
[2021-02-12 10:33:01][storage]: failed to rename: Z:\DDNet-15.2.5-win64/update/discord_game_sdk.so -> Z:\DDNet-15.2.5-win64/discord_game_sdk.so
[2021-02-12 10:33:01][updater]: replacing DDNet.exe
[2021-02-12 10:33:01][storage]: failed to remove: Z:\DDNet-15.2.5-win64/DDNet.old
[2021-02-12 10:33:01][updater]: replacing DDNet-Server.exe
[2021-02-12 10:33:01][storage]: failed to remove: Z:\DDNet-15.2.5-win64/DDNet-Server.old
```

## 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-12 09:37:43 +00:00
def 3b83a5d9bd Don't try to update .so files on Windows 2021-02-12 10:21:23 +01: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
bors[bot] 1a8eae72bb
Merge #3600
3600: Lower dilate threshold r=def- a=Jupeyy

Mh hoped the diff is smaller, dunno if all diffs are caused by the redilate or if my zopfli version changed

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-02-11 09:57:24 +00: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
Jupeyy 15129ad721 lower alpha threshold 2021-02-03 20:05:02 +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 211b1d9155 Allow to dynamically load the Discord SDK on Linux
Set `-DDISCORD_DYNAMIC=ON` on the CMake command line to enable this
feature.

Fixes #3580.
2021-02-01 12:20:11 +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
def b3c93b091a Use map download url from info2.ddnet.tw (fixes #3546)
which info2.ddnet.tw provides using a geolite db to provide a better
server for players in China
2021-01-31 11:15:16 +01:00
heinrich5991 c2b28f124b Put the Discord stuff into its own file 2021-01-31 10:17:21 +01:00
Edgar 96db08b760 add discord rich presence 2021-01-31 10:17:21 +01: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
bors[bot] f02c1baf53
Merge #3558
3558: sv_reserved_slots: allow up to 64 r=heinrich5991 a=def-


## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-28 14:29:03 +00:00
def 4bd3525b38 sv_reserved_slots: allow up to 64 2021-01-28 13:57:53 +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 281492c0fa Fix memory leak in Thread.Lock unit test 2021-01-22 19:18:25 +01:00
def a99f4f15b6 Add str_utf8_truncate test for size 0 2021-01-22 19:18:11 +01:00
def 9196a9a3d4 Fix crash on namechange (fixes #3444) 2021-01-22 19:17:21 +01:00
bors[bot] 989d26bfec
Merge #3527
3527: Prevent OpenSSL SIGPIPE (fixes #3513) r=heinrich5991 a=def-

by making libcurl handle the signal itself

See https://curl.se/libcurl/c/CURLOPT_NOSIGNAL.html

<!-- 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-22 17:41:04 +00: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
def 199da2410d Prevent OpenSSL SIGPIPE (fixes #3513)
by ignoring the signal ourselves

See https://curl.se/libcurl/c/CURLOPT_NOSIGNAL.html
2021-01-22 18:28:15 +01: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] 0b2c457c37
Merge #3526
3526: Run server in background on Windows (fixes #3525) r=Learath2 a=def-

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow

> Displays a window in its most recent size and position. This value is
> similar to SW_SHOWNORMAL, except that the window is not activated.

<!-- 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
- [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: def <dennis@felsin9.de>
2021-01-21 11:05:35 +00: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
bors[bot] 29fbaddce4
Merge #3520
3520: Fix median calculation r=Learath2 a=def-

as reported by I.K.U 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-21 10:05:32 +00:00
def b3062d04a0 Fix median calculation
as reported by I.K.U on Discord
2021-01-21 11:02:01 +01:00
def 8edb561f4e Run server in background on Windows (fixes #3525)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow

> Displays the window as a minimized window. This value is similar to
> SW_SHOWMINIMIZED, except the window is not activated.
2021-01-21 10:01:11 +01:00
Zwelf cf80ace45a Remove locking from database interface 2021-01-20 21:55:22 +01:00
Zwelf 4375bc1ac6 Don't depend on table locking for savegame load/save synchronization 2021-01-20 21:42:44 +01:00
Zwelf bad2d71d77 Add ExecuteUpdate to database interface reporting affected rows 2021-01-20 21:42:25 +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] cdb5a5c280
Merge #3519
3519: Send logout packet after using timeout protection r=def- a=heinrich5991

Only send the logout packet if you're actually logged in.

Fixes #3490. Supersedes #3495.

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

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-01-17 18:00:00 +00:00
heinrich5991 91b1f62fa0 Send logout packet after using timeout protection
Only send the logout packet if you're actually logged in.

Fixes #3490. Supersedes #3495.
2021-01-17 17:44:48 +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
bors[bot] 2363efbed5
Merge #3514
3514: Also display DDNet version for 0.7 clients r=def- a=heinrich5991

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

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-01-17 14:14:07 +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