Commit graph

3847 commits

Author SHA1 Message Date
Jupeyy 3b333ea063 Lower worst/best case frame time calculations 2021-10-08 00:23:24 +02:00
Jupeyy e4cb348db2 Add new mouse state 2021-10-07 16:48:25 +02:00
bors[bot] 73de789e90
Merge #4188
4188: Add option to highlight self in kill messages r=heinrich5991 a=Azorlogh

Motivation: #4186

List of changes:
- Add options clKillMessageHighlightSelf, clKillMessageNormalColor, clKillMessageHighlightColor
- Rework HUD panel in settings

![hud_0](https://user-images.githubusercontent.com/17968319/135732345-b8152c74-f754-4722-9b60-46a1ba7cc9c8.png)

![hud_1](https://user-images.githubusercontent.com/17968319/135732346-814a918b-1828-4860-a3c7-372869b79575.png)

![in_game](https://user-images.githubusercontent.com/17968319/135732347-6e9cf148-29b8-4fc4-8dba-647e049f961a.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
- [x] Written a unit test if it works standalone, system.c especially (not standalone)
- [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: Azorlogh <bott.alix@gmail.com>
2021-10-06 15:27:25 +00:00
bors[bot] 43e69905bc
Merge #4157
4157: invalidate texture when unloading a texture. r=heinrich5991 a=ChillerDragon

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

(cherry picked from commit 23a1b80f60)

<!-- 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: oy <Tom_Adams@web.de>
Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-10-06 15:16:00 +00:00
bors[bot] 121c6d16f6
Merge #3879 #4079
3879: Use SDL_FlashWindow to request user's attention r=heinrich5991 a=Jupeyy

We should soon update to SDL 2.0.16 for our bundled libs, but don't merge before this happened.

This drops the remaining X11 dependency.

We should then also use GLEW with EGL for official builds for easy native wayland support(which i discussed before already)

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


4079: Make teehistorian easier to reproduce r=heinrich5991 a=Zwelf

I've tested it ingame, but still have to make sure, that the ordering of the teehistorian messages are right. I would be really happy if we could land this before changing team joining logic (#4006 or /practice logic, but there isn't a pr for this yet), but I would like to make sure that the change is correct.

## Checklist

- [x] Tested the change ingame
- [ ] 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: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: Zwelf <zwelf@strct.cc>
2021-10-06 14:52:39 +00:00
bors[bot] 353f265e77
Merge #4197 #4198
4197: Properly export antibot DLL symbols on Windows, this time for real r=Jupeyy a=heinrich5991

0750ae0fbd was missing the function
prototypes that used `ANTIBOTAPI`.

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


4198: Always support resizing, remove gfx_resizable 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: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2021-10-06 14:41:24 +00:00
Jupeyy ce9a962030 Rename VERSION to VERSION.txt 2021-10-06 16:13:36 +02:00
def ca95a135ce Always support resizing, remove gfx_resizable 2021-10-05 19:32:09 +02:00
Azorlogh 40ab93c592 capitalize Color & remove superfluous toggle 2021-10-05 18:48:08 +02:00
bors[bot] 26d54f8c8c
Merge #4171
4171: Add basic selection support for ui ex edit boxes r=def- a=Jupeyy

This changes the hotkey for "exclude" to CTRL + SHIFT + X, because else it collides with Cutting strings out of a selection

This is defs not perfect, it basically ignores keyboard keys that could also alter selection (e.g. shift + right) but i didnt want to break the IME stuff, bcs i don't understand it

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-10-04 18:07:09 +00:00
Jupeyy fd68cc3a05 Add basic selection support for ui ex edit boxes 2021-10-04 19:58:25 +02:00
Jupeyy 3c1e0fe663 Use SDL_FlashWindow to request user's attention 2021-10-04 19:21:36 +02:00
def e8bc6fcb47 Add notes for settings only available
with specific compile options or on specific builds

Also applies to https://ddnet.tw/settingscommands/
2021-10-03 12:23:31 +02:00
Azorlogh 96f25d32cb fix default colors 2021-10-02 23:25:36 +02:00
Azorlogh 07b85a286b highlight self in kill messages 2021-10-02 23:15:59 +02:00
heinrich5991 5dae776696 Set the maximum connection trials to 5 per 20s
It was previously 4 per 20s which can cause problems with the default
reconnect delay of 5s when the server is full.
2021-10-02 18:27:26 +02:00
bors[bot] f820702522
Merge #4180
4180: Use constructor consistently for colors r=def- a=Robyt3

This changes all color instantiations to consistently use the constructor instead of an initializer list.

## Checklist

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


Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
2021-09-25 08:15:42 +00:00
Robert Müller 6ee5dd24a5 use constructor consistently for colors 2021-09-25 09:50:11 +02:00
bors[bot] 3b45d8a28f
Merge #4179
4179: Fix text upload call, make invalid calls visible r=def- a=Jupeyy



## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-09-25 07:48:06 +00:00
Jupeyy 451a087bde Fix text upload call, make invalid calls visible 2021-09-25 01:58:28 +02:00
trml 8448f9ef04 Predict switch projectiles and pickups, make blinking effect client-side 2021-09-19 14:14:00 +02:00
Chairn 635485de90 Fixed typo in variable name 2021-09-18 20:41:01 +02:00
bors[bot] 79dbbe2ee2
Merge #4151
4151: Copy ingame console like in ATH r=def- a=BloodWod-513

The idea is taken from the implementation of this in ATH client
<!-- 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: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: BloodWod-513 <dayn_2013@mail.ru>
2021-09-15 21:22:04 +00:00
BloodWod-513 4317c43c6b Console copy string 2021-09-15 19:47:01 +02:00
Jupeyy 08881e8a6f Refactor text renderer 2021-09-15 19:46:58 +02:00
Zwelf e9dec007b2 Address review to make code more consistent 2021-09-15 17:31:35 +02:00
heinrich5991 bebc417e99 Ensure a snap is evaluated before the world is rendered the first time 2021-09-15 16:58:33 +02:00
ChillerDragon de4e1ea644 Merge UnloadTexture with UnloadTextureNew 2021-09-15 13:19:54 +02:00
Zwelf eacd314701 Move team and practice mode recording to the beginning of the tick 2021-09-14 22:33:09 +02:00
Zwelf 81f4263428 Record team practice mode making replay easier 2021-09-14 22:10:43 +02:00
Alexander Akulich 895a0b3451 CServer::ProcessClientPacket(): Adjust the debug message buffer size
We allocated 512 bytes to dump up to 32 data bytes in a hex form.
According to the str_hex() implementation, we need three bytes per the
source data byte (a byte is represented as a two-digit hexadecimal number
with appended space char) plus the null-termination.

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

The stack-allocated buffer size reduced from 512 to 97 bytes.
2021-09-14 20:59:29 +03:00
Alexander Akulich 92abe8d545 Use str_hex() for CServer::ProcessClientPacket() debug output 2021-09-14 20:49:53 +03:00
Jupeyy 7f5ca0ffe1 Small graphic refactoring 2021-09-14 00:21:17 +02:00
bors[bot] 1d9557de20
Merge #3783
3783: Further fixes for Haiku r=def- a=panos

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

I think that I'm very close.

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

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

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

fixes #4156

## Checklist

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


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

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

Tested official ddnet maps over http and other maps.

## Checklist

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


Co-authored-by: Robert Müller <robert.mueller@student.uni-siegen.de>
Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-09-13 12:00:29 +00:00
ChillerDragon 1e7dea54d6 Merge branch 'master' into pr_rm_incomplete_download 2021-09-13 13:57:09 +02:00
oy 9e17281573 invalidate texture when unloading a texture.
Closes https://github.com/teeworlds/teeworlds/issues/1450

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

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-09-13 11:16:53 +00:00
heinrich5991 deb4917563 Revert "Let's not crash the client and server on dbg_assert"
This reverts commit a6e144ea72.
2021-09-13 12:57:53 +02:00
bors[bot] 89e3d694b9
Merge #4152
4152: Make use of IO_MAX_PATH_LENGTH r=heinrich5991 a=ChillerDragon

Inspired by
0a7d0fee7c

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

## Checklist

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


Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-09-13 10:31:26 +00:00
ChillerDragon 3eb3dcd48b Make use of IO_MAX_PATH_LENGTH
Inspired by
0a7d0fee7c
2021-09-13 12:14:50 +02:00
ChillerDragon 1c8165adaa Cleaner nulled gfx
Remove not needed method definitions.
Feed the graphics engine with some fake data.

This removes valgrind warnings.

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

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

## Checklist

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


Co-authored-by: HamidReza <57710259+HamidReza585@users.noreply.github.com>
2021-09-04 11:19:52 +00:00
HamidReza 00e2206cc5 Fix cl_show_direction 2 wrong maximum 2021-09-04 15:37:37 +04:30
HamidReza 8dbebab524 Remove cl_show_local_direction and add cl_show_direction 2 2021-08-31 03:04:44 +04:30
HamidReza 8bc5ec9bcc Add cl_show_local_direction
cl_show_local_direction allows you to see your own key presses during the game.
2021-08-30 21:26:23 +04:30
bors[bot] 121173b5d6
Merge #4111
4111: Fix filesystem/IO with unicode filenames on windows r=def- a=Robyt3

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

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

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

## Checklist

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


Co-authored-by: Robert Müller <robert.mueller@uni-siegen.de>
2021-08-30 09:02:24 +00:00
BloodWod b9d660dd95 Add colors for dbg_msg console 2021-08-28 04:42:42 +05:00
bors[bot] a8c36540e5
Merge #4117
4117: Make fullscreen changes better (especially under windows) r=def- a=Jupeyy

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-08-24 16:29:55 +00:00
Jupeyy 7234c04c15 Make fullscreen changes better (especially under windows) 2021-08-24 18:23:31 +02:00
bors[bot] 43c3391124
Merge #3967
3967: Add state if no master was found r=Learath2 a=Jupeyy

fixes #3951

by adding a state if no master was found

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-08-24 12:31:55 +00:00
Jupeyy bde7e854ac Update GLEW 2021-08-24 14:05:35 +02:00
Jupeyy b216b6744a Add Android build scripts 2021-08-24 12:18:20 +02:00
bors[bot] acb87171a9
Merge #4107
4107: Upgrade resolution list r=def- a=Jupeyy

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

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

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


## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-08-24 07:52:08 +00:00
Robert Müller 4a375242c5 fix fs_listdir and fs_listdir_fileinfo with unicode on windows 2021-08-23 12:49:15 +02:00
Jupeyy c7580b374c Remove Windows XP code 2021-08-23 12:05:01 +02:00
Jupeyy ac56075b1b Upgrade resolution list 2021-08-22 15:00:12 +02:00
bors[bot] da59deea84
Merge #4105
4105: fix console name of GfxDesktopWidth r=def- a=Jupeyy

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-08-21 20:31:20 +00:00
Jupeyy 36ad87f70a fix console name of GfxDesktopWidth 2021-08-21 21:38:30 +02:00
Väinö Mäkelä d94f52b447 Fix fullscreen resolution setting on SDL 2.0.16
SDL_SetWindowSize's documentation tells that SDL_SetWindowDisplayMode
should be used to set the sizes of fullscreen windows. SDL commit
72d812852023450b7c3850b8e87b63575df041ee changed SDL_SetWindowSize's
behavior so that it can no longer be used to set the screen resolution
with windows that are created in fullscreen mode.
SDL_SetWindowDisplaymode is used instead when the window is fullscreen.
2021-08-21 21:33:40 +03:00
bors[bot] 42f21c6dd9
Merge #3986
3986: Use consistent case for error messages r=def- a=ChillerDragon

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

consistency :)

## Checklist

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


Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-08-21 10:03:10 +00:00
def 9a03b6d01f Fix long maps not showing as finished (fixes #4092)
Only used client-side so no protocol change
2021-08-21 09:30:32 +02:00
bors[bot] 4ad16b0f74
Merge #4098
4098: Remove unused gfx_alphabits config variable and dead code r=def- a=Robyt3

The config variables are unused.

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

## Checklist

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


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

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

## Checklist

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


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

Fixes #3963

## Checklist

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


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

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

## Checklist

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


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

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

## Checklist

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


Co-authored-by: Edgar Luque <git@edgarluque.com>
Co-authored-by: Edgar <git@edgarluque.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: trml <trml@users.noreply.github.com>
2021-08-20 15:18:59 +00:00
Robert Müller 1820c72513 use minimum instead of std::min 2021-08-20 17:16:18 +02:00
Robert Müller 769ae98279 remove dead code 2021-08-20 17:09:46 +02:00
Robert Müller fd66957f3a remove unused gfx_alphabits config variable 2021-08-20 16:58:39 +02:00
Robert Müller 8fa7610463 remove obsolete engine/shared/message.h 2021-08-20 16:23:29 +02:00
Jupeyy 55abc3f7bb Make fallback stronger and safer 2021-08-18 12:42:30 +02:00
Jupeyy 915ab512bc Add STATE_NO_MASTER 2021-08-16 18:27:43 +02:00
Jupeyy 6101782290 Make clicking refresh before current load is finished to calculate best master again 2021-08-16 18:27:43 +02:00
bors[bot] 3594d89f85
Merge #4003
4003: Use GL_ARRAY_BUFFER r=Learath2 a=Jupeyy

For older OpenGL contexts

`@Learath2` can you check this?

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-08-16 12:31:30 +00:00
Magnus Auvinen f8153a4f2a removed the operator int() from IGraphics::CTextureHandle and ISound::CSampleHandle in order to catch more bugs
(cherry picked from commit 563f1d0c52)
2021-08-14 21:54:18 +02:00
Zwelf d6912f7ced Record team change in teehistorian 2021-08-14 15:22:13 +02:00
Zwelf aa41b60934 Don't record sv_reserved_slots_pass in teehistorian 2021-08-14 15:22:13 +02:00
Jupeyy ac5d731b91 Use GL_ARRAY_BUFFER 2021-08-08 16:55:19 +02:00
def 7dcca97900 Revert "Fix client use-after-free reported by mmmds"
Seems to cause problems:

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

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

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

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

(cherry picked from commit bf61d41c49)

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

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


New:
![screenshot_2021-08-04_10-15-08](https://user-images.githubusercontent.com/20344300/128148516-b5a5fc79-2db8-4379-9d20-1a39c4d6285a.png)


## Checklist

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


Co-authored-by: oy <Tom_Adams@web.de>
2021-08-04 08:29:58 +00:00
oy deea648bcd improved the debug graphs.
Closes https://github.com/teeworlds/teeworlds/issues/1058

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

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

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

(cherry picked from commit a97f8a22de)


## Checklist

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


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

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

(cherry picked from commit a97f8a22de)
2021-08-03 16:36:15 +02:00
Robert Müller c335d84373 remove unused MenuTick, reuse existing m_LocalStartTime
(cherry picked from commit 009b072c34)
2021-08-03 15:41:00 +02:00
BloodWod 89bd2c6b15 disabling quick editing in the console 2021-07-26 14:27:27 +05:00
fokkonaut 845ce60031
Forgot it here too 2021-07-22 02:15:28 +02:00
fokkonaut 5450808d03
Forgot to add target here 2021-07-22 00:22:12 +02:00
fokkonaut e30db2bf29 Add target clientid to antibot OnHammerHit 2021-07-21 22:28:59 +02:00
Jupeyy 7e55b64556 Remove global CGameClient instance 2021-07-12 12:53:08 +02:00
def 2cb3c575f5 Merge master into pr_use_cpp 2021-07-04 16:09:20 +02:00
bors[bot] f23475665f
Merge #3942
3942: Allow the antibot to get more insight into the network r=Learath2 a=heinrich5991

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

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

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-07-01 14:55:12 +00:00
bors[bot] 5d73c31863
Merge #3932
3932: Reset relative mouse motion on toggle r=def- a=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
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-07-01 12:20:06 +00:00
def c24060f244 Compare lower case strings respecting utf8 (fixes #3937) 2021-06-28 22:51:14 +02:00
Jupeyy 734ed86bd9 Reset relative mouse motion on toggle 2021-06-25 14:52:26 +02:00
heinrich5991 fe082b9a6a Allow the antibot to get more insight into the network
E.g. allow it to see the messages the server sends.
2021-06-24 20:32:41 +02:00
Jupeyy a663799188 uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
Jupeyy 9dfea5511a Use cpp 2021-06-24 17:19:17 +02:00
Dennis Felsing 0892405ba7 sjon -> json 2021-06-21 14:51:45 +02:00
Jupeyy a43d1698c5 Use time_get_microseconds in ChoseMaster class 2021-06-15 02:18:36 +02:00
bors[bot] ca14d87b13
Merge #3911
3911: Don't set cached pings for servers without info r=def- a=heinrich5991

Fixes #3899.

<!-- 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-06-14 22:29:48 +00:00
heinrich5991 c5cd8d354d Add a new failure log level to the HTTP module
Use it for the "determine best masterserver" job, so that we can debug
failures.
2021-06-15 00:12:06 +02:00
heinrich5991 97b53c4409 Don't set cached pings for servers without info
Fixes #3899.
2021-06-15 00:06:26 +02:00
Jupeyy d873a5d663 Fix str comp parameter in updater 2021-06-14 07:47:54 +02:00
heinrich5991 5a584bd82b Fix help text of cfg var to mention correct filename
I missed this during the `serverlist_urls.cfg` →
`ddnet-serverlist-urls.cfg` rename.
2021-06-12 19:34:18 +02:00
Dennis Felsing e869c29aeb
Merge pull request #3896 from Jupeyy/pr_read_pixel_ignore_alpha
Force alpha values from glReadPixel to 255
2021-06-12 18:51:34 +02:00
Jupeyy f8fc05ec49 Force alpha values from glReadPixel to 255 2021-06-12 16:58:45 +02:00
Dennis Felsing ac584fa648
Merge pull request #3889 from Jupeyy/pr_fix_queuehttps_refresh
Don't refresh, if a job is already running
2021-06-12 11:31:43 +02:00
def c60715e907 Add timeout for serverbrowser http request 2021-06-09 17:40:46 +02:00
Jupeyy 90303692df Don't refresh, if a job is already running 2021-06-09 17:40:46 +02:00
bors[bot] b445862628
Merge #3888
3888: Send server info request for ping with different token r=Jupeyy a=heinrich5991

Thanks to @Jupeyy for figuring out this bug.

Previously, the client would send the request for server info and the
server info ping packet with the same token, making the answer
indistinguishable from each other. Fix this by generating a token that
won't collide.

Fixes #3862.

<!-- 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-06-09 15:36:38 +00:00
heinrich5991 97a8fcca04 Send server info request for ping with different token
Thanks to @Jupeyy for figuring out this bug.

Previously, the client would send the request for server info and the
server info ping packet with the same token, making the answer
indistinguishable from each other. Fix this by generating a token that
won't collide.

Fixes #3862.
2021-06-09 17:29:06 +02:00
Jupeyy fea070a712 Remove unused variables 2021-06-09 05:35:28 +02:00
Jupeyy 9956242b4e Remove cl_load_country_flags 2021-06-08 01:06:07 +02:00
bors[bot] f6e887f7aa
Merge #3881
3881: Use str_length r=def- a=ChillerDragon

Either we should delete str_length or we should use it. Feel free to downvote this pr if u think delete is the way to go.

Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-06-05 17:17:30 +00:00
ChillerDragon 8a4f4fc6c9 Use str_length 2021-06-05 16:46:01 +02:00
bors[bot] 46f204bda7
Merge #3873
3873: Add japanese compressed font r=def- a=TsFreddie

This is a 57kb hiragana/katakana font sits between deja vu sans and source han sans. GlowSansJCompressed is a fork of Source Han Sans so the style and license are the same: https://github.com/welai/glow-sans/blob/master/docs/README-en.md

Was torn between condensed (thiner) font and compressed (thinnest) font, but I figure since we want to fit them better, might as well make more text fit rather than less:

![image](https://user-images.githubusercontent.com/3797859/120436727-e0053f00-c3b1-11eb-8760-4c5afbb4a6da.png)

The font weight is "book" because glow sans has 9 font weights instead of matching source han sans's 7. so the weight name was shifted.

_Japanese translation will come later._

## 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>
2021-06-04 14:28:24 +00:00
Freddie Wang 66caa896b9 Add japanese condensed font 2021-06-04 21:15:29 +08:00
heinrich5991 26a577b891 Fix crash in serverbrowser initialization
Another missing commit.

Fixes #3875.

CC #3772 #3855
2021-06-03 00:27:00 +02:00
bors[bot] 593ce122e6
Merge #3866
3866: Add Input handling to UI Ex initialization r=def- a=Jupeyy




fixes #3865

- [ ] 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-05-31 17:07:26 +00:00
Jupeyy 14f448d6d6 Init input handling in UI Ex 2021-05-31 12:27:04 +02:00
ChillerDragon 68962e9b40 Fix a woopsie in snapshot docs
Thanks to @def- and @murpii :)
2021-05-29 11:07:33 +02:00
bors[bot] 7e9b0fcb6b
Merge #3858
3858: Reduce spamminess of http server browser r=heinrich5991 a=def-

As reported by fokkonaut on Discord. Not sure if we lose relevant
information.

Previously:
```
[2021-05-28 12:08:54][http]: http https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:55][http]: task done https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:55][http]: http https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task done https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][serverbrowse_http]: found master, url='https://master2.ddnet.tw/ddnet/15/servers.json' time=2437ms
[2021-05-28 12:08:57][http]: http https://master4.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task failed. libcurl error: Could not resolve host: master4.ddnet.tw
[2021-05-28 12:08:57][http]: http https://master3.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task failed. libcurl error: Could not resolve host: master3.ddnet.tw
[2021-05-28 12:08:57][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:58][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:58][serverbrowse_http]: found master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=201ms
[2021-05-28 12:08:58][serverbrowse_http]: determined best master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=201ms
[2021-05-28 12:08:58][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:58][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
```
Now:
```
[2021-05-28 12:29:58][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:29:59][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:30:00][serverbrowse_http]: found master, url='https://master2.ddnet.tw/ddnet/15/servers.json' time=799ms
[2021-05-28 12:30:00][serverbrowse_http]: found master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=43ms
[2021-05-28 12:30:00][serverbrowse_http]: determined best master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=43ms
```
<!-- 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-05-28 15:13:42 +00:00
def bcdb3e0247 Reduce spamminess of http server browser
As reported by fokkonaut on Discord. Not sure if we lose relevant
information.

Previously:

[2021-05-28 12:08:54][http]: http https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:55][http]: task done https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:55][http]: http https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task done https://master2.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][serverbrowse_http]: found master, url='https://master2.ddnet.tw/ddnet/15/servers.json' time=2437ms
[2021-05-28 12:08:57][http]: http https://master4.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task failed. libcurl error: Could not resolve host: master4.ddnet.tw
[2021-05-28 12:08:57][http]: http https://master3.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task failed. libcurl error: Could not resolve host: master3.ddnet.tw
[2021-05-28 12:08:57][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:57][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:58][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:58][serverbrowse_http]: found master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=201ms
[2021-05-28 12:08:58][serverbrowse_http]: determined best master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=201ms
[2021-05-28 12:08:58][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:08:58][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json

Now:

[2021-05-28 12:29:58][http]: http https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:29:59][http]: task done https://master1.ddnet.tw/ddnet/15/servers.json
[2021-05-28 12:30:00][serverbrowse_http]: found master, url='https://master2.ddnet.tw/ddnet/15/servers.json' time=799ms
[2021-05-28 12:30:00][serverbrowse_http]: found master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=43ms
[2021-05-28 12:30:00][serverbrowse_http]: determined best master, url='https://master1.ddnet.tw/ddnet/15/servers.json' time=43ms
2021-05-28 12:30:27 +02:00
def badaae58e9 [http]: http -> [http]: fetching 2021-05-28 12:11:59 +02:00
heinrich5991 f5e91ba192 Remove unused parts of the new serverinfo 2021-05-27 21:48:10 +02:00
heinrich5991 bfef7c9ba3 Add forgotten commit data from #3772
Change filename `serverlist_urls.cfg` → `ddnet-serverlist-urls.cfg`,
change filename `cache.sqlite3` → `ddnet-cache.sqlite3`, add `const` to
a variable and change pings to just before multiples of 100.

Fixes #3853.
2021-05-27 21:48:04 +02:00
Learath2 7e95911714 Fix alignment for CVoteOptionServer 2021-05-27 19:35:20 +02:00
heinrich5991 039f2c6823 Fix (harmless) array OOB access when no pings were cached
Use `vector.data()` instead of `&vector[0]` to get access to the
underlying array.

Fixes #3850.
2021-05-27 15:53:40 +02:00
def cc81ca973c Record last 10 demos by default 2021-05-27 14:57:50 +02:00
bors[bot] efde7523e4
Merge #3772
3772: Add client-side HTTP server info r=def- a=heinrich5991

Summary
=======

The idea of this is that clients will not have to ping each server for
server infos which takes long, leaks the client's IP address even to
servers the user does not join and is a DoS vector of the game servers
for attackers.

For the Internet, DDNet and KoG tab, the server list is entirely fetched
from the master server, filtering out servers that don't belong into the
list.

The favorites tab is also supposed to work that way, except for servers
that are marked as "also ping this server if it's not in the master
server list".

The LAN tab continues to broadcast the server info packet to find
servers in the LAN.

How does it work?
=================

The client ships with a list of master server list URLs. On first start,
the client checks which of these work and selects the fastest one.
Querying the server list is a HTTP GET request on that URL. The
response is a JSON document that contains server infos, server addresses
as URLs and an approximate location.

It can also contain a legacy server list which is a list of bare IP
addresses similar to the functionality the old master servers provided
via UDP. This allows us to backtrack on the larger update if it won't
work out.

Lost functionality
==================

(also known as user-visible changes)

Since the client doesn't ping each server in the list anymore, it has no
way of knowing its latency to the servers.

This is alleviated a bit by providing an approximate location for each
server (continent) so the client only has to know its own location for
approximating pings.
## 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-05-26 21:00:49 +00:00
bors[bot] 502711541e
Merge #3804
3804: HiDPI-aware Resolution List r=def- a=TsFreddie

This is a version of https://github.com/teeworlds/teeworlds/pull/2827

Which gives you a resolution list that allows you to select appropriate window size (which is saved in config and used to initialize videos), while showing the canvas size (which is the drawing resolution), at least on MacOS.

This also fixes incorrect clips that happens without HiDPI enabled, because `Graphics()->ScreenWidth()` (in canvas size) was reported incorrectly before, which is now fixed.

Also, I noticed that `m_DesktopScreenWidth` and `m_DesktopScreenHeight` (in window size in MacOS) is used incorrectly or differently from what it was used during initialization:

* During initialization, DesktopScreenWidth is the "screen width of your desktop", but it was used as the "game window size on your desktop" when checking whether to resize window. I added a separate window size calculation to use during resize.

Also, god, I hope SDL's different sizes and stuff is reported consistently at least in Wayland or X, so please test. I know in Windows they are always in pixel/canvas size so it might not be a huge issue there.

## Checklist

- [x] Tested the change ~~ingame~~ on MacOS
- [ ] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options (again, on MacOS, with both HiDPI and non-HiDPI settings)
- [ ] 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>
2021-05-22 09:56:09 +00:00
Jupeyy b607cf0f60 Remove texture quality config 2021-05-21 15:00:14 +02:00
bors[bot] 309cc79899
Merge #3815
3815: Remove "Show only supported" switch from graphics tab r=def- a=ardadem

gfx_display_all_modes can be used instead

## 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: Arda Demir <ddmirarda@gmail.com>
2021-05-21 12:47:22 +00:00
heinrich5991 ad26358853 Fix clang-tidy warnings
Even fix a bug in the process, if `m_pDDNetInfo` is null.
2021-05-14 01:25:59 +02:00
heinrich5991 53e9457965 Save previously determined best serverlist
Also make the whole process more robust against failures, retry finding
the best serverlist if the current one is broken.
2021-05-14 01:01:09 +02:00
heinrich5991 9002c9f9a2 Allow pinging favorites directly, leaking your IP address
This is on by default for favorites added in the LAN tab, otherwise off.
2021-05-14 01:01:09 +02:00
heinrich5991 47c803f3fb Remove server info backward compatibility that is no longer needed
Goes all the way back to 04eddacd65 in
2008, pre 0.5.0.
2021-05-14 01:01:09 +02:00
heinrich5991 bd4e0f7fd8 Try parsing the server list before considering a masterserver 2021-05-14 01:01:08 +02:00
heinrich5991 afe6ab87e2 Also sort HTTP server info by score/name 2021-05-14 01:01:08 +02:00
heinrich5991 ee42faac1f Determine one's own location automatically, but provide override
Automatically determine the approximate location of the client by
including that info in the already fetched https://info2.ddnet.tw/info.
Can be overridden using the the config variable `br_location`.
2021-05-14 01:01:08 +02:00
heinrich5991 9eca91de74 Special case China as its own continent for ping estimation
It has an exceptionally bad connection to the outside due to the Great
Firewall of China:
https://en.wikipedia.org/w/index.php?title=Great_Firewall&oldid=1019589632
2021-05-14 01:01:08 +02:00
heinrich5991 acbaa87835 Use in-band ping for determining latency, if supported
Still fall back to server info requests for pinging.
2021-05-14 01:01:08 +02:00
heinrich5991 5ae0c3f3a0 Fix server capabilities only working after disconnect 2021-05-14 01:01:08 +02:00
heinrich5991 6567743546 Add PINGEX and PONGEX messages that are correlatable
The current NETMSG_PING and NETMSG_PING_REPLY messages suffer from the
fact that you cannot know whether a given NETMSG_PING_REPLY is from your
NETMSG_PING.
2021-05-14 01:01:08 +02:00
heinrich5991 a0df2bdf9c Measure the ping to the current server occasionally
This is done using the serverbrowser extended GETINFO packet. It's done
when the client enters the game and every ten minutes afterwards.
2021-05-14 01:01:08 +02:00
heinrich5991 ed561c3602 Add a command to ping all servers
Name it in a way to make clear what information it leaks to anyone who
wants to listen.
2021-05-14 01:01:07 +02:00
heinrich5991 bce7a4f84e Add serverbrowser ping cache 2021-05-14 01:00:41 +02:00
heinrich5991 355c6fccd3 Add sqlite3 to the client 2021-05-14 01:00:41 +02:00
heinrich5991 4301ffab58 Give tests their own playground IStorage
Also add a function to clean it up after the test.
2021-05-14 01:00:41 +02:00
heinrich5991 436e202cbd Add client-side HTTP server info
Summary
=======

The idea of this is that clients will not have to ping each server for
server infos which takes long, leaks the client's IP address even to
servers the user does not join and is a DoS vector of the game servers
for attackers.

For the Internet, DDNet and KoG tab, the server list is entirely fetched
from the master server, filtering out servers that don't belong into the
list.

The favorites tab is also supposed to work that way, except for servers
that are marked as "also ping this server if it's not in the master
server list".

The LAN tab continues to broadcast the server info packet to find
servers in the LAN.

How does it work?
=================

The client ships with a list of master server list URLs. On first start,
the client checks which of these work and selects the fastest one.
Querying the server list is a HTTP GET request on that URL. The
response is a JSON document that contains server infos, server addresses
as URLs and an approximate location.

It can also contain a legacy server list which is a list of bare IP
addresses similar to the functionality the old master servers provided
via UDP. This allows us to backtrack on the larger update if it won't
work out.

Lost functionality
==================

(also known as user-visible changes)

Since the client doesn't ping each server in the list anymore, it has no
way of knowing its latency to the servers.

This is alleviated a bit by providing an approximate location for each
server (continent) so the client only has to know its own location for
approximating pings.
2021-05-14 01:00:39 +02:00
heinrich5991 11adc8c1ff Make it possible to run jobs in the current thread 2021-05-13 03:15:18 +02:00
bors[bot] 22ef342ffc
Merge #3825
3825: Add sv_swap r=heinrich5991 a=def-

Because swap is broken and the current way of disabling is horrible.

<!-- 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-05-11 20:05:47 +00:00
def 6a348c8f60 Add sv_swap
Because swap is broken and the current way of disabling is horrible.
2021-05-11 17:05:17 +02:00
bors[bot] e7787bf58d
Merge #3823
3823: Add hookcollision color changeable r=heinrich5991 a=Jupeyy

![t](https://cdn.discordapp.com/attachments/293493549758939136/841549439742378034/unknown.png)

in HUD

## Checklist

- [ ] 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>
2021-05-11 14:39:42 +00:00
Jupeyy f8b15e0412 Add hookcollision color changeable 2021-05-11 14:34:53 +02:00
bors[bot] 5d0e820af4
Merge #3814
3814: Fix x11 notify by Maiski r=def- a=Jupeyy

This works on KDE without problems, he also tested on i3

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-05-07 21:33:46 +00:00
Arda Demir 500670cfba Rename gfx_display_all_modes to gfx_display_all_video_modes 2021-05-07 12:56:50 +03:00
bors[bot] 1d0253aa67
Merge #3811
3811: Add Intel as vendor to the block list on windows r=def- a=Jupeyy

I also added, that the warning doesnt require to be displayed, as it currently won't help anyway to update the driver.

Should set all Intel users to OGL 2.0 default, they can ofc still manually change the setting as they want

## 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-05-07 07:52:57 +00:00
bors[bot] 23b8ad5cc2
Merge #3812
3812: Make init/shutdown when GL processor creation fails safer r=def- a=Jupeyy

Especially with GL 3.3, which has a shutdown command implemented, it should only get called, if it actually created the the backend stuff.

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-05-07 07:43:27 +00:00
Freddie Wang 08ecb91622 detect display changes and clamp the resolution 2021-05-07 12:00:32 +08:00
Jupeyy 99e460deb7 Fix x11 notify by Maiski 2021-05-07 02:07:37 +02:00
Freddie Wang 24ccffb005 calculate canvas size instead of window size 2021-05-06 22:29:49 +08:00
Jupeyy fbbfbf7890 don't initialize opengl stuff, if not required 2021-05-06 13:39:17 +02:00
Freddie Wang 2f008d04d3 dpi-aware resolution list 2021-05-06 18:59:30 +08:00
Jupeyy 9104c19a1a remove dublicate code 2021-05-06 12:48:46 +02:00
def 427c01294a av_init_packet is deprecated, use av_packet_alloc instead 2021-05-06 12:25:12 +02:00
Jupeyy 899c30406d Add Intel as vendor to the block list on windows 2021-05-06 12:23:40 +02:00
bors[bot] 97ab2c6c01
Merge #3798
3798: Add GLES support r=def- a=Jupeyy

I know i *****ed up, that i didnt move the files in a different commit, but when i noticed it was already too late.
Its mostly disabling stuff that GLES doesn't support. Global LOD bias or glOrtho for examlpe.

~***Strong note***:
This will move ALL linux implementation to GLES instead of GL, since GLES is supported by X11 and wayland, we probably want some testing for this.
This also means, that the default for Linux gets GLES 3.0 which is equivalent to OpenGL 3.3, not OpenGL 3.0!!!~

~If you wonder "why":
Gles just works differently to OGL, it knows about all functions that exists, and e.g. doesn't require GLEW at all, but that also means, that GLES does NOT work while we use OGL, because GLEW would kill GLES.~
GLEW in EGL mode works fine with wayland, just requires X11 to use EGL too(SDL_VIDEO_X11_FORCE_EGL)

_Additionally, for GLES only, only 3.0 and 1.0 context are supported._(doesn't matter anymore for linux)

probably fixes:
~not_really_fixes  #3797~
fixes #2885

And would also allow android support, if i ever get these build scripts upto date, or smby is interested into fixing them for me :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: Jupeyy <jupjopjap@gmail.com>
2021-05-06 09:50:26 +00:00
Dennis Felsing 6bd41d5dd2
Support ipv6
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-05-05 17:32:37 +02:00
def 6a6ba69189 Steam: Support connecting to hostname
instead of just ip address, untested
2021-05-05 16:10:30 +02:00
Jupeyy 8be6f1791c Make video's pixel read GLES conform 2021-05-03 23:02:45 +02:00
Patiga ec53b8742e Fix duplicate uuid index in maps edited by tools 2021-05-03 12:02:18 +02:00
Jupeyy 6f01de1193 Fix modern GL graphic settings for the multi backend 2021-05-02 23:21:00 +02:00
Jupeyy fc1b87785f make pixel alignment numerical more robust 2021-05-02 10:35:46 +02:00
Jupeyy b8f96ce500 Allow GLES3 coexists with OpenGL on Linux 2021-05-02 04:39:02 +02:00
Jupeyy e05abbaa91 Remove GL includes from headers 2021-05-01 23:56:30 +02:00
Jupeyy ecc5a7af81 Make GLES3 only makros 2021-05-01 21:21:09 +02:00
Jupeyy f5f05f3dcb make screenshot work 2021-05-01 01:39:37 +02:00
Jupeyy c0d6ce6d25 Add GLES support 2021-05-01 01:39:37 +02:00
Freddie Wang 00540deaef initialize CClient::m_HasPersistentData 2021-04-21 15:45:58 +08: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
ChillerDragon 67f4944630 Fix auto reconnect while in game 2021-04-15 12:44:24 +02:00
Jupeyy ec03261aa5 Refactor add command in graphics_threaded class 2021-04-07 19:03:07 +02:00
Jupeyy 8eac8b0afc Only remove windowed fullscreen and restore mouse focus loss behavior 2021-04-02 22:45:49 +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
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
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
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
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
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 4afe62a596 Updated to include penalty, cooldown and timeout 2021-03-17 00:31:16 +02: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
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
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
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
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
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
Learath2 5f50d1dc57 Add a way to block people from chatting on vpns 2021-03-01 19:54:59 +01:00
Jupeyy c20b9801d4 Don't allocate the windows console default 2021-03-01 15:25:45 +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
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
def 7f9110b67c Remove fifo file on shutdown 2021-02-21 17:31:25 +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
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] 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
def 28eb4b15af Remove gfx_show_warnings 2021-02-10 23:02:34 +01:00
Jupeyy 15129ad721 lower alpha threshold 2021-02-03 20:05:02 +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
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
def 4bd3525b38 sv_reserved_slots: allow up to 64 2021-01-28 13:57:53 +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
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