Commit graph

7774 commits

Author SHA1 Message Date
heinrich5991 91b60e6981 Make emoticons smoother 2021-09-13 16:26:48 +02:00
heinrich5991 43379503fc
Merge pull request #4114 from fokkonaut/pr-switch
Send switch states only for own team
2021-09-13 13:40:07 +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] 84ea62d769
Merge #4148
4148: Kill unfinishable teams if they don't enter /practice within a minute r=Learath2 a=heinrich5991

This is to avoid players playing in unfinishable teams for a long time
if they don't understand the system messages.

Fixes #4088.

## 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-09-13 11:04:03 +00:00
bors[bot] 38eba0c83c
Merge #4153
4153: Some char array naming convention r=heinrich5991 a=ChillerDragon

<!-- 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:39:39 +00: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 43b67b1c3a Remove commented out render code 2021-09-13 12:31:08 +02:00
ChillerDragon 5140854d68 Some char array naming convention 2021-09-13 12:21:56 +02:00
ChillerDragon 3eb3dcd48b Make use of IO_MAX_PATH_LENGTH
Inspired by
0a7d0fee7c
2021-09-13 12:14:50 +02:00
heinrich5991 d8423884a3 Use CGameContext::SendChatTeam where possible 2021-09-11 20:23:27 +02:00
heinrich5991 d6c344853a Kill unfinishable teams if they don't enter /practice within a minute
This is to avoid players playing in unfinishable teams for a long time
if they don't understand the system messages.

Fixes #4088.
2021-09-11 20:23:27 +02:00
fokkonaut 7aa4652715 Always send correct zoom dimensions 2021-09-11 01:08:32 +02:00
def f90722c817 Fix parantheses warning
This condition is too complicated to understand I think...

src/game/client/components/players.cpp: In member function ‘void CPlayers::RenderPlayer(const CNetObj_Character*, const CNetObj_Character*, const CTeeRenderInfo*, int, float)’:
src/game/client/components/players.cpp:546:130: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  546 |         if(((!IVideo::Current() && (g_Config.m_ClShowDirection >= 1)) || (IVideo::Current() && g_Config.m_ClVideoShowDirection)) && ClientID >= 0 || DemoPlayer()->IsPlaying())
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
2021-09-04 11:22:43 +02:00
bors[bot] c108d683c9
Merge #4139
4139: Fix spec-char not being shown r=def- a=fokkonaut

Caused by #4124, sorry for that. Characters are being removed from the Gameworld when entering /spec, therefore they dont get processed and the spec-char was not shown at all.
Also removed the m_Paused check in CCharacter::Snap because it does not even get called.

Edit: This still keeps the wanted effect from #4124, using CanSnapCharacter()

