Commit graph

3725 commits

Author SHA1 Message Date
def 5acf6e77da Fix spacing in HUD settings for 5:4 resolution 2021-11-07 11:39:22 +01:00
trml 8db53f2a03 Fix sort comparator 2021-11-07 11:00:48 +01:00
Jupeyy d0b634216c Don't set cursor on empty text 2021-11-06 23:34:44 +01:00
Jupeyy d4dd3e6969 Use delete[] for m_pSwitchers 2021-11-06 18:12:07 +01:00
trml ae8ccdf97a Don't send entityex to old clients or for stationary pickups 2021-11-06 12:13:42 +01:00
def 4ddb553355 Fix snd_chat and snd_team_chat (fixes #4302) 2021-11-05 17:00:39 +01:00
Jupeyy 6a98fd163b Reset selection, if gui element was changed outside of DoEditBox 2021-11-03 00:46:36 +01:00
Jupeyy cc87d49c9b Reset text color after kill messages are created 2021-10-29 00:11:21 +02:00
trml 4a8f18c322 Use correct (larger) m_NumSwitchers bound 2021-10-26 16:16:34 +02:00
bors[bot] 5df2febd58
Merge #4245
4245: Further fixes for cpu/zoom on large maps with entityex r=def- a=trml

Attempt to fix #4244

Added network clipping to entity ex for projectiles and pickups, and made snapping of gamecontroller happen before gameworld (as suggested in #4236), which should help when zooming out on large maps in general (where the number of entities exceeds the maximum number of snap items).

Also added bounds checks for switchers in the client.

## 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: trml <trml@users.noreply.github.com>
2021-10-26 09:50:51 +00:00
Jupeyy 4af9bc7123 Fix mouse select position in console when using different page 2021-10-26 00:16:52 +02:00
trml e2dbba3146 Network clipping for entityex in CPickup and CProjectile, snap gamecontroller before gameworld, bound checks for switchers in client 2021-10-25 02:34:28 +02:00
Jupeyy c7ae79aec5 Minimal changes from mouse state change: fix editor & input 2021-10-23 14:24:52 +02:00
Jupeyy 0d17665137 Revert "Add new mouse state"
This reverts commit e4cb348db2.
2021-10-23 13:48:21 +02:00
trml 85a99d174d Preprocess snap items to make getting EntityEx faster 2021-10-22 00:40:17 +02:00
def 663eea9cab Fix pasting crash in edit box (fixes #4230)
Don't allocate string with -1 size
2021-10-19 13:49:33 +02:00
bors[bot] fce6776c38
Merge #4095 #4176
4095: [Concept] Add new mouse state (ingame mouse) r=def- a=Jupeyy

This would remove ui_mousesense and use the desktop cursor position instead for menus and editor
This would also fix the editor cursor to not move faster than in menus.
That's probably how most games would handle menus, instead of using relative mouse mode
And this would work for touch inputs.

The normal gameplay relative mouse is ofc NOT affected by any kind

Opinions?

Missing:
- [x] m_MouseSlow in menus
- [x] Make desktop cursor invisible
- [x] Some components that use ui mouse
- [x] Remove focus in/out relative mouse state changes, fixed with next SDL version


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


4176: Entity switch prediction r=def- a=trml

Adds the prediction for pickups and projectiles (based on #4108)

For blinking entities (deactivated by switch) I also used the extended info to make the blinking effect happen client-side. So instead of the server omitting the projectile/pickup from the snapshot every N ticks (which prevented some things like explosive bullets from being predicted correctly), the server will keep sending the item and let the client decide how to show it.

Added doors as well, and changed how they are sent (and rendered) in a similar way (by always sending both endpoints and using a fixed m_StartTick instead of updating it every tick).

An idea was that this could potentially reduce network traffic a bit (in addition to helping with prediction), especially for stationary items that are rarely/never have to be updated (doors and pickups).

This makes CItems::OnRender a bit more complex, and it could perhaps be cleaned up some way (either using something like CProjectileData, or by moving more of the logic into RenderProjectile/Laser/Pickup).

Some things missing:
- Add more entities (draggers, light, gun)
- Entities are not correctly shown when in super (e.g. doors are shown as closed, and should be open)

## 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: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: trml <trml@users.noreply.github.com>
2021-10-16 16:38:18 +00:00
Jupeyy f20965257f Old chat wrapping for old chat mode 2021-10-15 14:31:52 +02:00
trml 71e5b7ed3a Fix switch state for super, cleanup door snapping, add dragger/gun/light 2021-10-14 22:59:39 +02:00
Jupeyy ad1b45d3a6 Add missing intialize values 2021-10-07 21:18:55 +02:00
Jupeyy e4cb348db2 Add new mouse state 2021-10-07 16:48:25 +02:00
bors[bot] 73de789e90
Merge #4188
4188: Add option to highlight self in kill messages r=heinrich5991 a=Azorlogh

Motivation: #4186

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

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

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

![in_game](https://user-images.githubusercontent.com/17968319/135732347-6e9cf148-29b8-4fc4-8dba-647e049f961a.png)

## Checklist

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


Co-authored-by: Azorlogh <bott.alix@gmail.com>
2021-10-06 15:27:25 +00:00
bors[bot] 43e69905bc
Merge #4157
4157: invalidate texture when unloading a texture. r=heinrich5991 a=ChillerDragon

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

(cherry picked from commit 23a1b80f60)

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

## Checklist

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


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

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

This drops the remaining X11 dependency.

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

## Checklist

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


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

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: Zwelf <zwelf@strct.cc>
2021-10-06 14:52:39 +00:00
Azorlogh 7552bfd05c set defaut highlight color in kill message to white 2021-10-05 18:52:58 +02:00
Azorlogh 40ab93c592 capitalize Color & remove superfluous toggle 2021-10-05 18:48:08 +02:00
Azorlogh 72ab66997a use m_LocalClientID instead of m_pLocalInfo->m_ClientID 2021-10-05 14:09:31 +02:00
Azorlogh 5e98fa93b9 null check pLocalInfo 2021-10-05 11:25:50 +02:00
Jupeyy fd68cc3a05 Add basic selection support for ui ex edit boxes 2021-10-04 19:58:25 +02:00
Jupeyy 3c1e0fe663 Use SDL_FlashWindow to request user's attention 2021-10-04 19:21:36 +02:00
Azorlogh 96f25d32cb fix default colors 2021-10-02 23:25:36 +02:00
Azorlogh bb8d746bff remove unneeded variable 2021-10-02 23:21:34 +02:00
Azorlogh 07b85a286b highlight self in kill messages 2021-10-02 23:15:59 +02:00
bors[bot] 560d2ad1a3
Merge #4166
4166: Update default tune zone, when no local character is alive and tune zones don't exist r=heinrich5991 a=Jupeyy

fixes #4140

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2021-09-27 20:55:07 +00:00
bors[bot] a53cde8b4c
Merge #4183
4183: Fix nullptr when using Config() in components r=heinrich5991 a=ChillerDragon

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

## 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-27 19:56:53 +00:00
ChillerDragon a5ae3bf869 Fix nullptr when using Config() in components 2021-09-27 21:37:20 +02:00
BloodWod-513 7dc228471e add ctrl+backspace for ingame console 2021-09-27 18:46:44 +05:00
Robert Müller 6ee5dd24a5 use constructor consistently for colors 2021-09-25 09:50:11 +02:00
Robert Müller 3d412646a0 add CUI::MapScreen convenience method 2021-09-22 21:48:55 +02:00
trml f0bd4cf5fa Send EntityEx for doors as well 2021-09-19 20:48:50 +02:00
trml 8448f9ef04 Predict switch projectiles and pickups, make blinking effect client-side 2021-09-19 14:14:00 +02:00
Jupeyy 5dee9a3833 Always update default tune zone 2021-09-15 23:27:16 +02:00
bors[bot] 79dbbe2ee2
Merge #4151
4151: Copy ingame console like in ATH r=def- a=BloodWod-513

The idea is taken from the implementation of this in ATH client
<!-- What is the motivation for the changes of this pull request -->

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: BloodWod-513 <dayn_2013@mail.ru>
2021-09-15 21:22:04 +00:00
bors[bot] f2dd9a0ab3
Merge #4167
4167: Update world config even if the local character is dead r=Jupeyy a=heinrich5991

Interesting for weapons etc.

<!-- 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-09-15 18:33:43 +00:00
BloodWod-513 4317c43c6b Console copy string 2021-09-15 19:47:01 +02:00
heinrich5991 b7fe9b112c Clear game info on connect
Previously, the old game info persevered into the next server.
2021-09-15 16:22:50 +02:00
heinrich5991 ca2d85107e Update world config even if the local character is dead
Interesting for weapons etc.
2021-09-15 16:05:30 +02:00
ChillerDragon de4e1ea644 Merge UnloadTexture with UnloadTextureNew 2021-09-15 13:19:54 +02:00
Jupeyy 9deac14667 Use gametick as int for emoticon calculation, add the fraction seperately 2021-09-15 01:06:30 +02:00
Jupeyy 4982f8536e Fix shift + tab selecting second last index in console, player name chat & command chat 2021-09-14 13:15:09 +02:00
Jupeyy 1e07a00c3b Refactor CUIElements 2021-09-14 00:21:20 +02:00
Jupeyy 7f5ca0ffe1 Small graphic refactoring 2021-09-14 00:21:17 +02:00
bors[bot] 18eabe0038
Merge #4158
4158: Make emoticons smoother r=heinrich5991 a=Jupeyy

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

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

fixes #4156

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2021-09-13 15:51:04 +00:00
Jupeyy c06edd9aeb Update server list silently 2021-09-13 16:50:40 +02:00
heinrich5991 91b60e6981 Make emoticons smoother 2021-09-13 16:26:48 +02:00
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] 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
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] 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
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] 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
fokkonaut 73a21cab62 Fix specchar transparency and move spec-char to character snap 2021-08-29 03:04:22 +02:00
def 9dd65b4dce Fix offset of strong symbol in nameplate
As reported by Skeith
2021-08-27 15:46:55 +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
fokkonaut 69fe35f288 Send switch states per team and cleanup 2021-08-23 23:26:36 +02: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
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
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
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
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
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
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
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
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
BloodWod 49686d81be delete hud and config variables 2021-07-25 01:22:36 +05:00
BloodWod f66abb79bf Added color for strong and weak states 2021-07-20 22:39:44 +05: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 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
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
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
Jupeyy cd68b4608e Make calculation which sets mouse pos safer 2021-06-06 23:38:11 +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] 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
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 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
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
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
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
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] 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
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
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
Jupeyy 0012e72d34 Add console chain for assets, reload current asset on reload button click 2021-04-11 14:34:08 +02:00
Jupeyy 7c992e296a Center more tees 2021-04-09 20:11: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
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 9a0243821a Fix scrolling in controls settings with ui_scale < 100 (fixes #3727) 2021-03-23 23:16:28 +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
Arda Demir 2aefdf2a5e Add dummy_reset and remove +resetdummy 2021-03-17 18:09:39 +03: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
Jupeyy af2e19c4e7 Add color for non chat(binds, ghost, client, demo) 2021-03-08 18:39:25 +01:00
Jupeyy 853e00ed15 More colors from chat in console 2021-03-08 01:20:28 +01: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 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
Jupeyy 7e00407659 Fix chat repeated messages 2021-03-01 18:35:06 +01:00
heinrich5991 bdcabe8a2d Fix ": " being included in "*** : abc" server messages 2021-02-27 16:21:42 +01:00
Jupeyy 33b75bde9a Make statboard work with up to 32 players 2021-02-26 12:46:32 +01:00
Alexander Akulich 2790270abf Adopt upstream refactoring: Mark several functions as 'const' 2021-02-23 18:26:16 +03:00
Jupeyy 05dfc51770 Fix scoreboard overlapping 2021-02-21 12:58:45 +01:00
def b2abbb54b5 Fix zoom (fixes #3619) 2021-02-20 23:15:07 +01:00
bors[bot] a73bf0e9bd
Merge #3606 #3617 #3628 #3631
3606: Remove gfx_show_warnings r=heinrich5991 a=def-

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

## Checklist

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


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

Thanks to @rffontenelle for the Brazilian Portuguese translation update.

## Checklist

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


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

As reported by texnonik on Discord

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

## Checklist

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


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

As reported by Anoian

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
2021-02-20 16:46:00 +00:00
Jupeyy 00e22d8d14 Fix chat refind skins 2021-02-15 15:15:21 +01:00
bors[bot] 2b29a9a0c8
Merge #3610
3610: Fix top time not being displayed on old servers r=def- a=heinrich5991

Fix #3599.

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

## Checklist

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


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

(Forgot to check for both NETMSG_RECORD and NETMSG_RECORDLEGACY in one
place.)
2021-02-11 23:33:50 +01:00
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 15220d4545 Fix button presses after esc after color picker usage (fixes# 3575) 2021-02-01 23:49:44 +01:00
def 5e4481d9cc Fix color picker positioning (fixes #3574) 2021-02-01 19:34:41 +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
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
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
ChillerDragon 9a3e8bb0a2 Add set_view camera position command 2021-01-23 17:36:35 +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
def cd8e67df66 Handle switch number 0
Thanks to ReD for report
2021-01-20 20:00:25 +01:00
trml 34d80e65c8 Don't predict input from the dummy when it is paused 2021-01-18 23:55:13 +01: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 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 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
bors[bot] d0cdf23526
Merge #3493 #3497
3493: Keep showing last checkpoint after kill r=heinrich5991 a=def-

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

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

## Checklist

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


3497: No network clip in client prediction r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-11 20:21:44 +00:00
def f9aae5d53a No network clip in client prediction 2021-01-11 18:02:52 +01:00
def 9033968518 Freeview mouse moves faster when zoomed out (fixes #3459) 2021-01-11 17:54:33 +01:00
def 95e4418026 Keep showing last checkpoint after kill
Some maps kill you quickly and you can't see how good your last run was,
for example "Buckle Up".
2021-01-11 14:09:37 +01:00
bors[bot] e0d6fa4670
Merge #3476 #3484
3476: Indicate strength of hook in nameplates r=heinrich5991 a=def-

off by default, cl_nameplates_strong 1 to enable

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

![screenshot-20210105@142505](https://user-images.githubusercontent.com/2335377/103651612-2b7e0300-4f62-11eb-8b45-09b8b125f2a6.png)

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

## Checklist

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


3484: Fix up/down keys in demo browser r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2021-01-10 16:57:26 +00:00
bors[bot] 124c4b1acf
Merge #3463
3463: Dynamically size scoreboard title r=heinrich5991 a=def-

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

## Checklist

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


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

See commits:
    de5859b371
    78076761eb
2021-01-10 17:10:19 +03:00
def 52616a5f35 Fix unused variable warnings 2021-01-08 11:43:26 +01:00
Дядя Женя afb4ce5fc7 Revert horizontal sliders 2021-01-08 11:43:26 +01:00
Дядя Женя 7d576c41b4 H Slider 2021-01-08 11:43:26 +01:00
Дядя Женя eb796c6b5c More fixes 2021-01-08 11:43:26 +01:00
Дядя Женя 38e6878c48 Temp fixes for controls 2021-01-08 11:43:26 +01:00
Дядя Женя b8ba2b226a Sliders 2021-01-08 11:43:26 +01:00
Дядя Женя aefcbf812d Vertical sliders and lists 2021-01-08 11:43:24 +01:00
def 83b5601d62 Fix up/down keys in demo browser 2021-01-07 10:42:13 +01:00
def 143985a68e Indicate strength of hook in nameplates
only shown in debug mode (ctrl-shift-d)
2021-01-05 19:32:53 +01:00
def 088420459f Fix scrollbar going out of bounce (fixes #3416) 2021-01-04 19:16:38 +01:00
def 992683c772 Dynamically size scoreboard title 2020-12-31 10:13:53 +01:00
bors[bot] 871fd94531
Merge #3448 #3449
3448: Same default map as in autoexec_server.cfg r=Jupeyy a=def-

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

## Checklist

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


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

as reported by louis

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-12-29 15:11:47 +00:00
bors[bot] b1531642cd
Merge #3458
3458: Respect possible particle size increase, of worst case rotation r=def- a=Jupeyy

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

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


## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-12-29 15:02:20 +00:00
Jupeyy bce1f45a2b Respect possible particle size increase, of worst case rotation 2020-12-29 15:58:05 +01:00
Jupeyy 288a18fa95 Don't render fully transparent quads 2020-12-29 14:59:17 +01:00
bors[bot] 505656313c
Merge #3451
3451: Add New Year season theme by mind and use for 2 days r=Learath2 a=def-

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

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

![screenshot_2020-12-28_14-51-48](https://user-images.githubusercontent.com/2335377/103228624-83e54d00-4931-11eb-96fd-c408a353cda0.png)

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-12-29 13:12:13 +00:00
Jupeyy 30d089b45c Readd round start tick to the calculation 2020-12-29 03:08:28 +01:00
def 59f1c2cbe6 Add New Year season theme by mind and use for 2 days
Map reduces my FPS from 60 to 45, mind can't optimize it further.

I'd release this as 15.2.5 in 1-2 days ideally with no other new changes in.
2020-12-28 17:45:04 +01:00
def ff2d2f6fc4 Fix x of y servers
as reported by louis
2020-12-28 08:56:55 +01:00
def 98aec6bffc Fewer repetitions 2020-12-27 10:57:50 +01:00
def 21886f2741 Fix spacing of cl_show_ids by using figure space (U+2007) 2020-12-27 01:19:36 +01:00
def 89e2371b9b Improve some chat settings 2020-12-27 01:14:34 +01:00
Jupeyy 2ea2d67b56 Only render visible particles 2020-12-23 14:55:49 +01:00
Jupeyy f21687a927 remove unused chains 2020-12-22 19:25:32 +01:00
bors[bot] 440337eb5c
Merge #3384 #3437
3384: Add w as default bind for dummy hammer r=heinrich5991 a=def-

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

## Checklist

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


3437: Update .clang-tidy file to 11 r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-12-22 11:40:35 +00:00
def 93a0dc3eee Add more commonly used binds
from https://forum.ddnet.tw/viewtopic.php?t=2537
2020-12-22 12:36:01 +01:00
bors[bot] 0b2eda2bd9
Merge #3434
3434: Add F-DDrace entities r=heinrich5991 a=fokkonaut



## Checklist

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


Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2020-12-22 11:31:56 +00:00
fokkonaut d4c4031f20 Add F-DDrace entities 2020-12-22 12:23:21 +01:00
bors[bot] 8a15bc15d5
Merge #3417 #3419 #3432
3417: Notify about vote when authed r=heinrich5991 a=def-

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

## Checklist

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


3419: Only assign aOldName when we need it r=heinrich5991 a=def-

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

## Checklist

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


3432: Fix localization of version/game type/ping in server details r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-12-22 10:55:34 +00:00
def 57b1311b4b Fix localization of version/game type/ping in server details 2020-12-21 12:17:07 +01:00
bors[bot] f190e529b6
Merge #3427
3427: Remove hardcoded zoom level r=def- a=Jupeyy

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-12-20 22:13:17 +00:00
bors[bot] f6ef42ce0d
Merge #3430
3430: Filter invalid kill messages r=def- a=Jupeyy

Fixes #3429

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-12-20 22:02:56 +00:00
Jupeyy cedb3e0b1f Filter invalid kill messages 2020-12-20 20:25:42 +01:00
Jupeyy 56d81678bd Remove hardcoded zoom level 2020-12-20 18:32:16 +01:00
Дядя Женя b745feec73 Format 2020-12-18 23:35:22 +03:00
Дядя Женя 2c3d24d5b3 Merge branch 'pr_color_picker' of https://github.com/Banana090/ddnet into pr_color_picker 2020-12-18 23:29:52 +03:00
Дядя Женя b57d934b69 Polish 2020-12-18 23:28:33 +03:00
def fc75e95e35 Merge branch 'master' into pr_color_picker 2020-12-18 19:13:51 +01:00
def 6586ab20bc Play highlight sound on vote too when authed 2020-12-18 18:38:12 +01:00
def 567f0aa6d4 Notify about vote when authed 2020-12-18 12:58:01 +01:00
Дядя Женя 9d77b8f716 Discard unnesaccery changes 2020-12-16 07:59:45 +03:00
Дядя Женя f4b8033056 Fixes 2020-12-16 07:55:41 +03:00
bors[bot] c564d788ad
Merge #3402
3402: Move PNG loading in SkinDL to fetch thread (fixes #3398) r=Jupeyy a=def-

Sorry for the trouble, seems to work.

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-12-15 15:09:44 +00:00
Дядя Женя d80cdd20d4 Fix merge conflicts 2020-12-14 22:18:00 +03:00
Дядя Женя ebee286f00 Another attempt to fix Lin & Mac build 2020-12-14 04:49:24 +03:00
Дядя Женя c084c9cde2 Fix Mac & Linux build 2020-12-14 04:18:04 +03:00
Дядя Женя 77f84ac831 Ready 2020-12-14 03:51:31 +03:00
def 82faad33e9 Fix clang-format 2020-12-13 19:31:37 +01:00
Дядя Женя 9b4dfc142a Merge branch 'master' into pr_color_picker
# Conflicts:
#	src/game/client/components/chat.h
#	src/game/client/components/menus_settings.cpp
2020-12-13 20:40:33 +03:00
Дядя Женя e234776de2 Merge branch 'master' into pr_animations_hud 2020-12-13 20:34:53 +03:00
bors[bot] 483e7b2624
Merge #3403
3403: Allow resizing on Windows too r=def- a=Jupeyy

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

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



## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-12-13 10:23:04 +00:00
Jupeyy bae42b9284 Recreate kill messages if required 2020-12-13 01:08:34 +01:00
Jupeyy cafd1a4e8f Allow windows resizing 2020-12-13 00:52:57 +01:00
def cd00c4c04b Move PNG loading in SkinDL to fetch thread (fixes #3398)
Sorry for the trouble, seems to work.
2020-12-13 00:08:46 +01:00
def 2544c758a0 Add w as default bind for dummy hammer 2020-12-08 14:42:22 +01:00
bors[bot] b8fca40851
Merge #3340
3340: Fix vec_base constructors & remove useless operator r=heinrich5991 a=Jupeyy

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-28 17:06:25 +00:00
Jupeyy c0dbd4a6f5 Fix leak, initialize UI Element Rect 2020-11-25 13:11:34 +01:00
def bb43660cd4 Fix scroll bar (fixes #3347) 2020-11-21 18:30:24 +01:00
Jupeyy f83d528f5d Fix vector constructor impl & remove useless operator 2020-11-20 12:14:33 +01:00
def d618c8e1e1 Fix assets menu
Multiple assets would be highlighted

Bug introduced in https://github.com/ddnet/ddnet/pull/3304
2020-11-19 18:11:00 +01:00
bors[bot] b138c4038c
Merge #3304 #3310
3304: Improve list box behaviour, make it more consistent r=heinrich5991 a=def-

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

## Checklist

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


3310: Found some more times with mins, use hours for consistency r=heinrich5991 a=def-

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-18 23:43:22 +00:00
bors[bot] 38d0bf3c40
Merge #3325
3325:  Add ball effects, even for invalid projectiles r=heinrich5991 a=Jupeyy

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

fixes #3323

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-18 23:35:00 +00:00
Jupeyy 2a7ba8fe30 Add ball particles, even for invalid projectiles 2020-11-18 14:48:18 +01:00
Jupeyy c989cd67f9 Check skin/sprite images for correctness 2020-11-18 07:59:15 +01:00
bors[bot] 6e5d0cce6f
Merge #3321
3321: Mod by zero r=def- a=Jupeyy

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-17 17:08:04 +00:00
Jupeyy 6cefbcbbf9 Mod by zero 2020-11-17 18:01:23 +01:00
bors[bot] 39f4e94ba2
Merge #3312
3312: DoEditBox clamp cursor position r=def- a=TsFreddie

Fix freezing with DoEditBox
Pretty small patch but seems to be working
Also removed the linewidth limit in DoEditBox to avoid multiline

fixes #3256

## Checklist

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


Co-authored-by: Freddie Wang <tsfreddiewang@gmail.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-17 11:19:28 +00:00
Jupeyy fbf0aedfb2 Fix statboard rendering 2020-11-15 09:06:03 +01:00
Jupeyy e2be287827 numeric robustness 2020-11-15 07:40:24 +01:00
Jupeyy 51a31774f8 Don't trigger text alignment for editboxes 2020-11-15 07:15:38 +01:00
Freddie Wang d31397ade4 doeditbox 2020-11-15 13:24:18 +08:00
bors[bot] d80d1df0db
Merge #3297 #3305 #3307
3297: Fix memleak in CServer on instant shutdown r=Jupeyy a=def-

```
Direct leak of 566869 byte(s) in 1 object(s) allocated from:
    #0 0x4f28e3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f28e3)
    #1 0x55b3c9 in CServer::LoadMap(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:2312:49
    #2 0x55bfdd in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2351:6
    #3 0x56add2 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3553:21
    #4 0x7f54401cd09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
```

## Checklist

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


3305: DemoRecorder: Only remove existing filenames r=Jupeyy a=def-

As noticed by Jupstar

## Checklist

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


3307: Don't crash with debug mode in demo r=Jupeyy a=def-

Since character doesn't exist then. Reported by murpi

Originally introduced in https://github.com/ddnet/ddnet/pull/2578

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-13 10:31:20 +00:00
bors[bot] 5602d3e9fb
Merge #3306
3306: Respect friend color in spectate mode ♥ too r=Jupeyy a=def-

As suggested by Cøke
![screenshot_2020-11-12_19-17-01](https://user-images.githubusercontent.com/2335377/98979616-d7cfda00-251b-11eb-857d-b592655ef538.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-13 10:20:08 +00:00
def 81bb7e661c Improve list box behaviour, make it more consistent
Make keys work after searching in vote menu

Unify some duplicated code
2020-11-13 08:03:34 +01:00
def 0c416df935 Respect friend color in spectate mode ♥ too
As suggested by Cøke
2020-11-13 07:44:25 +01:00
def 7aa6be9e12 Don't crash with debug mode in demo
Since character doesn't exist then. Reported by murpi

Originally introduced in https://github.com/ddnet/ddnet/pull/2578
2020-11-12 22:56:50 +01:00
Jupeyy 0c231c3668 Respect outline in skin metrics 2020-11-12 08:45:10 +01:00
bors[bot] a12ec3c9a8
Merge #3279
3279: Add a script to check for variable name style violations, fix some variable names r=def- a=heinrich5991

Didn't fix all variable names because there were far too many. Ideas? At least the second commit should probably go in.

## Checklist

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


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-11-11 17:42:12 +00:00
Jupeyy 06c2e0af50 Fix server browser columns 2020-11-09 21:24:06 +01:00
bors[bot] 8dd1cd50ed
Merge #3274
3274: Add skin metrics r=def- a=Jupeyy

Finally i had time for this.
This addresses the problem with skin sizes( yes @Banana090 I care for you :* )

Finally a way to calculate skin sizes correctly:

**new**
![image](https://user-images.githubusercontent.com/6654924/98458133-b1154a80-218d-11eb-9c80-1dccec36a250.png)

old:
![image](https://user-images.githubusercontent.com/6654924/98458263-1ddd1480-218f-11eb-9ff2-25c318e8e89a.png)

Maybe more obvious(left new, right old):
![image](https://user-images.githubusercontent.com/6654924/98458338-c5f2dd80-218f-11eb-83f0-d3020a39f1a2.png)


So we can center skins always.

Currently I only applied this to chat, but it should be used everywhere, where a skin is rendered(except the actual game skin)
- Scoreboard
- Skin selection
- and so on

@def- i'd really like to get this into this next release, because I know ppl with smaller skins will complain about the offset.
I'll test it a bit tomorrow, maybe others can test it too already.

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-09 10:44:56 +00:00
Jupeyy a9631bf9cd Fix text color change 2020-11-08 19:43:01 +01:00
heinrich5991 7663641ed2 Fix some variable name's style 2020-11-08 17:15:48 +01:00
trml 984352dd00 Only use individual character flags for collision when ddnetchar is available 2020-11-08 14:05:44 +01:00
Jupeyy df4c7a08c8 Add skin metrics 2020-11-08 10:28:47 +01:00
Jupeyy 6fbb161846 Fix wrong alignment 2020-11-08 01:41:12 +01:00
bors[bot] be06146c49
Merge #3252
3252: cl_chat_tee + cl_chat_background => cl_chat_old (fixes #3106) r=Jupeyy a=def-

![screenshot-20201105@131601](https://user-images.githubusercontent.com/2335377/98240075-30760480-1f69-11eb-91ab-4be84ab84aab.png)
![screenshot-20201105@131537](https://user-images.githubusercontent.com/2335377/98240077-310e9b00-1f69-11eb-8454-71d2c6612a2a.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 21:27:19 +00:00
bors[bot] 556f64775e
Merge #3242
3242: Enable most clang-tidy bugprone-*, misc-*, performance-* checks r=Jupeyy a=def-

Fixes #3134

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 20:15:30 +00:00
bors[bot] 536295ec74
Merge #3266 #3267
3266: Fix chat scoreboard collision for 16:9 and disable scoreboard checks … r=def- a=Jupeyy

…for lower aspect ratios

fixes #3223

![screenshot_2020-11-07_19-04-54](https://user-images.githubusercontent.com/6654924/98448455-6d3e2900-212c-11eb-9352-730119577178.png)

![screenshot_2020-11-07_19-04-43](https://user-images.githubusercontent.com/6654924/98448454-6c0cfc00-212c-11eb-89dd-51a74e4aa8d3.png)


## Checklist

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


3267: Add czech translation by eNJi r=heinrich5991 a=def-

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2020-11-07 19:02:55 +00:00
bors[bot] 3d00ae4414
Merge #3257
3257: Add cl_showhud_timer option (requested by hussainx3) r=heinrich5991 a=def-

![screenshot-20201106@092559](https://user-images.githubusercontent.com/2335377/98343428-1a704e80-2012-11eb-8fa2-37fe734c5056.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 18:54:32 +00:00
bors[bot] 2583343a4a
Merge #3254
3254: Warn when connecting to new server with high gametime r=heinrich5991 a=def-

as suggested by HalfNoob on Discord

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 18:46:44 +00:00
Jupeyy 5f7e8a7901 Fix chat scoreboard collision for 16:9 and disable scoreboard checks for lower aspect ratios 2020-11-07 19:05:23 +01:00
bors[bot] 17895d701a
Merge #3265
3265: Fix scoreboard on ddnet server r=Jupeyy a=def-

![screenshot_2020-11-07_18-36-44](https://user-images.githubusercontent.com/2335377/98447851-5990c380-2128-11eb-8577-62a795aa915e.png)

Broken in https://github.com/ddnet/ddnet/pull/3251

Thanks to louis for report

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 17:46:58 +00:00
def 6da48a0bc3 Fix scoreboard on ddnet server
Broken in https://github.com/ddnet/ddnet/pull/3251

Thanks to louis for report
2020-11-07 18:36:26 +01:00
def d0437df51d Smooth Camera -> Smooth Dynamic Camera, only show if dyncam active
As suggested by Pipou
2020-11-07 12:10:59 +01:00
def 254c970a8e Fix behaviour with cl_confirm_disconnect_time 0 2020-11-07 11:00:30 +01:00
bors[bot] 612c592ef2
Merge #3260
3260: "Connect to" popup: Don't disconnect on enter (fixes #3259) r=Jupeyy a=def-

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-07 00:56:46 +00:00
bors[bot] b0ea7585b8
Merge #3248
3248: Update translations for 15.2 release r=Jupeyy a=def-

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-06 23:31:03 +00:00
def 373275dc6c Connect to menu: Don't disconnect on enter (fixes #3259) 2020-11-07 00:00:25 +01:00
def 75b7474443 Add cl_showhud_timer option (requested by hussainx3) 2020-11-06 09:25:21 +01:00
def c478600935 Warn when connecting to new server with high gametime
as suggested by HalfNoob on Discord
2020-11-05 20:19:31 +01:00
def b03b75146c cl_chat_tee + cl_chat_background => cl_chat_old (fixes #3106) 2020-11-05 13:16:25 +01:00
def e75d7a2ff8 Scoreboard same line height and font size for each team (fixes #3216, supersedes #3219) 2020-11-05 12:15:27 +01:00
def 312b9d3bd8 Enable clang-tidy performance-* checks 2020-11-05 11:34:20 +01:00
def 5b5cfa7d9e nick name -> nickname 2020-11-05 09:32:14 +01:00
def 5e2776de0d Fix bugprone-misplaced-widening-cast 2020-11-05 08:25:34 +01:00
def fea4481f8d Fix network x_ check (thanks to Jupeyy) 2020-11-04 19:28:06 +01:00
TsFreddie 996e519fe6 hint for disabling debug mode 2020-11-03 15:06:31 +08:00
bors[bot] 4abf699726
Merge #3117
3117: Enable further clang-tidy checks to modernize the code r=heinrich5991 a=def-

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html

And fix the code:

    cmake -GNinja -DWEBSOCKETS=OFF -DMYSQL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVIDEORECORDER=ON -DAUTOUPDATE=OFF -DANTIBOT=OFF -DUPNP=OFF -DPREFER_BUNDLED_LIBS=OFF -DINFORM_UPDATE=OFF -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--fix-errors" -DCMAKE_C_CLANG_TIDY="clang-tidy;--fix-errors" .
    ninja -j 1

Manually fixed sizeof(auto) in a few occurences (i.e. server.cpp:1359)

First steps for #3088

Co-authored-by: def <dennis@felsin9.de>
2020-11-02 21:56:04 +00:00
bors[bot] 1ee2462078
Merge #3231
3231: Fix skin index r=def- a=Jupeyy

Beside that this was wrong anyway, i hoped i could atleast get the index from the sorted list insert, but that returns the last index in the list, instead of the new inserted index(just like rn), so just revert what I added in 8d6148b20b

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-02 21:48:33 +00:00
def 165857a5a8 Fix variable names manually 2020-11-02 22:40:40 +01:00
def b1f0fd8969 Enable modernize-loop-convert clang-tidy check
and run clang-format afterwards

https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2020-11-02 22:40:24 +01:00
bors[bot] 37ccb77377
Merge #3220
3220: Fix overlapping of combined binds with modifiers [Fixes #3182] r=heinrich5991 a=Banana090

Just fixes https://github.com/ddnet/ddnet/issues/3182

Works as it used to work, but does not call for binds with no modifier when the same key was used already for modified bind


Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-11-02 20:49:12 +00:00
bors[bot] 54b970b68b
Merge #3180
3180: Warn new players about name with points (fixes #3178) r=heinrich5991 a=def-

![screenshot-20201023@233252](https://user-images.githubusercontent.com/2335377/97056097-73f36a80-1588-11eb-8a43-dd42e4ef6e7d.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-02 20:34:49 +00:00
Jupeyy 532d845aed Fix skin load 2020-11-02 21:21:57 +01:00