## Checklist

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


Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2021-09-02 08:21:21 +00:00
fokkonaut 1da212207e Fix spec-char not being shown 2021-09-02 10:20:58 +02:00
fokkonaut ea08601435 Allow placing unused tiles from other layers (#fixes 3794) 2021-09-01 11:43:32 +02:00
bors[bot] 646a4c9fcd
Merge #4133
4133: Add cl_show_local_direction (fixes #3978) r=def- a=HamidReza585

cl_show_local_direction allows you to see your own key presses during the game.

I changed the statements so it will allow local player to have key press arrows (inside the game), and I added a statement for configs (settings), so if you have cl_show_local_direction enabled, it will render the directions (arrows) for the local player. (Also affects demos and videos, same as cl_show_direction)

![ScreenShot](https://user-images.githubusercontent.com/57710259/131379491-c32047ef-7941-40eb-9ed5-381ea0cf5497.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: HamidReza <57710259+HamidReza585@users.noreply.github.com>
2021-08-31 08:51:04 +00:00
HamidReza 8dbebab524 Remove cl_show_local_direction and add cl_show_direction 2 2021-08-31 03:04:44 +04:30
HamidReza 79a0fabb82 Update players.cpp 2021-08-30 23:37:11 +04:30
HamidReza cc88cb96ff Revert "Update players.cpp"
This reverts commit 9e5a0b8e21.
2021-08-30 23:27:28 +04:30
HamidReza 9e5a0b8e21 Update players.cpp 2021-08-30 23:21:17 +04:30
bors[bot] d2bfb1e12a
Merge #4132
4132: document CComponent r=Jupeyy a=edg-l

I think this will make it easier for future people looking into this class.

## 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: Edgar Luque <git@edgarluque.com>
2021-08-30 18:43:09 +00:00
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
Edgar eb426c42e1
missed dots 2021-08-30 18:31:46 +02:00
Edgar f6220ed18d
document CComponent 2021-08-30 17:38:22 +02:00
bors[bot] a22f4ffc1e
Merge #4100
4100: Cleaned AFK checking r=def- a=gerdoe-jr

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

Using `bool` instead of `int` for `m_SendNAfkMsg`
Deleted `m_pAfkMsg` from `CPlayer` declaration
Cleaned last activity check code

Please test this PR, because I don't know what can go wrong here :P

## 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: Vlad <gerdoexx@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2021-08-30 15:08:41 +00:00
def 7d196976ce fix clang-format 2021-08-30 17:08:18 +02:00
Vlad df6f6bafc6 code re-use 2021-08-30 17:51:28 +03:00
bors[bot] f48249786c
Merge #4127
4127: Editor Bug Fixed r=def- a=HamidReza585

Fixed reported bug: #4007 

![ScreenShot](https://user-images.githubusercontent.com/57710259/131328675-41404b79-1b60-4e2b-8ab5-215c552432eb.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: HamidReza <57710259+HamidReza585@users.noreply.github.com>
2021-08-30 11:03:59 +00:00
HamidReza bc210df380 Editor Bug Fixed 2021-08-30 15:11:28 +04:30
bors[bot] 76db1d77f4
Merge #4121 #4124
4121: Editor Improvements r=def- a=HamidReza585

Added the option to write separate explanations for different entities and fixed the wrong explanation bug.

![ScreenShot](https://user-images.githubusercontent.com/57710259/131142608-a03ca2d3-6d34-4a8f-ac68-c99e1fb7c8e9.png)

## Checklist

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


4124: Fix specchar transparency and move spec-char to character snap (fixes #4123, #3816) r=def- a=fokkonaut

Fixes spec-char being rendered with transparency leading in almost invisible spec chars, aswell as moves spec-char to the character snap serverside.
Fixes #4123, #3816

## 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: HamidReza <57710259+HamidReza585@users.noreply.github.com>
Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2021-08-30 09:10:53 +00:00
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
Vlad a10ffd8dfa Merge branch 'master' of https://github.com/ddnet/ddnet into pr-unnecessary-multi-use 2021-08-29 11:49:44 +03:00
fokkonaut 73a21cab62 Fix specchar transparency and move spec-char to character snap 2021-08-29 03:04:22 +02:00
HamidReza 3ca09259be New Tiles & Improvements 2021-08-28 22:21:38 +04:30
HamidReza 009a951635 clang-format 2021-08-28 13:13:18 +04:30
HamidReza c9018a2117 More Tiles 2021-08-28 01:50:39 +04:30
HamidReza 8b69ffef22 clang-format 2021-08-27 22:58:11 +04:30
HamidReza 91d7a676b1 Update explanations.cpp 2021-08-27 19:58:51 +04:30
HamidReza 8dbefa734f Editor Improvements
Added possibility to write separate explanations for different entities and fixed a bug.
2021-08-27 18:36:27 +04:30
def 9dd65b4dce Fix offset of strong symbol in nameplate
As reported by Skeith
2021-08-27 15:46:55 +02:00
fokkonaut ae7e6c05f0 Send switch state of team 0 if character is not alive 2021-08-24 22:56:39 +02:00
bors[bot] 73e71951b9
Merge #3960 #4006 #4103
3960: Display colors for strong / weak hook states r=Jupeyy a=BloodWod-513

<!-- What is the motivation for the changes of this pull request -->
Off by default, cl_nameplates_strongweak 1 to enable;
Also shown in debug mode (ctrl-shift-d);
You can change the colors in the HUD.

![hkUp2p8chGA](https://user-images.githubusercontent.com/33897884/126379859-1dc29c09-57fb-4d4b-9810-a4f0b09599a0.jpg)
![WCZx_ZR8fQ0](https://user-images.githubusercontent.com/33897884/126379863-3f25295a-ca36-4184-a0ed-1946b40ed967.jpg)
## Checklist
- [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)


4006: Add /team -1 r=Jupeyy a=gerdoe-jr

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

## Checklist
In addition for #4005.

Now /team -1 forces player to first empty team.

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


4103: Fix swap resets switches. r=Jupeyy a=edg-l

Fixes #3806

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

## Checklist

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


Co-authored-by: BloodWod <dayn_2013@mail.ru>
Co-authored-by: Ilya <33897884+BloodWod-513@users.noreply.github.com>
Co-authored-by: gerdoe-jr <gerdoexx@gmail.com>
Co-authored-by: Edgar Luque <git@edgarluque.com>
2021-08-24 12:23:12 +00: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
fokkonaut b75c5b015f
Only send switch states of own team 2021-08-24 00:43:12 +02:00
fokkonaut 69fe35f288 Send switch states per team and cleanup 2021-08-23 23:26:36 +02:00
Learath 4014385a42 Clean up CDoor 2021-08-23 14:28:38 +03: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 ac56075b1b Upgrade resolution list 2021-08-22 15:00:12 +02:00
Edgar d7107da2f1
Fix swap resets switches.
Fixes #3806
2021-08-21 10:02:45 +02:00
Vlad 22df8707a1 less code, less memory use 2021-08-20 19:06:05 +03: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
Jupeyy fea9eb5be5 Allow floats arguments for zoom 2021-08-19 22:13:04 +02:00
trml 08ef63a64c Add prediction for switch tiles 2021-08-19 01:11:38 +02:00
Jupeyy 372dbf702e Don't promote modern GL setting in menu, if the driver is on blocklist 2021-08-18 12:42:40 +02:00
BloodWod 4dd37f63a6 refactoring 2021-08-17 21:33:14 +05:00
Edgar 200af585d3
check if GIT_SHORTREV_HASH exists
Co-authored-by: Emir Marincic <learath2@gmail.com>
2021-08-16 18:29:24 +02:00
Learath a9c11d07b3 Check for null. Fix #4090 2021-08-16 19:11:43 +03:00
Edgar 74fac43376
log git revision hash to stdout/console
Fixes #3963
2021-08-16 16:38:44 +02:00
bors[bot] 8d9fa1045c
Merge #4084
4084: Send switch state to the client r=Learath2 a=edg-l

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

This PR is related to #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
- [ ] 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>
2021-08-16 12:12:17 +00:00
bors[bot] 6b9bdbc259
Merge #4080
4080: Fix collecting weapon in solo part not making any sound. r=Jupeyy a=edg-l

fixes #3822
fixes #2219

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

## Checklist

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


Co-authored-by: Edgar Luque <git@edgarluque.com>
2021-08-16 09:52:45 +00:00
Edgar 1dd91feec6
send switch state to the client 2021-08-16 11:15:23 +02:00
bors[bot] 6ff6570c83
Merge #4083
4083: Fix transparent shotgun bullets r=Jupeyy a=trml

Fixes #3591

## 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: trml <trml@users.noreply.github.com>
2021-08-15 13:54:08 +00:00
trml 1977464f4b Fix transparent shotgun bullets 2021-08-15 11:33:45 +02:00
bors[bot] 140d36137e
Merge #3996
3996: Make the country/type selection more intuitive r=edg-l a=def-

I watched a live stream where someone struggled with this, not knowing
that right click has different functionality from left click, and had to
manually click on each entry to remove them all except one.

<!-- 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-08-15 08:28:18 +00:00
bors[bot] bfe8fac232
Merge #4008
4008: removed the operator int() from IGraphics::CTextureHandle and ISound:… r=Jupeyy a=ChillerDragon

…:CSampleHandle in order to catch more bugs

(cherry picked from commit 563f1d0c52)



## 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: Magnus Auvinen <magnus.auvinen@gmail.com>
2021-08-15 08:14:02 +00:00
Edgar 1148d0aaa4
fix style 2021-08-15 10:11:00 +02:00
Edgar 34bf70ab5f
Fix collecting weapon in solo part not making any sound.
Fixes #3822
2021-08-15 09:12:59 +02: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
BloodWod 5894c26724 refectoring 2021-08-14 18:57:57 +05:00
Zwelf d6912f7ced Record team change in teehistorian 2021-08-14 15:22:13 +02:00
Zwelf 6c452c15cf Record tee position at the end of the tick
priviously spawning players were recorded one tick too late
and add teehistorian minor version for the validator to recognize the
change
2021-08-14 15:22:13 +02:00
bors[bot] 94624c16ed
Merge #3984
3984: Disable chat sounds when recording without chat (fixes #3983) r=Learath2 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-08-14 13:10:52 +00:00
bors[bot] 5f1f13da95
Merge #4002
4002: Populate jetpack field properly r=Jupeyy a=Learath2

Noticed by Anime.pdf on discord

Doesn't seem to break anything else unintendedly but I'd be more comfortable with it if `@trml` takes a look.

## 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: Learath <learath2@gmail.com>
2021-08-14 12:59:58 +00:00
bors[bot] c10508fbae
Merge #3981
3981: Add /emote normal description (thanks to tela) r=edg-l 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-08-14 12:49:20 +00:00
Ilya adb4729464
add description for bind 2021-08-14 16:53:43 +05:00
BloodWod 75289d1272 add strong/weak icon 2021-08-14 03:48:49 +05:00
BloodWod 0aa2e37bff check extended data 2021-08-12 23:23:44 +05:00
BloodWod b44dabd00d add bind and diff arrows 2021-08-12 16:22:28 +05:00
Ilya 1661d51794 fix display colors 2021-08-11 16:28:25 +05:00
gerdoe-jr eb92bd2453 Whoopsie 2021-08-10 23:12:11 +03:00
gerdoe-jr 1cf43b48ae Add /team -1 2021-08-10 22:26:07 +03:00
Learath c1446c5ce4 Populate jetpack field properly 2021-08-08 13:36:25 +03:00
def 20f0078206 Make the country/type selection more intuitive
I watched a live stream where someone struggled with this, not knowing
that right click has different functionality from left click, and had to
manually click on each entry to remove them all except one.
2021-08-05 11:28:33 +02:00
def 677c55613c Disable chat sounds when recording without chat (fixes #3983) 2021-08-03 15:13:54 +02:00
Alexander Akulich ed8955e60f math: Rename frandom() to random_float() to match with random_int()
(cherry picked from commit 5e4c7b66c5)
2021-08-03 14:29:52 +02:00
def 0b8380a593 Add /emote normal description (thanks to tela) 2021-08-03 12:38:17 +02:00
bors[bot] ffcc722e8b
Merge #3970
3970: Fix pressing Home or End in server address field changes the selected server r=Learath2 a=BloodWod-513

<!-- What is the motivation for the changes of this pull request -->
I think it should fix #3964.
# 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: BloodWod <dayn_2013@mail.ru>
2021-07-26 06:51:15 +00:00
BloodWod 48cd8ea740 fix home/end buttons 2021-07-26 11:34:31 +05:00
bors[bot] b98263bfdb
Merge #3952
3952: Remove global components and global gameclient instance r=heinrich5991 a=Jupeyy

Prevents global constructors/destructors and is a bit of cleanup

would also fix the issue from #3948

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-07-25 09:49:08 +00:00
bors[bot] 9bfe4ec76a
Merge #3966
3966: Fix "tee hasn't hit the start line yet" error r=def- a=heinrich5991

It has been happening to all teams. Send `CGameTeams::OnCharacterStart`
even if the team has already started.

## 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-07-24 22:37:41 +00:00
BloodWod 49686d81be delete hud and config variables 2021-07-25 01:22:36 +05:00
bors[bot] 95c936d6c9
Merge #3956
3956: Fix out of bounds in editor render image r=heinrich5991 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-07-24 11:34:53 +00:00
heinrich5991 78d5cd8d76 Shuffle a condition around to get cleaner code 2021-07-24 13:04:03 +02:00
heinrich5991 b5363d4c01 Fix "tee hasn't hit the start line yet" error
It has been happening to all teams. Send `CGameTeams::OnCharacterStart`
even if the team has already started.
2021-07-24 12:57:06 +02:00
heinrich5991 b24fad1006 Make "can tee start the race" condition readable 2021-07-24 12:56:23 +02:00
heinrich5991 8b2c5949e4 Fix save codes (symptom: always jumping after load)
"\t" was missing for one variable.
2021-07-23 01:17:06 +02:00
Jupeyy c10a74c396 Go back to constructor destructor 2021-07-22 21:49:26 +02:00
bors[bot] 5ff7b7f9b5
Merge #3959
3959: Try to fix "start line skipping" r=Learath2 a=heinrich5991

Previously, tees could go around the start line on some maps, going
directly to the finish line while leaving one tee behind at the start.
By letting that sole tee start and kill itself, the team could be
directly at the finish at time 0:00.

Fix this by requiring every tee of a team to hit the start line before
being able to finish. Tees can still get some advantage by skipping the
start line, but it will no longer be a 0:00 finish.

<!-- 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-07-22 17:27:34 +00:00
fokkonaut e30db2bf29 Add target clientid to antibot OnHammerHit 2021-07-21 22:28:59 +02:00
heinrich5991 9f57293ce8 Warn teams after 30s if not every tee has started
Part of fixing startline skipping.
2021-07-21 17:54:46 +02:00
heinrich5991 4c2bd53e9b /save each tee's starting state
Part of fixing start line skipping.
2021-07-21 17:54:46 +02:00
heinrich5991 35402b07d7 Try to fix "start line skipping"
Previously, tees could go around the start line on some maps, going
directly to the finish line while leaving one tee behind at the start.
By letting that sole tee start and kill itself, the team could be
directly at the finish at time 0:00.

Fix this by requiring every tee of a team to hit the start line before
being able to finish. Tees can still get some advantage by skipping the
start line, but it will no longer be a 0:00 finish.
2021-07-21 17:54:46 +02:00
bors[bot] 2aafda3fcb
Merge #3949
3949: Remove unused m_LastInput r=Learath2 a=Jupeyy

fixes #3948

## 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-07-21 10:37:13 +00:00
BloodWod f66abb79bf Added color for strong and weak states 2021-07-20 22:39:44 +05:00
Jupeyy 4338b4fda6 Fix out of bounds in editor render image 2021-07-17 12:53:16 +02:00
Jupeyy 432568bfd4 Fix disallowing arrow keys in editor edit box 2021-07-17 12:48:22 +02:00
Jupeyy 7e55b64556 Remove global CGameClient instance 2021-07-12 12:53:08 +02:00
Jupeyy 26c5332dc6 Remove components pointers 2021-07-12 12:14:02 +02:00
Jupeyy 8451775821 Make components member of CGameClient 2021-07-12 12:07:31 +02:00
Jupeyy f67a0055e7 Remove unused m_LastInput 2021-07-11 17:41:22 +02:00
bors[bot] dbc05f6bb0
Merge #3947
3947: Allow zooming to levels. Close #3923 r=def- a=Learath2

I guess no harm in adding this since it's such a trivial addition? If it's useful to someone might as well have it.

Closes #3923 

## Checklist

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


Co-authored-by: Learath2 <learath2@gmail.com>
2021-07-10 14:16:20 +00:00
Learath2 1a6de7caf8 Allow zooming to levels. Close #3923 2021-07-10 15:53:23 +02:00
def 2a74ca331e Avoid double free on m_pScore (fixes #3939) 2021-07-08 20:21:22 +02:00
def 6598e0a543 Another MacOS -> macOS in translations 2021-07-08 09:08:08 +02:00
def 2cb3c575f5 Merge master into pr_use_cpp 2021-07-04 16:09:20 +02:00
bors[bot] 0e4e884b13
Merge #3935
3935: Remove switch state from prediction, initialize m_Layer r=def- a=trml

I couldn't reproduce #3934, but I believe it was caused by uninitialized values in projectiles (m_Layer and m_Number), which should be fixed now. Also cleaned up the unused switch code (all except tiles with number 0).

## 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: trml <trml@users.noreply.github.com>
2021-06-29 12:51:06 +00:00
def c24060f244 Compare lower case strings respecting utf8 (fixes #3937) 2021-06-28 22:51:14 +02:00
trml 48a84aef46 Remove switch state from prediction, initialize m_Layer 2021-06-28 00:29:42 +02:00
Sefa Eyeoglu 801ebbd161
fix: switch servers after player confirms
When a player wants to switch servers in-game, but needs to confirm the
action because of cl_confirm_disconnect, the game used to not actually
connect to the new server.

This adds a way to still connect to that server, after the player
confirms.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2021-06-26 14:29:06 +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
bors[bot] 0393ac0f88
Merge #3930
3930: Still allow lock/unlock/practice while sv_chat_initial_delay is set r=Jupeyy a=def-

Not sure if we should just allow them whenever someone is muted

Fixes #3929

<!-- 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-06-23 09:11:17 +00:00
def 29c95bc0a2 Still allow lock/unlock/practice while sv_chat_initial_delay is set
Not sure if we should just allow them whenever someone is muted

Fixes #3929
2021-06-23 08:51:13 +02:00
bors[bot] dc2fb88929
Merge #3927
3927: Forbid votes while being muted r=def- a=heinrich5991

Fixes the problem of people abusing the vote reason for spamming.

Fixes #3926.

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

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-06-22 21:05:08 +00:00
heinrich5991 15c6ad2fe7 Forbid votes while being muted
Fixes the problem of people abusing the vote reason for spamming.

Fixes #3926.
2021-06-22 22:45:30 +02:00
def a79d7b1965 Version 15.5.4 2021-06-20 11:39:04 +02:00
def d3e7306457 Version 15.5.3 2021-06-20 09:35:10 +02:00
effyn 286c99805f
Fix typo 2021-06-17 02:41:45 -07:00
bors[bot] a4e2457eed
Merge #3905
3905: Init mouse diff floats in editor r=def- a=Jupeyy

I assume is the cause the cursor in editor often is gone, bcs when alt tab it moves the cursor based on uninitialized values

## 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-06-15 13:29:11 +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
Jupeyy 942cbba7cf Init mouse diff floats in editor 2021-06-13 21:07:40 +02:00
def 56df0cf4ee Version 15.5.2 2021-06-13 18:07:33 +02:00
def 6388002467 Version 15.5.1 2021-06-12 18:51:48 +02:00
def b767d7a37c Version 15.5 2021-06-12 11:21:08 +02:00
bors[bot] ddcf654e7a
Merge #3895
3895: Translate "Name" and "Time" header in ghost menu r=def- a=TsFreddie

![image](https://user-images.githubusercontent.com/3797859/121635979-cb176280-cab9-11eb-9304-49a99bd4c048.png)

These two headers weren't translated.

## 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-11 07:17:15 +00:00
Freddie Wang 32b8c8c192
Translate "Name" and "Time" header in ghost menu 2021-06-11 13:31:30 +08:00
Jupeyy 9956242b4e Remove cl_load_country_flags 2021-06-08 01:06:07 +02:00
bors[bot] 8bd552d3b8
Merge #3884
3884: Make mouse pos calculation more robust against NaNs r=def- a=Jupeyy

1. Since the config didn't have a limit set, they could be negative, which directly caused bugs
2. If you set a min mouse distance, lets say 5, It can mathematically happen that you drag your mouse exactly so much that you hit the (0, 0) point and the if(.. < MinDistance) branch normalizes that point, which causes non restorable NaNs.
It's now safe, the min distance is later in code checked to be atleast 1, i "even" just made it safe enough, so there shouldn't be any change in behaviour:
07ab4d5356/src/game/client/components/controls.cpp (L298-L304)
Which casts the float to an int and checks the int, and this does not restore the mouse pos for NaNs, because nan to int is not 0
its some insanly high value int_max or smth

To reproduce both bugs "easily" on current master you can abuse a SDL limitation,
relative mouse mode seems to only move upto +-1 unit,
- so for 1. set the ingame mouse sens to 100000 and the max mouse distance to -1000 and move your mouse fast for a few seconds, happens relativly easy (Thanks to Souly how to reproduce it)
- for 2. set mouse sens to 100 and max distance to 1 and min distance to 5, this case is a bit harder to reprod in debug mode, probably bcs of the way mouse pos is later handled and also maybe bcs of floating point differences with signs that go close to 0... had to move the mouse few seconds but still got it relativly fast (with -0fast it happens almost instant)

it will exactly happen what i explained in 2. that the reported mouse movement negates the current mouse pos, resulting in mouse pos (0,0)

![screenshot_2021-06-06_21-55-18](https://user-images.githubusercontent.com/6654924/120938281-35bf4b80-c712-11eb-9b6b-7523e8b436bd.png)

This this was also a bug reported in #bugs channel, i think we could also add it to the release

## 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-06-07 08:28:24 +00:00
Jupeyy cd68b4608e Make calculation which sets mouse pos safer 2021-06-06 23:38:11 +02:00
Jupeyy 403803df4f Give mouse settings a maximum 2021-06-06 23:38:11 +02:00
Zwelf 4d14bcea0b Fix inconsistent handling of death tile between front and game layer 2021-06-05 16:38:53 +02:00
def 87ed889747 Move hammer and pistol weapons (fixes #3872) 2021-06-02 12:28:14 +02:00
Jupeyy aa9338614f Use FontSize for rendered cursor 2021-05-31 16:23:07 +02:00
Jupeyy 14f448d6d6 Init input handling in UI Ex 2021-05-31 12:27:04 +02:00
bors[bot] e5e2e46da2
Merge #3837
3837: Use "occupado" spawn spots when nothing else is left r=heinrich5991 a=def-

Better than not spawning at all

<!-- 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-28 17:21:50 +00:00
bors[bot] 992cd86d8e
Merge #3848
3848: Update German translation, some minor English fixes, update language files 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-05-28 17:11:05 +00:00
Learath2 7e95911714 Fix alignment for CVoteOptionServer 2021-05-27 19:35:20 +02:00
Freddie Wang 769970b30b Only predict pickup if affected by movers 2021-05-27 15:45:41 +08:00
def 3716bece80 masterserver -> master server, serverlist -> server list 2021-05-27 09:03:36 +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] fbf3d6e943
Merge #3844
3844: Add UI Ex class to share common ui implementations r=def- a=Jupeyy

Between menus and editor for example

Currently only did DoEditBox, as this created crashes in the editor

fixes #3395

It's copy and paste from the implementation of CMenus, except for 4 lines, which i'll mark below

## 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-26 13:21:01 +00:00
Jupeyy b7adc5a690 Add UI Ex class to share common ui implementations
between menus and editor for example
2021-05-26 15:02:33 +02:00
bors[bot] 47d63317aa
Merge #3826
3826: Respect TuneZone for characters r=def- a=TsFreddie

*I might be totally insane for doing this.
*The effect is only truly noticeable if you have high ping AND dropping packets.*

*clang-tidy's warning doesn't seems to relate to anything I've changed*


Now characters will try to respect TuneZones when ~~evolving and~~ predicting (like projectiles do). Since it is really important to keep TuningList as accurate as possible, I made a TuningList update logic so we try our best to update tunings only for the correct TuneZone (instead of constantly shoving current tuning into TuningList)

And each CCharacterCore now has its own Tunings to avoid any characters influencing GameWorld's tuning. Some server code has to be updated accordingly. I checked the code path, didn't notice anything that would make our server behave differently.

And I guess I should tag @trml myself this time.

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


Co-authored-by: Freddie Wang <tsfreddiewang@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2021-05-23 08:16:57 +00:00
Zwelf fa79ffa1a1 Simplify entities destruction 2021-05-22 20:02:00 +02:00
bors[bot] bf1fa15380
Merge #3841
3841: Add better support for compose binds in demo menu r=def- a=ChillerDragon

I assume shift is a common compose bind. So users might have bound
shift+scroll or shift+arrowkeys to something else and do not want to
change the playback speed while triggering that compose bind.

I have to admit this is something I personally need and I am not sure what the demand for it is.
But for example my zoom bind is shift+mousewheelup and shift+mousewheeldown and I change that a lot while watching demos but it keeps affecting the playback speed. Maybe someone else has a compose bind using the alt key I do not know. But this solves my issue :)

## 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: ChillerDragon <ChillerDragon@gmail.com>
2021-05-22 10:03:42 +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
ChillerDragon 7d87089acd Make sure ctrl+shift+s works same as clicking UI
Do not overwrite the current map when saving as a new file

closed #1972
2021-05-22 11:40:08 +02:00
ChillerDragon 18e69b4df1 Add better support for compose binds in demo menu
I assume shift is a common compose bind. So users might have bound
shift+scroll or shift+arrowkeys to something else and do not want to
change the playback speed while triggering that compose bind.
2021-05-22 11:31:15 +02: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
def 72f3b774b8 Use "occupado" spawn spots when nothing else is left
Better than not spawning at all
2021-05-20 21:39:04 +02:00
bors[bot] 42545ebcdb
Merge #3834
3834: Remove alpha clamp r=def- a=Jupeyy

Was still from the first version of the HSL sliders, which didn't had a border around the selector and made the alpha slider invisible(for menu colors slider), but thats not needed anymore(bcs borders are not transparent).

## 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-19 10:58:07 +00:00
def ae6a78c0ca Try to fix clang-tidy warnings (untested) 2021-05-19 12:58:04 +02:00
Jupeyy d39322d7a6 Differenciate between width and height for body part 2021-05-19 12:10:58 +02:00
Jupeyy 835901460c Remove alpha clamp 2021-05-19 12:04:04 +02:00
def 304d9f36ec Fix UB with super (fixes #3830) 2021-05-17 11:41:15 +02:00
Jupeyy 18fa5bdc22 Remove stack pointer for pID in UIs 2021-05-17 10:02:21 +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 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 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
Freddie Wang 500ba7609f Respect tunezone for characters 2021-05-13 00:57:50 +08: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
Freddie Wang 796035a358 Remove dangling declaration 2021-05-09 15:14:16 +08:00
Arda Demir 9f0f305e21 Remove "Show only supported" switch 2021-05-07 10:25:00 +03:00
Freddie Wang 2f008d04d3 dpi-aware resolution list 2021-05-06 18:59:30 +08: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
Jupeyy 26880ba05e Implement HSL sliders 2021-05-03 22:54:29 +02:00
Jupeyy 6f01de1193 Fix modern GL graphic settings for the multi backend 2021-05-02 23:21:00 +02:00
bors[bot] cd19e22959
Merge #3800
3800: Get rid of current tuning in predicted world r=Jupeyy a=TsFreddie

Missed a spot where the predicted world still returns current tuning.
closes #3799 

## 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: Freddie Wang <tsfreddiewang@gmail.com>
2021-05-01 19:05:02 +00:00
bors[bot] 3becd45ea6
Merge #3792
3792: Add hammer_hit_fire_delay tune r=heinrich5991 a=def-

as requested by J$ON for new map with Genex

the current hammer_fire_delay is only used when no other tee has been
hit. In order not to change any existing behaviour I have added a new
tune for the case of hitting, instead of making the existing one control
both.

<!-- 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-01 14:43:45 +00:00
def f6de0ef267 Add hammer_hit_fire_delay tune
as requested by J$ON for new map with Genex

the current hammer_fire_delay is only used when no other tee has been
hit. In order not to change any existing behaviour I have added a new
tune for the case of hitting, instead of making the existing one control
both.
2021-05-01 16:36:12 +02:00
bors[bot] aa6217d38e
Merge #3784
3784: Fix serverbrowser crash r=heinrich5991 a=Jupeyy

Putting a search string that doesnt find any server, or hold Up key while loading the client, or switching tabs can cause a crash, bcs the server list is empty, but input signals, it was changed

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-05-01 14:30:39 +00:00
Freddie Wang 223f21530c Get rid of redundant tuning data in CGameWorld 2021-05-01 10:34:20 +08:00
Freddie Wang a05960412f Get rid of current tuning in predicted world 2021-05-01 09:51:29 +08:00
Jupeyy c0d6ce6d25 Add GLES support 2021-05-01 01:39:37 +02:00
bors[bot] 826a979b05
Merge #3778
3778: Fix composed binds involving F-keys r=def- a=Learath2

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

Fixed #3771 for now. @fokkonaut please check

## Checklist

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


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

Thanks to Cøke for report

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-04-25 13:58:23 +00:00
bors[bot] c82970cf09
Merge #3788
3788: Allow unpredicted TuneZone settings for projectiles and lasers r=def- a=TsFreddie

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

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

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

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

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


## Checklist

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


Co-authored-by: Freddie Wang <tsfreddiewang@gmail.com>
2021-04-25 09:38:12 +00:00
def 47b167c697 Fix crash on test servers (fixes #3789) 2021-04-23 16:44:19 +02:00
Freddie Wang b1051d2398 always use inferred tuning instead of current one 2021-04-23 13:53:54 +08:00
Freddie Wang f18a47ae30 set m_usetunezones before local char spawns 2021-04-23 13:17:41 +08:00
Freddie Wang d2faabe913 force tunezone 2021-04-23 11:01:38 +08:00
Freddie Wang bef5dee897 Fix dummy's airjump trigger 2021-04-22 20:58:30 +08:00
Freddie Wang 75d185cf18 fix airjump for antiping 2021-04-22 20:52:49 +08:00
Jupeyy e958e0f33c Fix serverbrowser crash 2021-04-20 22:13:59 +02:00
Learath2 4275dfed75 Fix composed binds. Close #3771 2021-04-17 17:37:39 +02:00
bors[bot] faaf47bbbf
Merge #3768
3768: Fixed hook being lost for specific teleports r=def- a=kyle-bradley

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

For issue #3766 

## Checklist

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


Co-authored-by: kyle-bradley <kyle@houseme.co.za>
Co-authored-by: Kyle Bradley <kyle@house.me>
2021-04-12 09:23:23 +00:00
Jupeyy 0012e72d34 Add console chain for assets, reload current asset on reload button click 2021-04-11 14:34:08 +02:00
Kyle Bradley b4a5956f72 Kept hook when needed 2021-04-10 17:29:20 +02:00
Jupeyy 7c992e296a Center more tees 2021-04-09 20:11:53 +02:00
Kyle Bradley cad6b82cd9 Removed unintended format changes 2021-04-08 16:39:17 +02:00
Kyle Bradley 13fae16817 Reset hook of all players in a team whenever swap occurs.
Standardized hook resets
2021-04-08 16:36:43 +02:00
heinrich5991 c29874daf1 Fix team rank updating not working
With the MySQL C API, we need to distinguish between SQL statements that
return result sets and those that do not, UPDATE is one of those that
don't produce a result set.

Fixes #3725.
2021-04-07 17:19:53 +02:00
Emir Marincic 565cd76d31
Merge pull request #3753 from Jupeyy/pr_generalize_some_ui_stuff
Fix out of list clip clickable/hoverable items
2021-04-07 16:43:46 +02:00
Emir Marincic b66a9d6283
Merge pull request #3759 from def-/pr-swap
sv_swap_timeout <=
2021-04-07 16:37:40 +02:00
def 9a56b229ca sv_swap_timeout <= 2021-04-07 16:16:50 +02:00
Jupeyy 8eac8b0afc Only remove windowed fullscreen and restore mouse focus loss behavior 2021-04-02 22:45:49 +02:00
Jupeyy 75cdd8042c Fix out of list clip clickable/hoverable items 2021-04-01 16:48:38 +02:00
Jupeyy f0160b5313 Differenciate better between window modes 2021-03-30 10:07:41 +02:00
def 8c9e7c1231 Version 15.4 2021-03-25 07:58:27 +01:00
bors[bot] e55f7fbc0a
Merge #3733
3733: Please wait %d seconds r=Jupeyy a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-03-25 05:59:10 +00:00
def afe16b7e53 Please wait %d seconds 2021-03-24 19:16:00 +01:00
bors[bot] 76b6a07afa
Merge #3729
3729: Clear up documentation of cl_dummy_control r=Jupeyy a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-03-24 07:49:00 +00:00
def 9a0243821a Fix scrolling in controls settings with ui_scale < 100 (fixes #3727) 2021-03-23 23:16:28 +01:00
def 5a6da005a0 Clear up documentation of cl_dummy_control 2021-03-23 14:54:47 +01:00
bors[bot] 02feecf41e
Merge #3707 #3709
3707: Set search field active when opening vote menu ingame r=Jupeyy a=def-

As suggested by RafaelFF

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

## Checklist

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


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

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

as reported by Shyzo

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-03-23 13:09:43 +00:00
def 03c2caaa1a Different comparators for skins in UI (no case) and regular skins (with case)
Broke x_ skins, caused by https://github.com/ddnet/ddnet/pull/3214
2021-03-23 13:39:54 +01:00
bors[bot] 027e1d8b14
Merge #3654
3654: Added swap functionality to server client: r=def- a=houseme-kyle

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

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

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

Possible additions:
- Time penalty

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

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

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


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

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

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-03-20 16:31:58 +00:00
Kyle Bradley decaeb8934 PR feedback:
- Changed names of variables
- Changed config descriptions
- Fix for perma timeout
2021-03-20 18:08:54 +02:00
Learath2 a3dd47d7e8 Actually check all tees. Fixes #3697 2021-03-20 15:45:11 +01:00
bors[bot] b35e8f880c
Merge #3715
3715: Add dummy_reset and remove +resetdummy r=def- a=ardadem

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

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

## Checklist

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


Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2021-03-19 08:18:01 +00:00
Patiga 55117fcfaa Externalize only images with vanilla names 2021-03-19 01:06:37 +01:00
Kyle Bradley 6c9cbee41c Merge branch 'feature-swap' of https://github.com/houseme-kyle/ddnet into feature-swap 2021-03-17 21:23:52 +02:00
Kyle Bradley a68b28fc14 Further tests and edge cases dealt with 2021-03-17 21:23:41 +02:00
def 61b3a7c554 Fix clang-format
By using clang-format-10 from AUR clang-format-static package
2021-03-17 20:19:35 +01:00
Kyle Bradley 2d4834ffcf Edge case for player state when changing team 2021-03-17 20:51:52 +02:00
houseme-kyle e11345807f
Merge pull request #5 from ddnet/master
Merge
2021-03-17 19:07:18 +02:00
Arda Demir 2aefdf2a5e Add dummy_reset and remove +resetdummy 2021-03-17 18:09:39 +03:00
Kyle Bradley 1a35e3be12 Removed comments and added variable reset 2021-03-17 00:48:24 +02:00
Kyle Bradley 73aea2426b Style fixes 2021-03-17 00:33:48 +02:00
Kyle Bradley 4afe62a596 Updated to include penalty, cooldown and timeout 2021-03-17 00:31:16 +02:00
Kyle Bradley 0b6da7ece1 Applied community feedback.
- Always show global /top5
2021-03-15 15:38:53 +02:00
def 9f58b0f608 Set search field active when opening vote menu ingame
As suggested by RafaelFF
2021-03-14 19:57:23 +01:00
Jupeyy 331ee9aa56 Center tees in more places 2021-03-12 21:23:29 +01:00
def 5350f98e8d Fix automapper crash (fixes #3675)
Thanks to bojidar-bg for the way to fix, verified locally
2021-03-11 20:31:45 +01:00
Kyle Bradley 6ed2b2277d Added break on primary message while still processing subsequent 2021-03-11 09:20:26 +02:00
heinrich5991 f694dd68e9 Don't bypass the anti-spam system
Quick-fix for
https://github.com/ddnet/ddnet/pull/3669#issuecomment-794805243.

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


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

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

## Checklist

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


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

to show ban message more accurately when player gets globally banned

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2021-03-09 21:41:23 +00:00
Kyle Bradley c79f874c54 Removd unusual characters and added a base dash to mirror previous implementation 2021-03-09 18:41:48 +02:00
Kyle Bradley 0a183673c5 Hide local when there are duplicates 2021-03-09 18:27:25 +02:00
bors[bot] e2cb24b7d9
Merge #3669
3669: Local ranking info viewable in-game r=def- a=houseme-kyle

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

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

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

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

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

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

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

## Checklist

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


Co-authored-by: houseme-kyle <kyle@houseme.co.za>
Co-authored-by: Kyle Bradley <kyle@house.me>
Co-authored-by: = <=>
2021-03-08 22:51:05 +00:00
Jupeyy af2e19c4e7 Add color for non chat(binds, ghost, client, demo) 2021-03-08 18:39:25 +01:00
Kyle Bradley b1e200df88 Formatted player.cpp using ClangFormat 2021-03-08 15:56:20 +02:00
Kyle Bradley 8957005f48 Kept rank spam protection 2021-03-08 15:33:26 +02:00
Kyle Bradley ecf70319fc Fixed formatting issues 2021-03-08 14:53:35 +02:00
Jupeyy 853e00ed15 More colors from chat in console 2021-03-08 01:20:28 +01:00
= 380664aae4 PR feedback 2021-03-08 00:41:48 +02:00
= f6ddfe830d Added PR feedback:
- Server name included in output
- Better output for unranked local
2021-03-08 00:39:11 +02:00
def 9ea88f1197 Remove 45° aim too 2021-03-07 23:12:57 +01:00
def fb8f689460 Remove deepfly binds (fixes #3667)
Anyone have a better idea?
2021-03-07 23:11:53 +01:00
def e5bcac3ca2 std::max -> maximum 2021-03-07 11:14:37 +01:00
def 9e009e280d Support localizing discord link
link to http://chat.teeworlds.cn/ for Simplified Chinese

Maintained by TsFreddie, KaiHei is a Chinese Discord clone
2021-03-05 17:29:18 +01:00
Kyle Bradley f950f27424 Formatting fixes 2021-03-03 16:50:43 +02:00
Kyle Bradley 50966f04e1 Updates config variables 2021-03-03 16:49:11 +02:00
Kyle Bradley ef1b30661e Add local rank and top 5 2021-03-03 15:23:18 +02:00
Kyle Bradley d276005697 Fixed missing variable 2021-03-02 21:42:53 +02:00
Kyle Bradley 2c11fedfb0 - Added name to message
- Fixed format issue
2021-03-02 16:35:29 +02:00
bors[bot] 8e4e4940d2
Merge #3664
3664: Add initial delay to talking in chat r=heinrich5991 a=Learath2

<!-- What is the motivation for the changes of this pull request -->
This adds a delay before one can chat. It should help mods in situations where people are spamming chat
## Checklist

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


Co-authored-by: Learath2 <learath2@gmail.com>
2021-03-01 20:10:14 +00:00
Learath2 f1af68dff9 Add initial delay to talking in chat 2021-03-01 20:37:07 +01:00
bors[bot] 7be0f30037
Merge #3665
3665: Add a way to block people from chatting on vpns r=def- a=Learath2

<!-- What is the motivation for the changes of this pull request -->
Another tool that should help moderators
## Checklist

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


Co-authored-by: Learath2 <learath2@gmail.com>
2021-03-01 19:27:43 +00:00
Learath2 5f50d1dc57 Add a way to block people from chatting on vpns 2021-03-01 19:54:59 +01:00
Jupeyy 7e00407659 Fix chat repeated messages 2021-03-01 18:35:06 +01:00
heinrich5991 9f41b5d910 Fix /mapinfo displaying a time when not having finished
The C API doesn't return 0.0f for NULL values, check for them
explicitly.

Fixes #3653.
2021-03-01 00:37:38 +01:00
Kyle Bradley 44bd43f38b Fixed for formatting check 2021-03-01 00:47:22 +02:00
Kyle Bradley 894885eef0 Removed space 2021-03-01 00:40:59 +02:00
Kyle Bradley cf7fb72dbf - Added timeout penalty
- Applied PR feedback
2021-03-01 00:37:49 +02:00
Kyle Bradley 94dbae981f Added swap functionality to server client:
- New chat command
- Swaps character's position with other tee using existing Save/Load methods.
2021-02-28 18:35:35 +02:00
heinrich5991 dd964316cb Fix duplicate teamranks getting inserted
There was a logic error that caused the loop to never execute.
2021-02-27 22:35:44 +01:00
heinrich5991 bdcabe8a2d Fix ": " being included in "*** : abc" server messages 2021-02-27 16:21:42 +01:00
heinrich5991 61b46746d7 Fix /times query by reordering fields
Pull request #3630 started showing the countries where ranks are from,
but created a mismatch between the two queries, one selected

Time, Ago, Stamp

the other

Time, Ago, Stamp, Name, Server

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

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

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

Also remove exceptions from database code.

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

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

## Checklist

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


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

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

Co-authored-by: Jordy Ruiz <jordy.ruiz@univ-lille.fr>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-02-23 19:36:52 +03:00
Alexander Akulich 2790270abf Adopt upstream refactoring: Mark several functions as 'const' 2021-02-23 18:26:16 +03:00
Alexander Akulich dfc75806c6 CGameContext::SendVoteStatus: Hide the trick for 64 clients
as an implementation detail. This way the caller is synced with the upstream
and does not care about 64 players.
2021-02-23 18:26:16 +03:00
Alexander Akulich 688f11ef34 Move DDRace-specific player initialization code to the Controller 2021-02-23 18:26:16 +03:00
Alexander Akulich b0c0fb316c Get rid of gamemode.h with confusing definitions
We also have GAME_NAME macro in game/version.h and the macros
from gamemode are not used anywhere else.
2021-02-23 18:26:16 +03:00
Alexander Akulich a6bdda60ed GameController: Add OnPlayerConnect() like in the upstream 2021-02-23 18:26:16 +03:00
Alexander Akulich a9bc6190eb CGameControllerDDRace: Add Score() getter 2021-02-23 18:26:16 +03:00
Alexander Akulich ef6282d2e0 Replace remaining int64_t by int64 for the sake of consistency
The codebase uses int64 since commit f4344dc420.
2021-02-23 18:26:16 +03:00
Jupeyy 05dfc51770 Fix scoreboard overlapping 2021-02-21 12:58:45 +01:00
bors[bot] 141a738ba6
Merge #3634
3634: Fix zoom (fixes #3619) r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-02-20 22:24:46 +00:00
def 85aff4362a Version 15.3.2 2021-02-20 23:15:26 +01:00
def b2abbb54b5 Fix zoom (fixes #3619) 2021-02-20 23:15:07 +01:00
bors[bot] daf13cb85a
Merge #3630
3630: /times: Show country rank is from r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-02-20 22:09:30 +00:00
def 660d23adac /times: Show country rank is from 2021-02-20 23:07:02 +01:00
def 2efbd53cbc Version 15.3.1 2021-02-20 22:39:53 +01:00
bors[bot] a73bf0e9bd
Merge #3606 #3617 #3628 #3631
3606: Remove gfx_show_warnings r=heinrich5991 a=def-

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

## Checklist

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


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

Thanks to @rffontenelle for the Brazilian Portuguese translation update.

## Checklist

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


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

As reported by texnonik on Discord

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

## Checklist

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


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

As reported by Anoian

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
2021-02-20 16:46:00 +00:00
bors[bot] 71477de816
Merge #3581
3581: Improve performance of /top5points query, remove negative /top5points since it makes no sense anyway r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-02-20 16:36:20 +00:00
def 82f762c5ac Prevent editor crash when setting image to None
As reported by Anoian
2021-02-19 15:43:41 +01:00
bors[bot] 1ac07fe797
Merge #3626
3626: Rename save/load to conform to the code style r=def- a=Zwelf

Small cleanup

## Checklist

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


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

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

## Checklist

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


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

Fix #3599.

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

## Checklist

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


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

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

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

As reported by ReD

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

## Checklist

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


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

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

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


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

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

As reported by louis
![screenshot-20210131@202748](https://user-images.githubusercontent.com/2335377/106395490-cc959780-6402-11eb-8217-77c026ce2b4f.png)

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

## Checklist

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



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

As reported by fokkonaut

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

## Checklist

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


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

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

Supersedes #3439.

## Checklist

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


3559: Don't highlight us if we have no name (alternative fix for #3554) r=heinrich5991 a=def-

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

## Checklist

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


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

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

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

## Checklist

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


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

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

## Checklist

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


Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Zwelf <zwelf@strct.cc>
2021-01-31 14:37:48 +00:00
Zwelf 80df59ba5a Clarify teehistorian code 2021-01-28 23:42:01 +01:00
Zwelf 04e8ce56a9 Record exact tick where load/save result is returned 2021-01-28 22:50:15 +01:00
Zwelf cd407a08a8 Fix teehistorian PLAYER_INPUT message position
Previously the message was recorded when incoming. But the time when the input
should apply wasn't recorded.
Now inputs are recorded right before they get applied in the game world.
2021-01-28 22:50:00 +01:00
Dennis Felsing 243f330e3c
Merge pull request #3550 from def-/pr-revert-freeze-rescue
Revert "rescue on freeze/dfreeze"
2021-01-28 18:53:07 +01:00
bors[bot] b08b93ee73
Merge #3556
3556: Don't highlight echo messages (fixes #3554) r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-28 14:37:20 +00:00
def af8b306dfb Don't highlight us if we have no name 2021-01-28 15:36:30 +01:00
def 487bd18a39 Log duplicate messages in console
As reported by fokkonaut
2021-01-28 11:32:38 +01:00
def c30b596dab Don't highlight echo messages (fixes #3554) 2021-01-28 11:21:55 +01:00
def cbf5aa6e36 Reset filter: Refresh browser in DDNet/KoG tabs
so that countries/types is also updated
2021-01-27 19:24:10 +01:00
heinrich5991 43998ce41a Replace projectile hack with a new extended snapshot object
Still send the old hack to old clients, still accept the old hack from
old servers. This is so F-Client can support DDNet servers without such
hacks.
2021-01-26 20:58:42 +01:00
def f2cf038248 Revert "rescue on freeze/dfreeze"
This reverts commit 28cf3b31ba.
2021-01-26 14:44:01 +01:00
def e16dd5c1d2 HTTP Map Download: Time out faster
Since our maps2.ddnet.tw doesn't work well for players in China
2021-01-26 00:19:19 +01:00
bors[bot] a3ae016177
Merge #3531
3531: Add set_view camera position command r=heinrich5991 a=ChillerDragon

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

## Checklist

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


Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2021-01-25 11:46:32 +00:00
bors[bot] aa43e329b6
Merge #3538
3538: Improve error messages when you can't join team r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-25 11:35:39 +00:00
bors[bot] f5280919f1
Merge #3541
3541: rank/teamrank: Display how much better you are r=def- a=def-

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

## Checklist

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


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

Message is displayed when saving with an active hook

## Checklist

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


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

Fixed all the merges and clang-format (hopefully)

## Checklist

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


Co-authored-by: Vlad <gerdoexx@gmail.com>
2021-01-24 00:07:31 +00:00
def b28cdc933a rank/teamrank: Display how much better you are 2021-01-23 23:19:45 +01:00
ChillerDragon 9a3e8bb0a2 Add set_view camera position command 2021-01-23 17:36:35 +01:00
Zwelf a3702e8314 Inform player about possibility to keep the hook when loading
Message is displayed when saving with an active hook
2021-01-23 16:49:50 +01:00
bors[bot] a176990649
Merge #3537
3537: Fix condition for eye emote (fixes #3536) r=Learath2 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-23 14:53:00 +00:00
def d39a17933d Improve error messages when you can't join team 2021-01-23 15:52:57 +01:00
def 4eeb14d2f4 Fix condition for eye emote (fixes #3536) 2021-01-23 12:04:14 +01:00
bors[bot] 14e70506e1
Merge #3535
3535: Fix a possible race in load code  r=def- a=heinrich5991

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

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

## Checklist

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


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

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

Thanks to ReD for report

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-22 17:31:35 +00:00
bors[bot] 77a9f41268
Merge #3530
3530: Improve ClShowDistance a bit r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-22 17:16:37 +00:00
def 23c145d760 Improve ClShowDistance a bit 2021-01-21 17:07:07 +01:00
bors[bot] 5d927f35b6
Merge #3502
3502: Some (mostly backported) refactor r=Learath2 a=Kaffeine

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

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

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

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

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

## Checklist

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


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

Do we want average too or just median?

## Checklist

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


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

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

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

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

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

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

Add a new extended message that mirror the old `Sv_TeamsState`.
2021-01-12 01:38:23 +01:00