Commit graph

9633 commits

Author SHA1 Message Date
Zwelf 6eb95c6b96 Fix random_map and random_unfinished_map on SQLite server 2020-10-28 22:36:54 +01:00
Jupeyy 34d597f428 Always render line, if we already are on a new line 2020-10-28 15:57:08 +01:00
Дядя Женя e817a179da Started making color picker 2020-10-28 05:59:50 +03:00
Дядя Женя 15f5ec9297 Tweaked call vote values 2020-10-27 20:31:27 +03:00
Дядя Женя ccbdfbb823 Much more readable Call Vote menu and code 2020-10-27 20:23:20 +03:00
bors[bot] dd7da191f6
Merge #3203
3203: Fix style in render.cpp r=Jupeyy a=def-

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

## Checklist

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


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2020-10-27 12:20:18 +00:00
Dennis Felsing 333218e8c2
Merge pull request #3200 from Patiga/pr-remove-duplicate-function
Use IntsToStr function from gamecore.h
2020-10-27 13:18:59 +01:00
Dennis Felsing 1347537561 Fix style in render.cpp 2020-10-27 13:18:33 +01:00
Patiga 1253215018 Fix style 2020-10-27 12:35:55 +01:00
Patiga cce91746da Use IntsToStr function from gamecore.h 2020-10-27 12:15:11 +01:00
bors[bot] a050370055
Merge #3197
3197: 0.7 map converter - Stop embedding rgb images r=heinrich5991 a=Patiga

DDNet doesn't CMapItemTypeImage version 2, meaning it doesn't have
support yet for having rgb images in maps. Currently, trying that would result in
invalid map files.

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


Co-authored-by: Patiga <dev@patiga.eu>
2020-10-27 09:44:16 +00:00
Дядя Женя 05d6201a72 DrawRoundRectEx readability 2020-10-26 21:50:56 +03:00
Patiga 090b0942fb Stop embedding rgb images
DDNet doesn't CMapItemTypeImage version 2, meaning it doesn't have
support yet for having rgb images in maps. Currently, trying that would result in
invalid map files.
2020-10-26 17:08:52 +01:00
Дядя Женя b18d72db1f using time_get_mircoseconds and storing it as int64 val 2020-10-26 17:47:26 +03:00
Dennis Felsing e55eecc88b Fix map_convert_07
Broken in 5c1b8cd221 (diff-17a71d0838a3f107d2baf573a0885c3b7727266b432a13836525737e83a81a58)

Thanks to Jupstar for noticing
2020-10-26 15:11:54 +01:00
bors[bot] 9a257a76e1
Merge #3195
3195: Use str_truncate more often 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: Dennis Felsing <dennis@felsin9.de>
2020-10-26 12:08:34 +00:00
bors[bot] a03df3a4d1
Merge #3141
3141: More hours (fixes #3140) r=heinrich5991 a=def-

Will also look into #3140 and fix here.

Co-authored-by: def <dennis@felsin9.de>
2020-10-26 12:00:13 +00:00
Dennis Felsing 9c8c36456b Use str_truncate more often 2020-10-26 12:56:21 +01:00
bors[bot] 499cbb254d
Merge #3128
3128: Add add_map_votes command for easier local map testing r=heinrich5991 a=def-

No need to tell new players how to manually add a vote or load a map from rcon

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2020-10-26 11:52:39 +00:00
Dennis Felsing 9b810017e1 str_truncate instead of str_copy 2020-10-26 12:49:19 +01:00
Dennis Felsing bb2f446802 Escape map in change_map 2020-10-26 11:28:04 +01:00
bors[bot] 331c9f695c
Merge #3124
3124: Remove option to make map sounds external r=def- a=Patiga

![2020-10-17-180507_401x333_scrot](https://user-images.githubusercontent.com/44099679/96347669-8dd21080-10a3-11eb-8b24-abdab7f41020.png)
Right now it is impossible to have a working external sound. External
sounds render unusable the moment the map is saved and given to another
player. For the mapper it seems like everything is working since the
mapper has the sound file. For anyone else it simply won't work. Since
1. there is no use for it and
2. it adds unnecessary complexity and confusion, 
I propose removing it entirely.

None of the ddnet maps use external sounds, only 25 maps from the map archive have external sounds

Please have a look over the changed ui code.

Co-authored-by: Patiga <dev@patiga.eu>
2020-10-26 09:50:06 +00:00
Dennis Felsing 23c005144b consistent formatting for dbg_msg
no capital letters, no spaces
2020-10-26 10:04:03 +01:00
bors[bot] b0803b26e0
Merge #3077
3077: UI Elements r=def- a=Jupeyy

Build will fail bcs of clang-format,
i'll update this comment to explain.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-26 08:37:25 +00:00
bors[bot] 08e0c0311f
Merge #3189
3189: Disable text alignment for editboxes r=def- a=Jupeyy

I think they create to much issues with the cursor

![screenshot_2020-10-25_15-16-37](https://user-images.githubusercontent.com/6654924/97109755-52ec6000-16d5-11eb-8f26-48a2bec1d4c9.png)

changed the thing in menus and editor, dunno if there are more editbox impl somewhere

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-26 08:22:54 +00:00
Дядя Женя b6d94a85f3 Visual Improvements, Fixed check-style 2020-10-26 06:10:58 +03:00
Дядя Женя 9b3d9965fb More UI Animation settings, more tabs animated 2020-10-26 05:48:05 +03:00
bors[bot] b17fb2827c
Merge #3107 #3155
3107: Log close error to console r=Jupeyy a=def-



3155: Add memcheck/asan/ubsan to readme r=Jupeyy a=def-

To be linked from https://github.com/ddnet/ddnet/pull/3133

Co-authored-by: def <dennis@felsin9.de>
2020-10-26 02:42:03 +00:00
bors[bot] 58afe9fc0a
Merge #3184
3184: Add non-space blanks: Hangul Filler characters r=Jupeyy a=def-

Taken from https://en.wikipedia.org/wiki/Whitespace_character#Non-space_blanks

Had to Hangul Jungseong Filler to that Wiki article as it was missing.

<!-- 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-10-26 02:32:18 +00:00
Дядя Женя c02086a689 Fixes 2020-10-26 04:43:34 +03:00
Дядя Женя e40539c9fd Settings Tabs Animations 2020-10-26 04:10:55 +03:00
Jupeyy 19ce3fa20e Disable text alignment for editboxes 2020-10-25 22:19:19 +01:00
bors[bot] e75cc41a9b
Merge #3191
3191: Fix IME state softlock under fcitx and macos + Update DoEditBox logic to be the same as chat r=def- a=TsFreddie

IME state fix closes #3185 and closes #3150 
DoEditBox update closes #3186, now cursor behave the same as chat where only one cursor (either the real one or the editing one) will be shown.

## 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: TsFreddie <tsfreddiewang@gmail.com>
2020-10-25 21:05:29 +00:00
TsFreddie cc8fe178b5 Update DoEditBox logic to be the same as chat 2020-10-26 01:44:10 +08:00
TsFreddie f7ac41adeb Fix IME stuck when 0-len TEXTEDITING event is missing. 2020-10-25 23:48:12 +08:00
Jupeyy 13c5e039c9 Some chat fixes 2020-10-25 15:57:21 +01:00
Jupeyy 95824b24a3 Fix weapon muzzle texture cutoff 2020-10-25 15:40:22 +01:00
Jupeyy e96aba648b Reset quadsubset for muzzles 2020-10-25 14:34:02 +01:00
def 4f44472e59 Add non-space blanks: Hangul Filler characters
Taken from https://en.wikipedia.org/wiki/Whitespace_character#Non-space_blanks

Had to Hangul Jungseong Filler to that Wiki article as it was missing.
2020-10-25 10:17:56 +01:00
bors[bot] bc5b19b644
Merge #3161
3161: Fix texture create with multi units r=def- a=Jupeyy

~Possibly `fixes` #3104~

Ravie can you test? 
Does not fix the issue.

[only affects gl 3.3]

Still is required, bcs that looks wrong

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-24 06:42:30 +00:00
trml 6fc1316d63 Fix combined player/ping sorting function 2020-10-24 01:17:03 +02:00
def b83b4c8e33 Warn new players about name with points (fixes #3178) 2020-10-23 23:37:49 +02:00
bors[bot] f74c3e5776
Merge #3176
3176: Fix float loops r=def- a=Jupeyy

Tested that one map from #bug channel

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-23 13:36:22 +00:00
Jupeyy 6414d8d879 Fix float loops 2020-10-23 15:12:59 +02:00
Jupeyy be23e92671 Remove one particle component 2020-10-23 14:57:20 +02:00
bors[bot] 6332f90852
Merge #3115
3115: Smooth Camera r=def- a=TsFreddie

closes #3096

Since nobody expressed any opinions, how about we get this in and see some reactions. it is off by default anyway.

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-10-23 11:39:52 +00:00
bors[bot] 2ba4d5d6cb
Merge #3136
3136: Fix some asan issues r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-22 15:26:41 +00:00
bors[bot] 9832829633
Merge #3157
3157: Show option to disable system messages in settings r=Jupeyy a=def-

## Summary

Makes it a bit easier to find, prefer it on a busy server. Also clarified the friend message toggle is for highlighting only.

![screenshot-20201020@182835](https://user-images.githubusercontent.com/2335377/96615964-41d0d700-1302-11eb-910e-4c56f0c8451c.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 [does not apply]
- [x] Written a unit test if it works standalone, system.c especially [does not apply]
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2020-10-22 15:19:31 +00:00
bors[bot] d9f08203a0
Merge #3169
3169: Allow zooming in further in Editor r=Jupeyy a=def-

As requested by Cøke

![screenshot-20201022@165820](https://user-images.githubusercontent.com/2335377/96890625-1a0b7b80-1488-11eb-9bf0-83d59f29c529.png)

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-10-22 15:10:47 +00:00
def 64c7f2b731 Allow zooming in further in Editor
As requested by Cøke
2020-10-22 16:59:31 +02:00
Jupeyy 07ca9b796c Killmessages should reset screen 2020-10-22 16:58:49 +02:00
Jupeyy dec7fd25fb Fix texture create with multi units 2020-10-21 00:57:20 +02:00
bors[bot] b014d6199c
Merge #3160
3160: Make gfx_quad_as_triangle 0 default r=def- a=Jupeyy

fixes #3097
I added a TrianglesBeing/End() instead for ingame quads
Let me quickly explain why #177 failed.

In the screenshots of #177 you already see the problem

the driver can built a quad like:
![image](https://user-images.githubusercontent.com/6654924/96621122-86f80780-1308-11eb-881a-eb51bdbe558c.png)

or like:

![image](https://user-images.githubusercontent.com/6654924/96621195-a131e580-1308-11eb-91c4-cc4cab96bdfd.png)

or somehow it wants, but it will always do them as triangles

And thats why the ingame quads were basically flipped in the screenshots of #177

But this almost never matters.
Tiles are single colored, text is single colored, ui elements are single colored.
So it only matters for ingame quads probably, which specify the color of each edge

Also even if it would matter, we can simply change the quads to triangles now.

Pro:
- Generally less vertices upload
- Less vertices building on CPU side

Cons:
- nothing



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-20 20:53:54 +00:00
Jupeyy 6eacccfba6 Make gfx_quad_as_triangle 0 default 2020-10-20 19:11:19 +02:00
Jupeyy eb2689cf9e Rename QuadContainerAsSprite to QuadContainerEx, so its useful for all kind of rendering 2020-10-20 18:45:03 +02:00
def 3397869b31 Show option to disable system messages in settings 2020-10-20 18:27:58 +02:00
bors[bot] 3bdded3c4f
Merge #3122 #3137
3122: Fix arithmentic problems r=def- a=Jupeyy

The first three commits are safe

The ones i'll add later will be inside the gamecore, so might alter behaviour.

I'll see which ones are critical, but takes me some time

i fixed most in #3081

3137: Add gfx debug r=def- a=Jupeyy

If someone wants to try, you have to execute the client with a config that contains dbg_gfx 1
If opengl debug is supported it will show "Enabled OpenGL debug mode" in the console

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-20 16:19:55 +00:00
bors[bot] e5870ab06f
Merge #3113
3113: Visual Chat Update r=def- a=Banana090

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

Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-10-20 16:03:57 +00:00
bors[bot] 2709afb007
Merge #3095
3095: Disallow player name changes when the player is muted r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-20 15:56:16 +00:00
def 655bbd2cb6 Clamp /emote duration
/home/teeworlds/src/master/src/game/server/ddracechat.cpp:1108:65: runtime error: signed integer overflow: 99999999 * 50 cannot be represented in type 'int'
2020-10-20 16:46:25 +02:00
Jupeyy 74515d4b95 UI Elements 2020-10-19 23:52:29 +02:00
bors[bot] c1dea54d80
Merge #3149
3149: Fix memory leak on team finish and read of uninitialized data r=def- a=Zwelf

Fixes #2522, fixes #3144 and fixes second leak from #3134.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-10-19 17:09:43 +00:00
bors[bot] dfe3bb44cb
Merge #3139
3139: Use NUM_DUMMYS for dummy array length r=def- a=ChillerDragon

Should make code more readable by explaining that the array is used for dummy. Also makes modders life easier if there is a need to scale up dummy count.

I left out two places that do not include client.h

3be8a592e5/src/game/client/prediction/gameworld.h (L92)

3be8a592e5/src/game/gamecore.h (L212)

Moving the enum to protocol.h for example is probably not nice.

Co-authored-by: ChillerDrgon <ChillerDragon@gmail.com>
2020-10-19 16:37:22 +00:00
Zwelf 81131c7831 Fix grammar mistake 2020-10-19 15:23:48 +02:00
Zwelf 6d11c34d63 Load game UUID on /load
Fixes #2522 and #3144
2020-10-19 15:21:23 +02:00
bors[bot] aca143cb7d
Merge #3129 #3138 #3143
3129: Editor: Fix selection of None value in auto rules (fixes #3013) r=Jupeyy a=def-

by starting the indexing at 0

3138: Fix out of bounds access in GetSolo r=Jupeyy a=def-

As discovered in #3135

3143: Ignore ddnet-info.json dl failure again r=Jupeyy a=def-

too aggressive, might just be bad internet at the moment

Co-authored-by: def <dennis@felsin9.de>
2020-10-19 12:46:44 +00:00
bors[bot] 4360d78753
Merge #3148
3148: Fix out of bounds array access in DoEditBox r=Jupeyy a=def-

Introduced in 186206d40c

Co-authored-by: def <dennis@felsin9.de>
2020-10-19 12:39:39 +00:00
def 8e6b9f017d Fix out of bounds array access in DoEditBox
Introduced in 186206d40c
2020-10-19 14:34:10 +02:00
bors[bot] 51b5858b7e
Merge #3146
3146: Disallow cl_text_entities_size 0 (fixes #3145) r=Jupeyy a=def-

@BannZay 

Co-authored-by: def <dennis@felsin9.de>
2020-10-19 12:30:33 +00:00
bors[bot] e002ab118a
Merge #3147
3147: Clamp font size to atleast 2 (fixes #3145) r=def- a=Jupeyy

We dont need to `close` #3146
i think setting it to 0 makes no sense anyway the config to disable entities text is `cl_text_entities` not this one

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-19 12:23:46 +00:00
Jupeyy 90db24c356 clamp font size to atleast 2 (fixes #3145) 2020-10-19 14:18:23 +02:00
Zwelf aa53f28449 Fix memory leak in MySQL getBlob function
Direct leak of 768 byte(s) in 2 object(s) allocated from:
    #0 0x4e91ad in operator new(unsigned long)
    #1 0x7f0c54a3bf63 in sql::mysql::MySQL_Prepared_ResultSet::getBlob(unsigned int) const (/usr/lib/x86_64-linux-gnu/libmysqlcppconn.so.7+0x77f63)
2020-10-19 14:00:53 +02:00
def 5ba8d8ecdb Disallow cl_text_entities_size 0 (fixes #3145) 2020-10-19 13:49:38 +02:00
def bd14545b47 Show times with hours in SQL (fixes #3140) 2020-10-18 23:47:13 +02:00
def 67178b0ea0 Use str_time/str_time_float everywhere 2020-10-18 23:47:09 +02:00
def 8dfcd67fe6 Add str_time/str_time_float
Handles centisecs < 0

Uses int64, otherwise we're limited to ~260 days
2020-10-18 23:44:47 +02:00
def 709d700e5b Ignore ddnet-info.json dl failure again
too aggressive, might just be bad internet at the moment
2020-10-18 23:40:00 +02:00
ChillerDrgon f1bb5b5bd9 Use NUM_DUMMIES for dummy array length 2020-10-18 23:15:25 +02:00
Jupeyy bdb53e3dad Fix two more filter out of bounds 2020-10-18 18:41:18 +02:00
def 3d94f9c7af Finish chat msg: Add comment 2020-10-18 17:57:27 +02:00
def 0748ad7a6b Finish time in HUD: Show hours 2020-10-18 17:57:02 +02:00
def debf263326 Fix out of bounds access in GetSolo
As discovered in #3135
2020-10-18 16:52:29 +02:00
def c203d787d2 Free allocated data
Direct leak of 8 byte(s) in 2 object(s) allocated from:
    #0 0x4f08e3 in __interceptor_malloc (/home/teeworlds/servers/DDNet-Server-asan+0x4f08e3)
    #1 0x68c9d1 in CDataFileWriter::AddItem(int, int, int, void*) /home/teeworlds/src/master/src/engine/shared/datafile.cpp:666:33
    #2 0x5e4a3e in CGameContext::OnMapChange(char*, int) /home/teeworlds/src/master/src/game/server/gamecontext.cpp:3398:10
    #3 0x553473 in CServer::LoadMap(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:2235:16
    #4 0x55509e in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2440:8
    #5 0x561a56 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3537:21
    #6 0x7f2349f3809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
2020-10-18 16:39:08 +02:00
Jupeyy 5b4d99275f Add gfx debug 2020-10-18 14:38:19 +02:00
def 1081a6870c Put CLineReader on stack so we can't forget to delete it
Found in https://github.com/ddnet/ddnet/issues/3134

Direct leak of 360712 byte(s) in 11 object(s) allocated from:
    #0 0x51fb22 in operator new(unsigned long) (/home/teeworlds/servers/DDNet-Server-asan+0x51fb22)
    #1 0x561d77 in CServer::GetAnnouncementLine(char const*) /home/teeworlds/src/master/src/engine/server/server.cpp:3563:20
    #2 0x5c00a7 in CGameContext::OnTick() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:971:32
    #3 0x556073 in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2544:19
    #4 0x561a56 in main /home/teeworlds/src/master/src/engine/server/server.cpp:3537:21
    #5 0x7f2349f3809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
2020-10-18 12:57:36 +02:00
ChillerDragon c81eb50b50 Fix halloween logic 2020-10-18 10:26:52 +02:00
bors[bot] 91773cd991
Merge #3116
3116: Show halloween skins only on Halloween r=heinrich5991 a=def-

Making use of the skin downloader.

Skin choice is based on your name, only active on October 31 and November 1 with events 1 in settings

Co-authored-by: def <dennis@felsin9.de>
2020-10-18 00:33:47 +00:00
def 343e48248e Editor: Fix selection of None value in auto rules (fixes #3013)
by starting the indexing at 0
2020-10-18 00:33:04 +02:00
def 81bc68d9d0 Add add_map_votes command for easier local map testing
No need to tell new players how to manually add a vote or load a map
from rcon
2020-10-18 00:06:43 +02:00
def ad3bc98578 Revert "Make GL 1.5 default"
As discussed with Lerath2, we should try to debug

This reverts commit 537f47d11d.
2020-10-17 23:34:16 +02:00
bors[bot] 54c7a5bba5
Merge #3108
3108: Make GL 1.5 default r=def- a=Jupeyy

If ppl see white textures its related to
#2125
and you need to revert it, bcs thats not fixable, there is no extension for GL_GENERATE_MIPMAP or smth

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-17 21:09:11 +00:00
Jupeyy 896dd66dfe Don't render invalid laser 2020-10-17 21:34:10 +02:00
Jupeyy 3aef2ebfe0 Make closest_point_on_line safer
Does not change behaviour, all NaNs resulted in false checks
2020-10-17 20:22:13 +02:00
Patiga 8d7b00275f Remove obselete line 2020-10-17 20:16:26 +02:00
Jupeyy d52cd5c41a Check if distance is bigger than 0
Is safe, the first check even checks if Distance is > 0
The second check, checks if Distance is > something positive
2020-10-17 20:00:18 +02:00
Jupeyy 9f10dba7d1 Fix NaN in ninja muzzle 2020-10-17 19:58:17 +02:00
Jupeyy fa8b8b9324 More Target cleanup 2020-10-17 19:58:07 +02:00
Jupeyy 28ee13949b Fix NaN in gamecore move
Is safe, if the distance is zero and the NaN is created by 0 / 0.0
all values multiplied or checked stay NaN, so no new position is set
2020-10-17 18:45:59 +02:00
Jupeyy c9a1586dec Fix obvious division by zero 2020-10-17 18:24:34 +02:00
Jupeyy 6426e341f3 Fix NaNs created by bad initialization 2020-10-17 18:17:13 +02:00
Jupeyy 331249ed89 Fix NaN in LoadSkin 2020-10-17 17:59:18 +02:00
Patiga 14539a8046 Remove option to make map sounds external
Right now it is impossible to have a working external sound. External
sounds render unusable the moment the map is saved and given to another
player. For the mapper it seems like everything is working since the
mapper has the sound file. For anyone else it simply won't work. Since
1. there is no use for it and 2. it adds unnecessary complexity and
confusion, I propose removing it entirely.
2020-10-17 17:45:56 +02:00
Learath2 ba7b95f7ad Revert #3066
This reverts commits:
	a2b3f45f8b
	26a07c804f
2020-10-17 17:32:52 +02:00
bors[bot] b93896b37c
Merge #3112
3112: Fix and change text cursor r=def- a=Jupeyy

Pls check if u like the new cusor and if it works now
fixes #3110

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-17 15:00:57 +00:00
def 08045f6bd9 Only assign skin when non-Halloween skin has been chosen 2020-10-17 16:58:47 +02:00
Дядя Женя 6708a7a69d Chat visual update 2020-10-17 15:50:35 +02:00
Jupeyy 186206d40c Fix and change text cursor 2020-10-17 15:26:33 +02:00
bors[bot] 996270af18
Merge #3120
3120: Embed map sounds by default r=heinrich5991 a=Patiga

Not one ddnet map has a external map sound since there are none which would work that way

Co-authored-by: Patiga <dev@patiga.eu>
2020-10-17 13:16:55 +00:00
Patiga 17e531374c Embed sounds by default 2020-10-17 14:05:06 +02:00
def ae90bdf3f9 Show halloween skins only on Halloween
Making use of the skin downloader.

Skin choice is based on your name, only active on October 31 and November 1 with events 1 in settings
2020-10-17 12:10:56 +02:00
def 28250897d3 Version 15.1.3 2020-10-15 18:59:17 +02:00
Jupeyy 537f47d11d Make GL 1.5 default 2020-10-15 18:47:06 +02:00
def 040876b0d3 Log close error to console 2020-10-15 17:48:22 +02:00
Learath 85f385b37b Optimize nameplate rendering. Fix #3103 2020-10-15 15:35:25 +02:00
bors[bot] 9e060d78b0
Merge #3100
3100: Fix offline client that is not in menu r=heinrich5991 a=Jupeyy

E.g. popups like "ddnet-info.json" failed will cause weird NaN glitches, bcs the impl relys on ChangePosition to clean movetime and animation start

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:54:46 +00:00
bors[bot] 09549ebc85
Merge #3101
3101: Fix hookchains r=heinrich5991 a=Jupeyy

Its already increased by the for loop.
Might have made the hook shorter(for very very long hooks) the past 3 years xd

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:47:21 +00:00
bors[bot] 6ed79fff5f
Merge #3099
3099: Add missing UpdateRenderInfo call r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-14 21:27:28 +00:00
Jupeyy ca645bf53e Fix hookchains 2020-10-14 23:03:14 +02:00
Jupeyy 6eb6fad867 Fix offline client that is not in menu 2020-10-14 22:10:48 +02:00
Jupeyy fd0848291d Add missing UpdateRenderInfo call 2020-10-14 19:00:39 +02:00
heinrich5991 a604d913ce Move ghost code to client
It's not used by the server, so there's no reason to put it into the
shared codebase.
2020-10-14 17:08:58 +02:00
heinrich5991 070504b5c8 Update ghost format to v6: Replace CRC with SHA256
To be friendly to other implementors of the format, the CRC field is now
zeroed out instead of completely gone.

Drop support for v2 and v3 of the ghost format, the ghost files should
have been automatically converted by the client already.
2020-10-14 17:08:58 +02:00
heinrich5991 6ff53358d3 Remove code for CRC in most places, except where needed for net compat
This should path the way to remove it altogether in the future.
2020-10-14 17:08:58 +02:00
heinrich5991 246d2ac3d6 Allow IServer users to check when client's names change
Use that available interface to process name change spam protection more
cleanly.
2020-10-14 16:42:35 +02:00
def 7f38bc0941 Fix clang-analyzer-core.uninitialized.Assign
/media/ddnet/src/engine/shared/dilate.cpp:32:22: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
2020-10-14 15:45:47 +02:00
def 87b06d307f Fix clang-analyzer-core.UndefinedBinaryOperatorResult
/media/ddnet/src/game/client/animstate.cpp:54:27: warning: The left operand of '*' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
        pSeq->m_X += pAdded->m_X * Amount;
                                 ^
2020-10-14 15:45:47 +02:00
def 6443e708b5 Fix clang-analyzer-core.CallAndMessage
/media/ddnet/src/game/editor/auto_map.cpp:94:17: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
                                int RunID = pCurrentConf->m_aRuns.add(NewRun);
                                            ^
2020-10-14 15:45:47 +02:00
def 0867424749 Fix clang-analyzer-security.insecureAPI.strcpy
/media/ddnet/src/engine/server/sql_string_helpers.cpp:74:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
2020-10-14 15:45:47 +02:00
def 98d4baabed Fix clang-analyzer-core.NonNullParamChecker
/media/ddnet/src/game/server/entities/projectile.cpp:201:37: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker]
                                        Found = GetNearestAirPosPlayer(pTargetChr->m_Pos, &PossiblePos);
                                                                       ^
2020-10-14 15:45:47 +02:00
def 5c1b8cd221 Fix clang-analyzer-deadcode.DeadStores
/media/ddnet/src/game/client/components/statboard.cpp:288:3: warning: Value stored to 'tw' is never read [clang-analyzer-deadcode.DeadStores]
2020-10-14 15:45:47 +02:00
def 7c86dd8e5c Fix external directory in .clang-tidy 2020-10-14 15:45:47 +02:00
def a4f13ed4a8 Fix clang-analyzer-optin.portability.UnixAPI
and mark some false positives

/media/ddnet/src/engine/client/backend_sdl.cpp:329:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
2020-10-14 15:45:43 +02:00
def 469888e156 array: Don't allocate size 0
/media/ddnet/src/game/editor/auto_map.h:30:9: warning: Use of zero-allocated memory [clang-analyzer-cplusplus.NewDelete]
        struct CIndexRule
               ^
2020-10-14 14:54:33 +02:00
def 911cb5cb9b CAutoMapper: Delete pUpdateLayer
/media/ddnet/src/game/editor/auto_map.cpp:433:1: warning: Potential leak of memory pointed to by 'pUpdateLayer' [clang-analyzer-cplusplus.NewDeleteLeaks]
}
^
2020-10-14 14:54:33 +02:00
def 476ac6951f Fix memory leak in lock_create
/media/ddnet/src/base/system.c:805:3: warning: Potential leak of memory pointed to by 'lock' [clang-analyzer-unix.Malloc]
2020-10-14 14:54:33 +02:00
def 7d476c3858 Fix clang-analyzer-security.FloatLoopCounter
[81/219] Building CXX object CMakeFiles/game-shared.dir/src/game/collision.cpp.o
/media/ddnet/src/game/collision.cpp:1197:2: warning: Variable 'f' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
        for(float f = 0; f < d; f++)
        ^
2020-10-14 14:54:33 +02:00
Edgar baa8b93d2f Add clang-tidy to CI and enable clang-analyzer checks
The actual work will be fixing those or at least
NOLINT(clang-analyzer-optin.cplusplus.VirtualCall) them so we can enable
this. Disable checks that we don't want.

Exclude external directory from clang-tidy.
2020-10-14 14:54:33 +02:00
TsFreddie 6006c9d85b smooth camera 2020-10-14 08:43:30 +08:00
heinrich5991 5b4c64005f Disallow player name changes when the player is muted 2020-10-14 01:19:41 +02:00
Jupeyy 8e9baedf9a Use pointer directly for tile layer building 2020-10-13 19:52:14 +02:00
bors[bot] 0689466002
Merge #3089
3089: Fix out of bounds access in snapshot delta handling r=heinrich5991 a=axblk

Same as 293209e722 + c87a7b438f in 0.7

Co-authored-by: Redix <redix@hotmail.de>
2020-10-13 17:15:40 +00:00
bors[bot] e11511fe8b
Merge #3086
3086: Fix 2 leaks in CServerBrowser r=def- a=Learath2

The only leaks reported by ASan that are allocated by us. There is one other by SDL and one by X11.

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-13 16:33:39 +00:00
Learath2 48548090be Fix 2 leaks in CServerBrowser 2020-10-13 18:05:59 +02:00
bors[bot] 6ee362fa0e
Merge #3083
3083: Make menu background camera impl more robust r=def- a=Jupeyy

The vanilla code isnt really robust against short distances, hope this fixes almost all edge cases

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-13 16:00:42 +00:00
Learath2 b3b90796dc Don't waste bytes when we are already aligned 2020-10-13 17:30:30 +02:00
Jupeyy 4c87b0cf05 Make menu background camera impl more robust 2020-10-13 15:37:34 +02:00
Patiga a252097e9a Fix comments 2020-10-13 09:53:33 +02:00
Patiga 06e90505b1 Use the same value as vanilla 2020-10-13 09:50:03 +02:00
bors[bot] 3244eba39d
Merge #3078
3078: Make initial borderless work again r=heinrich5991 a=def-

Mistakenly disabled in https://github.com/ddnet/ddnet/pull/1418

Co-authored-by: def <dennis@felsin9.de>
2020-10-12 17:42:03 +00:00
bors[bot] d006b400ec
Merge #3068
3068: Fix alignment issues in CCommandBuffer r=def- a=Learath2

Though I prefer this version I also made one keeping the old ugly pointer arithmetic cb61356105

Feel  free to take whichever. Supersedes #3061 

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-12 17:26:41 +00:00
bors[bot] 8f65839f4a
Merge #3079
3079: Reset renderflags directly after use r=def- a=Jupeyy

created by 5ebabe2ece 

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-12 16:20:23 +00:00
Jupeyy 2d88d44b07 Reset renderflags directly after use 2020-10-12 17:46:06 +02:00
def f85db90357 Make initial borderless work again
Mistakenly disabled in https://github.com/ddnet/ddnet/pull/1418/files
2020-10-12 16:30:50 +02:00
def fedb031250 Version 15.1.2 2020-10-12 15:13:22 +02:00
Jupeyy ec16abdb54 Fix skin load 2020-10-12 12:31:43 +02:00
Redix d172286c6c Fix out of bounds access in snapshot delta handling 2020-10-11 18:42:06 +02:00
bors[bot] 1d961a262f
Merge #3069
3069: Recreate score hud when any score changed r=Learath2 a=def-

Fixes problem with too long strings because we display the score centered

Thanks to ExP for report:
![screenshot_2020-10-11_17-18-45](https://user-images.githubusercontent.com/2335377/95682429-7a2b3380-0be5-11eb-8186-c1dbf922b960.png)

Fixed:
![screenshot-20201011@171419](https://user-images.githubusercontent.com/2335377/95682443-88794f80-0be5-11eb-9d10-79ea5df785c0.png)
![screenshot-20201011@171423](https://user-images.githubusercontent.com/2335377/95682441-857e5f00-0be5-11eb-805a-8312e43f5ba1.png)


Co-authored-by: def <dennis@felsin9.de>
2020-10-11 15:45:35 +00:00
def d0005d3866 Right-align hud scores 2020-10-11 17:27:55 +02:00
Learath2 200c4fc12e Fix alignment issues in CCommandBuffer 2020-10-11 17:18:49 +02:00
def 2a06b3ccb5 Recreate score hud when any score changed
Fixes problem with too long strings because we display the score centered

Thanks to ExP for report
2020-10-11 17:15:43 +02:00
bors[bot] ea1acfd22c
Merge #3067
3067: Document highest and lowest values for cl_video_crf r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:54:03 +00:00
bors[bot] 91619b9886
Merge #3051
3051: Fix some undefined behaviour r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-11 14:46:44 +00:00
bors[bot] 7e84e1ef43
Merge #3066
3066: Disallow more commands with testing mode r=def- a=heinrich5991

Also show some useful error message

Supersedes #2778.

Co-authored-by: Andrii <bannzay3@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-11 14:39:29 +00:00
def ae1a266dac CCharacterCore::Tick caused out of bounds
src/game/teamscore.cpp:27:78: runtime error: index -1 out of bounds for type 'int const[64]'
    #0 0xf5b948 in CTeamsCore::CanKeepHook(int, int) const src/game/teamscore.cpp:27
    #1 0xf46fe1 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:325
    #2 0xaf7366 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2441
    #3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
    #4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
    #5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
    #6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #7 0x557fda in main src/engine/client/client.cpp:4341
    #8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #9 0x433e29 in _start (build/DDNet+0x433e29)

src/game/teamscore.cpp:34:78: runtime error: index -1 out of bounds for type 'int const[64]'
    #0 0xf5be68 in CTeamsCore::CanCollide(int, int) const src/game/teamscore.cpp:34
    #1 0xf46458 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:271
    #2 0xaf7374 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2442
    #3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
    #4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
    #5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
    #6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #7 0x557fda in main src/engine/client/client.cpp:4341
    #8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #9 0x433e29 in _start (build/DDNet+0x433e29)
2020-10-11 16:37:03 +02:00
def 476a912b3f Fix CRaceDemo + CGhost out of bounds access
#0 0x9f70dd in CRaceDemo::OnMessage(int, void*) src/game/client/components/race_demo.cpp:134
    #1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
    #2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
    #3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
    #4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
    #5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #6 0x557fda in main src/engine/client/client.cpp:4341
    #7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #8 0x433e29 in _start (build/DDNet+0x433e29)

src/game/client/components/ghost.cpp:600:35: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x78201a in CGhost::OnMessage(int, void*) src/game/client/components/ghost.cpp:600
    #1 0xab81af in CGameClient::OnMessage(int, CUnpacker*, bool) src/game/client/gameclient.cpp:823
    #2 0x50ff76 in CClient::ProcessServerPacket(CNetChunk*) src/engine/client/client.cpp:2100
    #3 0x51bf62 in CClient::PumpNetwork() src/engine/client/client.cpp:2580
    #4 0x526b56 in CClient::Update() src/engine/client/client.cpp:2856
    #5 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
    #6 0x557fda in main src/engine/client/client.cpp:4341
    #7 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
    #8 0x433e29 in _start (build/DDNet+0x433e29)
2020-10-11 16:37:03 +02:00
def 6680ec388c Reset CCharacterCore at start
Hopefully fixes these by initializing m_Pos:

src/game/collision.cpp:345:10: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55e85a8f0967 in CCollision::IntersectLineTeleHook(vector2_base<float>, vector2_base<float>, vector2_base<float>*, vector2_base<float>*, int*) /media/ddnet/src/game/collision.cpp:345:10
    #1 0x55e85a90767b in CCharacterCore::Tick(bool) /media/ddnet/src/game/gamecore.cpp:255:27
    #2 0x55e85af8e477 in CCharacter::Tick() /media/ddnet/src/game/client/prediction/entities/character.cpp:562:9
    #3 0x55e85afc867f in CGameWorld::Tick() /media/ddnet/src/game/client/prediction/gameworld.cpp:193:10
    #4 0x55e85af500b8 in CGameClient::UpdatePrediction() /media/ddnet/src/game/client/gameclient.cpp:2279:16
    #5 0x55e85af48b9b in CGameClient::OnNewSnapshot() /media/ddnet/src/game/client/gameclient.cpp:1675:3
    #6 0x55e85a9fdf8c in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2767:22
    #7 0x55e85aa0cefe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #8 0x55e85aa2eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7feedbc65151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55e85a77be0d in _start (/media/ddnet/DDNet+0x705e0d)

src/base/math.h:22:40: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55e85a900c2f in round_to_int(float) /media/ddnet/src/base/math.h:22:40
    #1 0x55e85a90cac1 in CCharacterCore::Write(CNetObj_CharacterCore*) /media/ddnet/src/game/gamecore.cpp:515:22
    #2 0x55e85a90e171 in CCharacterCore::Quantize() /media/ddnet/src/game/gamecore.cpp:574:2
    #3 0x55e85af90be9 in CCharacter::TickDefered() /media/ddnet/src/game/client/prediction/entities/character.cpp:580:9
    #4 0x55e85afc8a1b in CGameWorld::Tick() /media/ddnet/src/game/client/prediction/gameworld.cpp:201:10
    #5 0x55e85af500b8 in CGameClient::UpdatePrediction() /media/ddnet/src/game/client/gameclient.cpp:2279:16
    #6 0x55e85af48b9b in CGameClient::OnNewSnapshot() /media/ddnet/src/game/client/gameclient.cpp:1675:3
    #7 0x55e85a9fdf8c in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2767:22
    #8 0x55e85aa0cefe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #9 0x55e85aa2eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #10 0x7feedbc65151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #11 0x55e85a77be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 23db49db63 Server browser: Don't access friends out of bounds
src/engine/client/serverbrowser.cpp:295:88: runtime error: index 64 out of bounds for type 'CServerInfo::CClient [64]'
    #0 0x565020e035bd in CServerBrowser::Filter() /media/ddnet/src/engine/client/serverbrowser.cpp:295:128
    #1 0x565020e053b3 in CServerBrowser::Sort() /media/ddnet/src/engine/client/serverbrowser.cpp:352:2
    #2 0x565020e0c364 in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:620:2
    #3 0x565020cf9854 in CClient::ProcessServerInfo(int, NETADDR*, void const*, int) /media/ddnet/src/engine/client/client.cpp:1524:20
    #4 0x565020cf8132 in CClient::ProcessConnlessPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1357:4
    #5 0x565020d11656 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2575:5
    #6 0x565020d1ba21 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
    #7 0x565020d26efe in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #8 0x565020d48b2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7f4311524151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x565020a95e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 60f4e078b7 Out of bounds access in RenderPlayer
src/game/client/components/players.cpp:197:5: runtime error: index -2 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x56548eec0487 in CPlayers::RenderPlayer(CNetObj_Character const*, CNetObj_Character const*, CTeeRenderInfo const*, int, float) /media/ddnet/src/game/client/components/players.cpp:197:37
    #1 0x56548ec97234 in CGhost::OnRender() /media/ddnet/src/game/client/components/ghost.cpp:344:26
    #2 0x56548ef92b26 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #3 0x56548ea4659e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #4 0x56548ea7b90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #5 0x56548ea9bb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #6 0x7f7c844f1151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #7 0x56548e7e8e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 3d76010fe9 aPastIndecies -> aPastIndices 2020-10-11 16:37:03 +02:00
def 47299e8586 Out of bounds access in CMenus::RenderGame
src/game/client/components/menus_ingame.cpp:108:16: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a64c4 in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:108:73
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/game/client/components/menus_ingame.cpp:108:16 in
src/game/client/components/menus_ingame.cpp:109:14: runtime error: index -1 out of bounds for type 'CGameClient::CClientData [64]'
    #0 0x55733e6a699a in CMenus::RenderGame(CUIRect) /media/ddnet/src/game/client/components/menus_ingame.cpp:109:71
    #1 0x55733e632ba7 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1228:6
    #2 0x55733e64b141 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #3 0x55733e815706 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #4 0x55733e2c959e in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #5 0x55733e2fe90f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #6 0x55733e31eb2e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #7 0x7f9a2057e151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #8 0x55733e06be0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 346853e817 Signed overflow is undefined in CSnapshot::Crc
src/engine/shared/snapshot.cpp:72:8: runtime error: signed integer overflow: -1297193910 + -1824658838 cannot be represented in type 'int'
    #0 0x565165b0687d in CSnapshot::Crc() /media/ddnet/src/engine/shared/snapshot.cpp:72:8
    #1 0x565165c4d20b in CClient::ProcessServerPacket(CNetChunk*) /media/ddnet/src/engine/client/client.cpp:1981:49
    #2 0x565165c5d960 in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2589:6
    #3 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
    #4 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #5 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #6 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #7 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def e6b0283722 No null pointer to mem_copy in SendControlMsg
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
    #0 0x565165b348dc in mem_copy /media/ddnet/src/base/system.c:261:2
    #1 0x565165aeb27d in CNetBase::SendControlMsg(NETSOCKET, NETADDR*, int, int, void const*, int, int, bool) /media/ddnet/src/engine/shared/network.cpp:313:2
    #2 0x565165aeeb4e in CNetConnection::SendControl(int, void const*, int) /media/ddnet/src/engine/shared/network_conn.cpp:169:2
    #3 0x565165af08c5 in CNetConnection::Feed(CNetPacketConstruct*, NETADDR*, int) /media/ddnet/src/engine/shared/network_conn.cpp:367:6
    #4 0x565165aec7d2 in CNetClient::Recv(CNetChunk*) /media/ddnet/src/engine/shared/network_client.cpp:94:174
    #5 0x565165c5d5ea in CClient::PumpNetwork() /media/ddnet/src/engine/client/client.cpp:2571:24
    #6 0x565165c67a71 in CClient::Update() /media/ddnet/src/engine/client/client.cpp:2856:2
    #7 0x565165c72f4e in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3237:4
    #8 0x565165c94b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7fba5af2c151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x5651659e1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 7e297aff59 Don't pass null pointer into mem_copy in CServerBrowser
src/base/system.c:261:15: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
    #0 0x5651235308dc in mem_copy /media/ddnet/src/base/system.c:261:2
    #1 0x56512375218d in CServerBrowser::Add(NETADDR const&) /media/ddnet/src/engine/client/serverbrowser.cpp:503:3
    #2 0x565123752f6a in CServerBrowser::Set(NETADDR const&, int, int, CServerInfo const*) /media/ddnet/src/engine/client/serverbrowser.cpp:548:13
    #3 0x5651237564cb in CServerBrowser::Refresh(int) /media/ddnet/src/engine/client/serverbrowser.cpp:705:6
    #4 0x5651239a32f8 in CMenus::Render() /media/ddnet/src/game/client/components/menus.cpp:1164:21
    #5 0x5651239bd331 in CMenus::OnRender() /media/ddnet/src/game/client/components/menus.cpp:2338:2
    #6 0x565123b878f6 in CGameClient::OnRender() /media/ddnet/src/game/client/gameclient.cpp:676:28
    #7 0x56512363b5ee in CClient::Render() /media/ddnet/src/engine/client/client.cpp:1134:16
    #8 0x56512367095f in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3285:7
    #9 0x565123690b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #10 0x7fa8487e8151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #11 0x5651233dde0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def f94d476cf2 Don't divide by 0 in LoadSkin
src/game/client/components/skins.cpp:142:14: runtime error: -nan is outside the range of representable values of type 'int'
    #0 0x55b6bd0f49e1 in CSkins::LoadSkin(char const*, char const*, int, int*) /media/ddnet/src/game/client/components/skins.cpp:142:14
    #1 0x55b6bd0f0942 in CSkins::SkinScan(char const*, int, int, void*) /media/ddnet/src/game/client/components/skins.cpp:55:16
    #2 0x55b6bcb33928 in fs_listdir /media/ddnet/src/base/system.c:2033:6
    #3 0x55b6bcb04024 in CStorage::ListDirectory(int, char const*, int (*)(char const*, int, int, void*), void*) /media/ddnet/src/engine/shared/storage.cpp:316:5
    #4 0x55b6bd0f9e2f in CSkins::Refresh() /media/ddnet/src/game/client/components/skins.cpp:222:13
    #5 0x55b6bd0f6e33 in CSkins::OnInit() /media/ddnet/src/game/client/components/skins.cpp:194:2
    #6 0x55b6bd14c63f in CGameClient::OnInit() /media/ddnet/src/game/client/gameclient.cpp:322:28
    #7 0x55b6bcc5f9f8 in CClient::Run() /media/ddnet/src/engine/client/client.cpp:3089:16
    #8 0x55b6bcc84b7e in main /media/ddnet/src/engine/client/client.cpp:4341:11
    #9 0x7f1144ded151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #10 0x55b6bc9d1e0d in _start (/media/ddnet/DDNet+0x705e0d)
2020-10-11 16:37:03 +02:00
def 612f665a6e Document highest and lowest values for cl_video_crf 2020-10-11 16:29:39 +02:00
heinrich5991 a2b3f45f8b Reintroduce CMDFLAG_TEST
Add some more helpful messages for executing test/game commands.
2020-10-11 16:27:28 +02:00
def b7c8da54a3 Make clan plates fit & only show when name plates enabled
Thanks to HamidReza for report
2020-10-11 16:24:01 +02:00
Andrii 26a07c804f Disallow game-related commands unless testing is enabled 2020-10-11 16:02:10 +02:00
bors[bot] 1a79fdec82
Merge #3053
3053: Optimize uuid lookup r=heinrich5991 a=Jupeyy

Already wrote that patch when i noticed its not about this, maybe we can use it, else nvm

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-11 13:07:36 +00:00
bors[bot] 6ab806fde8
Merge #3048 #3063
3048: Add GUI & Game sound volume sliders r=heinrich5991 a=def-

As requested by Pipou

3063: increase buffer size for name_ban messages r=heinrich5991 a=12pm

otherwise reason can be cut off

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-10-11 13:00:23 +00:00
Andrii 52efb23545 Update demo browser on demo save 2020-10-11 15:45:31 +03:00
12pm e34acce0cd increase buffer size for name_ban messages 2020-10-11 14:25:31 +02:00
bors[bot] 692c37398e
Merge #3058
3058: Always clear first frame r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-11 09:34:55 +00:00
bors[bot] e44df2d136
Merge #3059
3059: Add box offset to align better on spec tab r=def- a=ardadem

Old:
![2020-10-11-12:07:54-screenshot](https://user-images.githubusercontent.com/13207692/95674696-91a0f700-0bba-11eb-8291-275cc263b6c1.png)

New:
![2020-10-11-12:08:36-screenshot](https://user-images.githubusercontent.com/13207692/95674697-92d22400-0bba-11eb-8b60-36f0d85fbae4.png)

Very small visual change but heart fits better now for >32 players.

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-11 09:15:25 +00:00
Jupeyy 008800d30d Always clear first frame 2020-10-11 11:13:31 +02:00
def 4327194d27 Add GUI & Game sound volume sliders
As requested by Pipou
2020-10-11 10:16:38 +02:00
def 284c287c99 Version 15.1.1 2020-10-11 10:14:21 +02:00
Jupeyy 9e8cbfea5d Optimize uuid lookup 2020-10-11 08:39:29 +02:00
bors[bot] a68fca6d7c
Merge #3036
3036: Consider as not-afk on emoticon, chat, vote, r=heinrich5991 a=def-

call vote, spectator mode, info change

Co-authored-by: def <dennis@felsin9.de>
2020-10-11 00:26:30 +00:00
def 7dc33abe23 Add back Australia... 2020-10-11 01:00:56 +02:00
def 507f7f6085 Version 15.1 2020-10-11 00:00:33 +02:00
Jupeyy 58bd8dcbb6 Fix virtual call in Constructor 2020-10-10 12:16:27 +02:00
bors[bot] 9d39e1da6d
Merge #3046
3046: Remove usages of qsort r=def- a=Learath2

Caught my eye while doing the integrity PR.

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-10 08:38:12 +00:00
Learath2 d8c9a71e18 Remove usages of qsort 2020-10-10 01:18:42 +02:00
bors[bot] 2917681bf5
Merge #3047
3047: Fix ui_page/ui_settings_page ranges r=Learath2 a=def-

For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 23:16:51 +00:00
def 10e7b2ed7b Fix ui_page/ui_settings_page ranges
For ui_page makes no difference since we limited in code

For ui_settings_page assets page is now remembered
2020-10-09 22:51:16 +02:00
Arda Demir 75cd653f4c Add box offset to align better on spec tab 2020-10-09 22:14:54 +03:00
ChillerDragon 263fdbd8e1 Use 0.7 gameskin by @Zatline
a5105264ff
db08239506
31c6d2684d
2020-10-09 21:04:06 +02:00
bors[bot] f93c8e4fdb
Merge #2987
2987: Modulize skins, particles, emoticons and game r=def- a=Jupeyy

fixes #2203 

Puh, something i always wanted todo.
Need to error read, bcs alot of copy paste.

Modulizes all images, so that all images are mipmap indepedent, without texeloffset problems

I also added the ninja bar analyzer for #2921


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 15:20:48 +00:00
bors[bot] ce9ba5ec09
Merge #3018
3018: Editor: Improve usability of server settings r=Jupeyy a=def-

- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke

Co-authored-by: def <dennis@felsin9.de>
2020-10-09 14:48:59 +00:00
def ea8bee4d34 Focus command field when something changed 2020-10-09 16:40:59 +02:00
bors[bot] b208ee3a81
Merge #3039
3039: Show friends on spectate tab r=def- a=ardadem

![2020-10-08-13:22:48-screenshot](https://user-images.githubusercontent.com/13207692/95447050-d5e98880-0969-11eb-923a-2b647933774d.png)
![2020-10-08-13:23:14-screenshot](https://user-images.githubusercontent.com/13207692/95447054-d71ab580-0969-11eb-8ace-a893cfa80a97.png)

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-10-09 14:38:12 +00:00
bors[bot] cf6ace1744
Merge #3022
3022: Text alignment r=def- a=Jupeyy

i think the round borders create a bit of optical illusion, e.g. the "V" in edtior is only 1 pixel of, but looks like its completly left xd

i checked at few resolutions with gimp and only saw around 1 pixel margin of error, but go ahead and test yourself :D

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-09 14:31:25 +00:00
Jupeyy 8d6148b20b Modulize skins, particles, emoticons and game 2020-10-09 09:07:19 +02:00
Jupeyy 94a20d11fa Use renderinfo for player death effect 2020-10-08 21:54:53 +02:00
heinrich5991 eb4699de2c Revert "Reset m_ServerCapabilities on Disconnect"
This reverts commit a6d2a35e11.

It's unclear how this should have fixed the mentioned bug.
2020-10-08 13:12:31 +02:00
Arda Demir 84c36b3423 Show friends on spectate tab 2020-10-08 13:25:05 +03:00
bors[bot] 2d0c65bf53
Merge #3038
3038: Use std::sort instead of bubble_sort r=def- a=Jupeyy

Noticed, that its really slow, when you have alot of auto demos

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 08:36:53 +00:00
bors[bot] cbec1a5eb4
Merge #3037
3037: Init date for demo dirs r=def- a=Jupeyy

Just to not rely on uninitialized values

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-08 08:30:05 +00:00
Jupeyy 52911e4302 Use std::sort instead of bubble_sort 2020-10-08 08:00:01 +02:00
Jupeyy a4b32d19a1 Init date for demo dirs 2020-10-08 07:20:32 +02:00
bors[bot] 6376890fc1
Merge #3035
3035: Fix button rendering in "Render demo" r=Jupeyy a=def-

hopefully. For me "Show chat" didn't work, works now. For Дядя Женя
"Use sounds" was flickering, but can't reproduce

![screenshot-20201007@231230](https://user-images.githubusercontent.com/2335377/95388468-a3e90f80-08f2-11eb-8818-5b9e91116c49.png)

Co-authored-by: def <dennis@felsin9.de>
2020-10-08 04:59:34 +00:00
def 04b840f542 Consider as not-afk on emoticon, chat, vote,
call vote, spectator mode, info change
2020-10-07 23:24:50 +02:00
def 51b967085a Fix button rendering in "Render demo"
hopefully. For me "Show chat" didn't work, works now. For Дядя Женя
"Use sounds" was flickering, but can't reproduce
2020-10-07 23:12:18 +02:00
Arda Demir 9ead551b98 Render afk emote instead of chat emote 2020-10-07 22:04:07 +03:00
bors[bot] 8d336f61ec
Merge #3033
3033: Reset m_ServerCapabilities on Disconnect r=Jupeyy a=def-

Reported by builder17 that on Vanilla server timeout code can get sent

Co-authored-by: def <dennis@felsin9.de>
2020-10-07 16:58:40 +00:00
def a6d2a35e11 Reset m_ServerCapabilities on Disconnect
Reported by builder17 that on Vanilla server timeout code can get sent
2020-10-07 18:08:09 +02:00
Tim Schumacher 29644780af
Redownload skins of other players on skin directory refresh (closes #3030) 2020-10-07 12:19:38 +02:00
Jupeyy bfe55728d2 fix c++ one definition rule for config 2020-10-07 08:06:26 +02:00
Jupeyy 5ebabe2ece Text alignment 2020-10-07 04:44:35 +02:00
bors[bot] 4a30ef1e9a
Merge #3020
3020: Fix all Multiplication type alerts by CodeQL r=heinrich5991 a=def-

> Multiplication result converted to larger type

> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.

Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster

Co-authored-by: def <dennis@felsin9.de>
2020-10-07 00:56:19 +00:00
bors[bot] bbd87eb128
Merge #3025
3025: Don't make width depend on localized text r=heinrich5991 a=def-

or we end up with totally broken input boxes

As reported by Rezee:
![unknown](https://user-images.githubusercontent.com/2335377/95226414-31e2ce80-07fd-11eb-8ea6-a612bc2397bb.png)

Co-authored-by: def <dennis@felsin9.de>
2020-10-06 21:40:14 +00:00
def 6a0a1ce522 Don't make width depend on localized text
or we end up with totally broken input boxes
2020-10-06 17:55:24 +02:00
bors[bot] 1a4866182e
Merge #3023
3023: Add refresh button for skins, closes #2979 r=def- a=Blacksky780i

![image](https://user-images.githubusercontent.com/72441389/95212455-00163b80-07ee-11eb-953e-2e0593b8cfea.png)


Co-authored-by: Irisk <>
2020-10-06 15:14:46 +00:00
bors[bot] 4706b0f5be
Merge #3005
3005: Use rest instead of string in some commands r=heinrich5991 a=def-

where it makes sense, means you don't need to quote strings for those

Co-authored-by: def <dennis@felsin9.de>
2020-10-06 15:06:45 +00:00
Irisk fb0372b97f Add refresh button for skins, closes #2979 2020-10-06 16:04:59 +02:00
bors[bot] 1f7d544349
Merge #3010 #3014
3010: Use hours in score hud and record r=Learath2 a=def-



3014: Scale auto mapper text size (partially fixes #3013) r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 11:22:06 +00:00
bors[bot] 25e025dd16
Merge #3008
3008: Censor string multiple times r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 11:04:45 +00:00
bors[bot] 79b5852e17
Merge #3021
3021: only load + save auto mappers for tile layers, not physics layers r=def- a=Patiga

If I'm not mistaken, loading a map without auto mappers, then saving would've caused uninitialized values to be written to the auto mappers of physics layers.

Co-authored-by: patiga <dev@patiga.eu>
2020-10-06 07:37:26 +00:00
bors[bot] ecb5e4c790
Merge #3015
3015: Allow quitting instantly with SDL_QUIT when non-warning dialog showing r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-06 00:33:04 +00:00
patiga 95fadea794 Fix style properly 2020-10-05 20:09:19 +02:00
patiga 09a9ca9699 Conform to style 2020-10-05 19:59:48 +02:00
patiga d123d928b4 only load + save auto mappers for tile layers, not physics layers 2020-10-05 19:44:26 +02:00
def 62dc12aacb Fix all Multiplication type alerts by CodeQL
> Multiplication result converted to larger type

> A multiplication result that is converted to a larger type can be a
> sign that the result can overflow the type converted from.

Example: https://github.com/ddnet/ddnet/security/code-scanning/17?query=ref%3Arefs%2Fheads%2Fmaster
2020-10-05 19:03:54 +02:00
bors[bot] 75bdcce3ce
Merge #2980
2980: Fix laser prediction for non ddrace mods r=def- a=Jupeyy

Correct me, if this is wrong, but only ddrace based mods cannot shot laser through itself.
Tested on vanilla, ictf and fng(with antiping on and prediction on)

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-05 16:29:35 +00:00
def 032ae67814 Editor: Improve usability of server settings
- Add Mod button
- Show Del button only when it makes sense
- Update command input text when clicking on an existing command
- Make command clearable

As requested by Cøke
2020-10-05 17:16:48 +02:00
bors[bot] 1b253bfbfd
Merge #3002
3002: Make animations more consistent with high float values r=def- a=Jupeyy

fixes what is described in #2997

Old client animation when server time is huge:

[vid_old.zip](https://github.com/ddnet/ddnet/files/5322484/vid_old.zip)

 client animation when server time is huge:

[vid_new.zip](https://github.com/ddnet/ddnet/files/5322486/vid_new.zip)

@Fireball-Teeworlds maybe u can try, if that fixes the stuff for u

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-05 14:48:09 +00:00
def 5b06f54d06 censorlist without case 2020-10-05 10:55:32 +02:00
Jupeyy 50b20fb1cd Make animations more consistent with high float values 2020-10-05 02:32:50 +02:00
def 1a83651cf1 Allow quitting instantly with SDL_QUIT when non-warning dialog showing 2020-10-04 22:46:28 +02:00
def c25aede8ea Scale auto mapper text size (partially fixes #3013) 2020-10-04 22:39:43 +02:00
def d5fc613b8b Revert "Show File button in demo player"
As reported by Soreu, doesn't work on Windows (Can't open file warning
pops up)

This reverts commit 8efff70d88.
2020-10-04 18:24:15 +02:00
def 1067e2b844 Use hours in score hud and record
to be consistent with score board
2020-10-04 18:20:29 +02:00
def 5ec702ad2f Use rest instead of string in some commands
where it makes sense, means you don't need to quote strings for those
2020-10-04 17:52:05 +02:00
def 04f2fc5d41 Censor string multiple times 2020-10-04 17:49:19 +02:00
bors[bot] 2b7b92355f
Merge #3006
3006: Only ignore ctrl+shift for press, not release r=Jupeyy a=def-

@Jupeyy How about this?

Co-authored-by: def <dennis@felsin9.de>
2020-10-04 11:26:29 +00:00
def 6507b1b802 Only ignore ctrl+shift for press, not release 2020-10-04 12:14:16 +02:00
bors[bot] 4058765b2d
Merge #2998
2998: Create more config_dir subdirectories at start (fixes #2992) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-04 08:10:15 +00:00
bors[bot] 9df4299bb5
Merge #2999 #3001 #3003
2999: Add Serbian Cyrillic translation r=def- a=cobisimo

This is adding Serbian Cyrillic translation and contain complete translation with latest strings.

by Veljko Radovanovic (VekiPro)

3001: Use skin pointer directly r=def- a=Jupeyy

Can't tell if setting the hot item in gui invalidly can potentially break stuff, also a skin refresh button would make this useless anyway

3003: Update brazilian_portuguese.txt r=def- a=rffontenelle



Co-authored-by: Nikola Radovanovic <nikola.r@toptal.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2020-10-04 08:01:53 +00:00
bors[bot] b33b3295c0
Merge #2997
2997: Make menu background animations smoother r=def- a=Fireball-Teeworlds

time_get_microseconds() can potentially return big numbers (on my system it seems to be equal to uptime) and at some point float's precision is no longer enough for every 1/60th of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.

Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-10-04 07:55:23 +00:00
bors[bot] 9717c4453f
Merge #2982 #2985 #2996
2982: Update french translation r=Jupeyy a=def-

by SunnyPistache & Pipou

2985: No country flag for Traditional Chinese r=Jupeyy a=def-



2996: Make types/countries fit ingame (fixes #2989) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-04 02:22:18 +00:00
bors[bot] e368dabc80
Merge #3000
3000: Add more video modes, reorder them for consistency (fixes #2991) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-04 02:15:29 +00:00
Jupeyy 7f78ecde82 Use skin pointer directly 2020-10-04 00:56:19 +02:00
bors[bot] a7333fe08e
Merge #2964
2964: Set libnotify icon r=def- a=yangfl



Co-authored-by: yangfl <yangfl@users.noreply.github.com>
2020-10-03 19:25:21 +00:00
def 17ec99138c Add more video modes, reorder them for consistency (fixes #2991) 2020-10-03 21:23:38 +02:00
def 74499e9336 Create more config_dir subdirectories at start (fixes #2992) 2020-10-03 21:09:19 +02:00
Fireball 88c31a4711 Make menu background animations smoother
time_get_microseconds() count starts from 1970-01-01 and float's precision is not enough for every 1/60 of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.
2020-10-03 20:07:14 +01:00
def 3a55ff86d6 Make types/countries fit ingame (fixes #2989) 2020-10-03 21:02:36 +02:00
bors[bot] 1040b59c05
Merge #2994
2994: Fix multiple layer editing r=def- a=Learath2

Idk how I thought this ever worked. Fixes #2981 

Co-authored-by: Learath2 <learath2@gmail.com>
2020-10-03 18:59:04 +00:00
Learath2 db9a762f58 Fix multiple layer editing. Close #2981 2020-10-03 18:35:45 +02:00
def 1e900af5fa Disable +xxx binds when pressing ctrl+shift
Seems a bit more general than hardcoding ctrl+shift+d, ctrl+shift+g, ctrl+shift+e
2020-10-03 10:03:20 +02:00
def 830352fd70 Revert "Fix ctrl+shift+d moving tee (fixes #2930)"
This reverts commit 9b0081de57.
2020-10-03 09:57:20 +02:00
Jupeyy 54bbf69488 Fix laser prediction for non ddrace mods 2020-10-03 03:10:54 +02:00
bors[bot] b27b54a051
Merge #2893 #2972 #2974
2893: Determine binary dir independently of data dir (fixes #2891) r=heinrich5991 a=def-

@Learath2 Could you check if this can be extended to also find the DDNet-Server executable on Mac?

2972: Add explicit button for current map as BG r=heinrich5991 a=def-



2974: Fix autoformatting wrt. generated files r=def- a=heinrich5991

Fix #2962.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-02 17:43:04 +00:00
bors[bot] 839f0862fb
Merge #2968 #2969
2968: Create codeql-analysis.yaml r=heinrich5991 a=def-



2969: Print error when opening config file for writing fails r=heinrich5991 a=def-



Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:35:09 +00:00
bors[bot] 663d60fa9a
Merge #2941
2941: Fix ctrl+shift+d moving tee (fixes #2930) r=heinrich5991 a=def-

@plsplsplslol ok from your side?

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:21:39 +00:00
bors[bot] d2df9c6a66
Merge #2948 #2956 #2965
2948: Show File button in demo player r=heinrich5991 a=def-

to easily get the file instead of having to search for it in the file browser again. Complements #2946

2956: Add Background music volume slider r=heinrich5991 a=def-

as requested by hussainx3

2965: Clean up some data r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:56:17 +00:00
bors[bot] 5dd1721e63
Merge #2958 #2961 #2963
2958: AntiPing limit is unintuitive, remove from settings r=heinrich5991 a=def-



2961: Fix hash in formatting-revs.txt r=heinrich5991 a=def-



2963: Handle PNG read errors (fixes #2959) r=heinrich5991 a=def-

and print a more telling error message

I'll check all our existing maps for failures now:
```
$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done
```
For skins Soreu and the skin DB team is already taking care. (but I checked and the ones in Skin DB now can all be loaded without error)

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:31:13 +00:00
def 606701abff No more hardcoded binary paths for POSIX 2020-10-02 18:24:40 +02:00
bors[bot] 4383b8a7e7
Merge #2942 #2943
2942: Update swedish translations (by cur.ie) r=heinrich5991 a=def-



2943: Need to send info when updating skin in text field r=heinrich5991 a=def-

As reported by abcqwerty on Discord

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:23:49 +00:00
def db01e068d9 Add Mac OSX standalone client handling
to find server executable
2020-10-02 18:19:41 +02:00
def 6a79cc3e59 Determine binary dir independently of data dir (fixes #2891)
@Learath2 Could you check if this can be extended to also find the
DDNet-Server executable on Mac?
2020-10-02 18:19:41 +02:00
bors[bot] 2a76cddb4e
Merge #2922
2922: Don't show wrong decisecs in game time in HUD r=heinrich5991 a=def-

I think .me' reported this to me 7 years ago and I've been noticing that they're wrong since then. Time to remove I guess, they don't seem useful anyway.

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:16:55 +00:00
def 512d146d56 Quit hard on second SDL_QUIT input even if dialogs are shown 2020-10-02 18:02:10 +02:00
bors[bot] 4a6a299d2e
Merge #2973
2973: initialize physics layer pointer, layer item version (partially fixes #2971) r=def- a=Patiga

Note that the zlib compression still makes it non-deterministic across different machines/versions

Co-authored-by: patiga <patigatus21@gmail.com>
2020-10-02 15:59:38 +00:00
patiga fc9e1bc325 initialize physics layer pointer, layer item version 2020-10-02 17:45:28 +02:00
Dennis Felsing 317bf6bba4 Don't try to load %current% as a normal map 2020-10-02 16:23:16 +02:00
Dennis Felsing 2dc725e0f6 Rename CURRENT to CURRENT_MAP 2020-10-02 16:21:18 +02:00
Dennis Felsing 0f177bad46 Add explicit button for current map as BG 2020-10-02 16:20:19 +02:00
Dennis Felsing 6839e5f20d QUITING -> QUITTING 2020-10-02 16:06:21 +02:00
Dennis Felsing 2ba9535529 Use warnings popups for some io failures 2020-10-02 16:06:16 +02:00
Dennis Felsing 5b50d4f310 Print error when opening config file fails 2020-10-02 11:11:34 +02:00
bors[bot] 74550e2c45
Merge #2932
2932: Don't change SpectatorID when not spectating r=def- a=Fireball-Teeworlds

This prevents a confusing situation where /pause and /spec lead to spectating yourself: https://youtu.be/9MzvDoXtMLc (looks as if /pause is broken unless you notice that you are spectating yourself).

This could've happened when you pressed spectate_next button while playing and SpectatorID got changed to yourself. I think it doesn't make sense to allow changing SpectatorID when playing at all.

I've also tried to simplify the code: the number of `for` loops in the updated code goes down from 10 to 3.

Things tested with this change:
1. Cycling through players when spectating (works)
2. Changing SpectatorID when not spectating (no longer possible)
3. Spectating yourself (still possible with "spectate N" command but no longer happens accidentally because of 2)
4. "spectate_closest" command (works)
5. Replaying demos where player goes into spectators (works)


Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-10-02 07:55:30 +00:00
def 134400158a Clean up MapLayers 2020-09-30 23:59:50 +02:00
def 406d383c45 Clean up OpenGL command processor 2020-09-30 23:59:44 +02:00
def 12f150393b Free assets 2020-09-30 23:59:38 +02:00
def 61e985457d Clean up font buffers & texturedata 2020-09-30 23:59:33 +02:00
yangfl 8ce6de6d8e Set libnotify icon 2020-10-01 04:40:19 +08:00
def b0a3de60b2 Handle PNG read errors (fixes #2959)
and print a more telling error message

I'll check all our existing maps for failures now:

$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done

For skins Soreu and the skin DB team is already taking care.
2020-09-30 18:23:52 +02:00
Pure luck 9a89b6fc68 fix for a SixUp vote creator id which wasn't set 2020-09-30 18:01:50 +03:00
def 1560a88413 AntiPing limit is unintuitive, remove from settings 2020-09-30 10:17:17 +02:00
def ba258d7343 Add Background music volume slider
as requested by hussainx3
2020-09-30 10:06:55 +02:00
def 973a4caf4b Show days and hours in game time 2020-09-29 22:58:34 +02:00
def 1b1d8f7964 Don't show wrong decisecs in game time in HUD 2020-09-29 22:58:34 +02:00
def 9b0081de57 Fix ctrl+shift+d moving tee (fixes #2930) 2020-09-29 22:58:26 +02:00
def 10355851ca Need to send info when updating skin in text field
As reported by abcqwerty on Discord
2020-09-29 22:58:09 +02:00
def 8efff70d88 Show File button in demo player
to easily get the file instead of having to search for it in the file
browser again. Complements #2946
2020-09-29 22:57:55 +02:00
def b6e4626053 Add clear button to server address field
as suggested by Cøke
2020-09-29 22:41:41 +02:00
Dennis Felsing 1a7eed4937
Merge pull request #2951 from def-/pr-repeated
Reset m_TimesRepeated on new line
2020-09-29 19:02:34 +02:00
def 90211d18ef Reset m_TimesRepeated on new line
otherwise random lines will mistakenly show [2]
2020-09-29 17:01:57 +02:00
Learath 88c054261a Fix multiple layer selection for groups 2020-09-29 13:31:22 +03:00
bors[bot] 7432f569e2
Merge #2946
2946: Add directory buttons r=def- a=Jupeyy

fixes #2944

windows:

![screenshot_2020-09-29_03-16-32](https://user-images.githubusercontent.com/6654924/94502023-78d03300-0203-11eb-8807-ba9d9dca801b.png)

skin:

![screenshot_2020-09-29_03-20-32](https://user-images.githubusercontent.com/6654924/94502035-85548b80-0203-11eb-8105-d1e52593f1e5.png)


but no chance for demo:
![screenshot_2020-09-29_03-23-13](https://user-images.githubusercontent.com/6654924/94502044-8b4a6c80-0203-11eb-8161-4897082a5a66.png)

naming suggestions are welcome
theme directory, themes directory
whatever

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-29 09:30:39 +00:00
Jupeyy 456625893b Add directory buttons 2020-09-29 10:24:40 +02:00
def e4023cb18b Dynamic Camera button: Use g_Config.m_ClDyncam as pID 2020-09-29 08:25:38 +02:00
Dennis Felsing 16f965a0e6
Merge pull request #2940 from def-/pr-empty-lines
Fix empty lines in chat (fixes #1835)
2020-09-29 07:51:12 +02:00
Dennis Felsing b88b33cea4
Merge pull request #2928 from Jupeyy/pr_multiple_pngs
Add changeable assets
2020-09-29 07:46:43 +02:00
def 18ad5b58c0 Fix empty lines in chat (fixes #1835) 2020-09-28 23:25:04 +02:00
Jupeyy 0e71a47708 Add customization 2020-09-28 23:21:32 +02:00
Fireball d06e956739 Don't change SpectatorID when not spectating, simplify code
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
2020-09-28 19:55:47 +01:00
bors[bot] 9d19770a10
Merge #2933
2933: Handle rcon cmd completion properly with dummy r=heinrich5991 a=def-

Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.

as reported by Betz@lel-$h@l0m on Discord

Co-authored-by: def <dennis@felsin9.de>
2020-09-28 16:32:53 +00:00
bors[bot] 616c0e8ad8
Merge #2889
2889: Allow specifying texture LOD BIAS r=def- a=Jupeyy

For Ravie, and others that want the old renderer opengl 3.3 feeling back xd

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-28 16:01:56 +00:00
plsplsplslol 236015c474 print out modifiers when unbinding 2020-09-27 17:38:50 -07:00
bors[bot] af958704ca
Merge #2887
2887: Join identical chat lines to prevent spam r=def- a=edg-l

![image](https://user-images.githubusercontent.com/15859336/93714967-6f412e00-fb66-11ea-9b56-2ff2c053b8c1.png)

May fix https://github.com/ddnet/ddnet/issues/259

Needs a bit more testing

Co-authored-by: Edgar <git@edgarluque.com>
2020-09-27 19:28:55 +00:00
Edgar 5391ff8cc9
fix auto rules scrollbar bugs 2020-09-27 17:20:41 +02:00
Edgar 12161cc55b
change and fix how counter is displayed 2020-09-27 13:28:50 +02:00
def 2deb8aa380 Fix Windows compilation 2020-09-27 11:05:54 +02:00
Dennis Felsing cb2fa0800f
Merge pull request #2934 from def-/pr-show_ips2
Fix show_ips on non-SQL servers
2020-09-27 10:38:37 +02:00
Zwelf cb2c1d2144 Fix cutting of one character when showing ips in rcon
The buffer size passed to `str_append` includes the null terminator.
2020-09-27 10:15:41 +02:00
def b0b47e1286 Fix show_ips on non-SQL servers
Mistake was introduced in 7c31a15c93

We didn't notice since official servers are SQL, except Block servers,
and we just started moderating them a bit.
2020-09-27 01:16:18 +02:00
Edgar 1d8a20f17a join multiple identic chat lines 2020-09-27 00:39:16 +02:00
Jupeyy 6a1cf963d1 try trilinear filtering 2020-09-27 00:37:43 +02:00
Jupeyy c951fc3ee4 Allow specifying texture LOD BIAS 2020-09-27 00:37:42 +02:00
def 25fe5471c5 Handle rcon cmds properly with dummy
Only active player received them, reconnecting dummy a few times lead to
duplicate entries in tab completion. Now only main player is considered
for the completion.

as reported by Betz@lel-$h@l0m on Discord
2020-09-27 00:31:53 +02:00
bors[bot] 6bb8cda483
Merge #2926
2926: clang-format entire repo r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-26 22:10:58 +00:00
def b178c7c74a Make sure headers compile standalone
Not planning to do this automatically, but at least cleaning it up once
provides some benefit. Every header should include what it uses.

$ for i in src/**/*.h; do j=${i#"src/"}; echo $j; echo "#include <$j>\nint main() { return 0; }" | /usr/bin/c++ -DCONF_OPENSSL -DCONF_SQL -DCONF_VIDEORECORDER -DCONF_WAVPACK_CLOSE_FILE -DCONF_WAVPACK_OPEN_FILE_INPUT_EX -DGAME_RELEASE_VERSION=\"15.0.5\" -DGLEW_STATIC -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -I/usr/include/opus -I/usr/include/SDL2 -I/usr/include/wavpack -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -Isrc -I/usr/include/mysql -I/home/deen/sys/include/ -O2 -g -DNDEBUG -fdiagnostics-color=always -fstack-protector-all -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wno-nullability-completeness -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -std=gnu++11 -o /dev/null -x c++ -; done

Ignored: tuning.h, variables.h, config_common.h, mapitems_ex_types.h, mapbugs_list.h, protocol7.h, teehistorian_ex_chunks.h, protocol_ex_msgs.h, config.h, config_variables.h, external, keynames.h
2020-09-26 21:50:27 +02:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
def 0bac9f0de8 Manual preparation for cleaner clang-format
Also include what you use explicitly
2020-09-26 21:41:01 +02:00
bors[bot] 50b8771d04
Merge #2931
2931: Only auto dilate for transparent images r=def- a=Jupeyy

As reported by mind

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-26 19:37:32 +00:00
def f8fc11b880 clang-format 2020-09-26 21:33:36 +02:00
def f74cc43f4c Remove pure server filters, add space for Countries/Types
Not so relevant anymore
2020-09-26 21:33:25 +02:00
Jupeyy c69c765507 Only auto dilate for transparent images 2020-09-26 18:57:19 +02:00
def dcfa752e61 After initialization: Agressively try to grab window again
Since some users on Windows report window not being initially focussed
2020-09-26 09:09:05 +02:00
bors[bot] 8b399ba1be
Merge #2861
2861: Implement censoring words on server r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-25 23:07:15 +00:00
bors[bot] c6ade7eeeb
Merge #2917
2917: Create ALLOW_X_SKINS game info flag r=heinrich5991 a=def-

To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.

Co-authored-by: def <dennis@felsin9.de>
2020-09-25 21:22:38 +00:00
def f2386d5c02 Address reviewer comments 2020-09-25 22:25:45 +02:00
bors[bot] 5f6ba345b8
Merge #2923 #2924
2923: Don't str_copy into string itself r=Learath2 a=def-

when reconnecting after server was full:

[2020-09-25 15:39:34][client]: offline error='This server is full'
Source and destination overlap in strncpy(0xd3328e2, 0xd3328e2, 255)
   at 0x483DFDC: strncpy (vg_replace_strmem.c:550)
   by 0x249180: str_copy (system.c:2328)
   by 0x27E1F5: CClient::Connect(char const*, char const*) (client.cpp:707)
   by 0x287864: CClient::Update() (client.cpp:2914)
   by 0x28891B: CClient::Run() (client.cpp:3216)
   by 0x28EDEC: main (client.cpp:4309)

2924: Fix Score/Time alignment r=def- a=Learath2

![screenshot_2020-09-25_16-52-30](https://user-images.githubusercontent.com/490500/94275676-e81dfc80-ff4f-11ea-9f21-dbf5d1cf73a9.png)

Also adds hours to the time

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
2020-09-25 14:55:51 +00:00
Learath 32c3cba4fa Fix scoreboard alignment issues 2020-09-25 17:44:37 +03:00
Pure luck 3cd0f30d55 laser_damage bugfix styling 2020-09-25 17:41:17 +03:00
Pure luck e7d830a01e bugfix: laser_damage was removed from tunes of 0.7 protocol 2020-09-25 17:25:59 +03:00
def 8cdc4066ff Don't str_copy into string itself
when reconnecting after server was full:

[2020-09-25 15:39:34][client]: offline error='This server is full'
Source and destination overlap in strncpy(0xd3328e2, 0xd3328e2, 255)
   at 0x483DFDC: strncpy (vg_replace_strmem.c:550)
   by 0x249180: str_copy (system.c:2328)
   by 0x27E1F5: CClient::Connect(char const*, char const*) (client.cpp:707)
   by 0x287864: CClient::Update() (client.cpp:2914)
   by 0x28891B: CClient::Run() (client.cpp:3216)
   by 0x28EDEC: main (client.cpp:4309)
2020-09-25 15:43:34 +02:00
bors[bot] 32c77faecc
Merge #2920
2920: stop disabling textinput during connecting r=def- a=TsFreddie

closes #2919 

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-25 05:51:32 +00:00
TsFreddie 712e9e90c0 stop disabling textinput during connecting 2020-09-25 01:08:48 +01:00
def 9ab8de5718 fix clang-format 2020-09-24 19:05:30 +02:00
def 00b66362c3 Allow zooming on city mod 2020-09-24 19:05:30 +02:00
def 9f9ccaccf7 Create ALLOW_X_SKINS game info flag
To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.
2020-09-24 19:05:30 +02:00
bors[bot] 7000987ff5
Merge #2884
2884: Add scrollbar to auto rules list, fixes #2514 r=def- a=edg-l

![image](https://user-images.githubusercontent.com/15859336/93710826-afde7e80-fb49-11ea-9754-c44c79d5ff94.png)

It doesn't show a scrollbar when there aren't more than 5 rules.

Co-authored-by: Edgar <git@edgarluque.com>
2020-09-24 17:01:19 +00:00
Edgar fb3b40917a
fix style script 2020-09-24 18:53:11 +02:00
Edgar 76f3dbfe64
fix scrolling triggering zoom 2020-09-24 18:52:31 +02:00
def f7cf854c36 Make sure turning dyncam off in settings works
Even if players have cl_mouse_followfactor turned on

Alternative fix for #2761 since players keep reporting confusion about this
2020-09-24 18:27:31 +02:00
Edgar af29d8da99
remove unnecessary condition 2020-09-24 18:09:35 +02:00
bors[bot] 75dcbb8ca6
Merge #2918
2918: Allow specifying -DGAME_RELEASE_VERSION r=Learath2 a=def-

to be used for nightlies and release candidates to be able to tell them from regular releases more easily. For example:

CPPFLAGS="-DGAME_RELEASE_VERSION=\\\"15.0.5-rc1\\\"" cmake .

Co-authored-by: def <dennis@felsin9.de>
2020-09-24 16:07:30 +00:00
bors[bot] 56e996cbb6
Merge #2915
2915: HTTP: Set final m_State after running completion function r=Jupeyy a=def-

Ensures that we don't delete a file that is being used by ingame map downloader already.

As reported by Jupeyy in #2901


Co-authored-by: def <dennis@felsin9.de>
2020-09-24 15:54:35 +00:00
def ebb4e3debe Center update info text, add -DINFORM_UPDATE flag
to be used for Steam release, since autoupdates are enforced anyway and
players don't need to be reminded to update
2020-09-24 13:41:59 +02:00
def eb725f800e Allow specifying -DGAME_RELEASE_VERSION
to be used for nightlies and release candidates to be able to tell them
from regular releases more easily. For example:

CPPFLAGS="-DGAME_RELEASE_VERSION=\\\"15.0.5-rc1\\\"" cmake .
2020-09-24 12:20:38 +02:00
def 2be54a30ad HTTP: Set final m_State after running completion function
Ensures that we don't delete a file that is being used by ingame map
downloader already.

As reported by Jupeyy in #2901
2020-09-24 10:21:12 +02:00
bors[bot] ceefdacfbc
Merge #2894
2894: Add new renderer(as streamed vertices) for editor r=def- a=Jupeyy

Does not improve performance in editor!

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-24 08:06:42 +00:00
def d9719a3c15 Fix spacing in themes selection 2020-09-23 23:38:29 +02:00
Jupeyy 8235df7752 Add menu background map 2020-09-23 23:38:28 +02:00
bors[bot] d707b3883c
Merge #2909
2909: Set IME Window Position & Prevent Input from fighting with IME r=def- a=TsFreddie

Mainly solves the backspace problem where you were able to delete from chat and ime comps at the same time.
Also set the position of composition window

Need some testing from other languages' users.
Need https://github.com/ddnet/ddnet-libs/pull/14 to work on windows

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-23 21:23:02 +00:00
Dennis Felsing bedd559988
Merge pull request #2900 from def-/pr-15.0.5
Version 15.0.5
2020-09-23 17:32:57 +02:00
nobody-mb 78040b31e5
automatically kick k-client (#2912) 2020-09-23 16:52:50 +02:00
Jupeyy 84cad658d6 Add new renderer(as streamed vertices) for editor 2020-09-23 16:45:32 +02:00
bors[bot] 1b26312e3c
Merge #2902
2902: Don't rely on snapshot for ddnet gametype r=heinrich5991 a=Jupeyy

@fokkonaut you need to test again if you mod works.
This time i also did the test for masked entites(but not for non masked ones).

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-23 14:15:01 +00:00
patiga 4e893561c8 run fix_style script 2020-09-23 08:15:06 +02:00
patiga df72c0ee7c set the correct variable 2020-09-23 08:14:37 +02:00
Jupeyy 7e436ff2b1 Don't rely on snapshot for ddnet gametype 2020-09-23 08:14:33 +02:00
def 91d2f89b54 Version 15.0.5 2020-09-23 08:14:28 +02:00
Jupeyy eb7c84cd7f Add hover for demo list 2020-09-22 18:42:03 +02:00
TsFreddie d4da82f977 clang-format 2020-09-22 17:02:03 +01:00
TsFreddie 387bc53030 ime window position & ime input handling 2020-09-22 17:01:13 +01:00
Jupeyy 0ddc7fddb4 Don't rely on snapshot for ddnet gametype 2020-09-22 17:42:19 +02:00
bors[bot] fddb8b34c0
Merge #2898 #2901 #2908
2898: Inform players that they are in team already r=heinrich5991 a=def-



2901: Remove failed downloaded files immediately r=heinrich5991 a=def-

Especially skins were only deleted after they were requested again

2908: Don't log skin downloading progress r=heinrich5991 a=def-

since it's not really interesting for most players, as long as things work fine

Co-authored-by: def <dennis@felsin9.de>
2020-09-22 14:57:20 +00:00
def 56b152e962 Remove failed downloaded files immediately
Especially skins were only deleted after they were requested again
2020-09-22 16:51:40 +02:00
def ae4dc1032e Inform players that they are in team already 2020-09-22 16:45:46 +02:00
def 1505b64af0 Don't log skin downloading progress
since it's not really interesting for most players, as long as things work fine
2020-09-22 16:36:01 +02:00
bors[bot] 2a3b254b47
Merge #2890
2890: Finish /showothers 2 implementation on server r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-22 14:35:27 +00:00
bors[bot] 4875b0993a
Merge #2907
2907: properly set sound envelope offsets for sound sources r=def- a=Patiga

before, `m_SoundEnvOffset` was always set to the same value as `m_PosEnvOffset`, due to wrong behavior in the ui.

Co-authored-by: patiga <patigatus21@gmail.com>
2020-09-22 14:17:21 +00:00
patiga b437526925 run fix_style script 2020-09-22 15:42:20 +02:00
bors[bot] 06b519398b
Merge #2906
2906: Use fixed point conversion consistently r=def- a=Learath2

This fixes the issue with the Tex UV coords being complete garbage

Co-authored-by: Learath <learath2@gmail.com>
2020-09-22 13:13:16 +00:00
patiga 2ef344ea1a set the correct variable 2020-09-22 14:50:04 +02:00
Learath bbdcb7035d Style 2020-09-22 15:47:21 +03:00
bors[bot] d9e748ee91
Merge #2888
2888: Fix dilate alpha threshold & auto apply dilate on embedded texture in editor r=def- a=Jupeyy

editor dilate can be turned off.
about the threshold:

old:
![Screenshot_20200920_175749](https://user-images.githubusercontent.com/6654924/93716689-8d605b80-fb71-11ea-8049-848c8bd3a7f2.png)

new:
![Screenshot_20200920_175846](https://user-images.githubusercontent.com/6654924/93716692-8e918880-fb71-11ea-8108-9be5378cd932.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-22 12:38:53 +00:00
Learath 586043fc64 Use fixed point conversion consistently 2020-09-22 15:29:16 +03:00
bors[bot] 9e23623fa1
Merge #2874
2874: Add unmasked entities for all mods r=def- a=Jupeyy

Fixes switch tile for unmasked ddnet
And ddnet mods send that they are a race and ddrace mod appearently?
Not very intuitive that ddnet is a superset of them, bcs tiles changed.

Waiting for a review from @fokkonaut 

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-21 20:46:51 +00:00
bors[bot] 481a56da2a
Merge #2899
2899: Editor: Select game layer by default (fixes #2834) r=Jupeyy a=def-

Since it's the most important layer

Co-authored-by: def <dennis@felsin9.de>
2020-09-21 20:23:56 +00:00
bors[bot] d61c97370f
Merge #2896
2896: Add edit box to write skin name, Add link to Skin Database r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-21 17:50:09 +00:00
def ddb88c6f3b Editor: Select game layer by default
Since it's the most important layer
2020-09-21 19:36:28 +02:00
Jupeyy 0ec7f1e1dc Fix dilate threshold & automatically apply dilate on embedded textures in the editor 2020-09-21 19:17:38 +02:00
def 3a3d3bcb99 Fix UpdatePlayerMaps 2020-09-21 15:32:16 +02:00
def cfd32c357b Fix clang-format 2020-09-21 15:32:16 +02:00
def 35fc180559 Finish /showothers 2 implementation on server 2020-09-21 15:32:16 +02:00
def a273969bc1 Fix clang-format 2020-09-21 10:44:13 +02:00
def d17e0e4819 Add link to Skin Database 2020-09-21 10:39:42 +02:00
def f9e66f0b41 Add edit box to write skin name 2020-09-21 10:35:13 +02:00
def 3276f2925d Reload skin menu when skin count changed
fixes graphics bug when new skins are added, skins array is reallocated
and we accessed freed memory

Thanks to Jupeyy & Learath2 for also looking into this
2020-09-21 10:19:54 +02:00
Edgar 9cdaba88dc
fix style 2020-09-20 14:08:27 +02:00
Edgar ffade19e19
don't show scrollbar if not needed on auto rules 2020-09-20 14:01:28 +02:00
Edgar 2587328aa4
add scrollbar to auto rules list, fixes #2514 2020-09-20 13:52:38 +02:00
bors[bot] 4cbcde06e5
Merge #2872
2872: mention rules r=edg-l a=12pm



Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-09-20 10:22:52 +00:00
def 5cc826d6f5 edit box: only highlight x when hovering it
not when hovering the text field itself

Thanks to Ryozuki for report
2020-09-20 11:52:17 +02:00
def a99b673042 Some browser improvements
- Increase size of Name and Clan in adding friend fields
- Smaller Search and Exclude fields
- No more duplicate Search - Search - Search text
- Smaller Connect and Refresh buttons
2020-09-20 11:47:04 +02:00
bors[bot] d4c14505bf
Merge #2883
2883: Ask for confirmation before placing border tiles r=def- a=Fireball-Teeworlds

Fixes #2823 

Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-09-20 09:36:55 +00:00
Fireball bb2be60a08 Ask for confirmation before placing border tiles (fixes #2823) 2020-09-20 01:42:07 +01:00
def 4e157c64e3 clang-format fix 2020-09-20 02:24:51 +02:00
def dfa072353d Fix skin lookup
Thanks for Jupeyy for looking into this with me
2020-09-20 02:19:58 +02:00
def 61f89533c5 Clean up skin downloader code a bit
Was trying to find what's causing the issues with skin downloader, but
didn't find anything suspicious.
2020-09-20 02:19:49 +02:00
def 8ef6a0da16 Revert "Revert "Fix clang-format""
This reverts commit 833e3640b4.
2020-09-20 02:19:32 +02:00
def 1d868fec70 Revert "Revert "Fix skin prefix search crash""
This reverts commit 4ad0f61a00.
2020-09-20 02:19:28 +02:00
def a09be98df9 Revert "Revert "Implement on-demand skin downloader (fixes #1166)""
This reverts commit cc2f05b6df.
2020-09-20 02:19:24 +02:00
def f92a4753c3 Version 15.0.4 2020-09-20 01:51:55 +02:00
def cc2f05b6df Revert "Implement on-demand skin downloader (fixes #1166)"
This reverts commit 3cc1e47ec4.
2020-09-20 01:51:23 +02:00
def 4ad0f61a00 Revert "Fix skin prefix search crash"
This reverts commit 1270434f5e.
2020-09-20 01:49:58 +02:00
def 833e3640b4 Revert "Fix clang-format"
This reverts commit f42a5a0431.
2020-09-20 01:49:26 +02:00
bors[bot] ea1a7934e5
Merge #2878
2878: Max images (fixes #2148) r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-19 20:50:04 +00:00
Jupeyy a1eb5dc114 Max images(for editor, clamp for client and warning for mapconvert) (fixes #2148) 2020-09-19 21:22:21 +02:00
bors[bot] 04ea24b4f8
Merge #2869
2869: Fix MouseInside to only select one field (fixes #2868) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-19 19:12:02 +00:00
def f4d763c895 Init curl first, then call curl_version_info 2020-09-19 15:10:32 +02:00
Jupeyy 5208a588b8 Add unmasked entities for all mods 2020-09-19 14:44:24 +02:00
12pm aa18dc1d88 remove for more info 2020-09-19 13:40:19 +02:00
12pm f3bef4919f mention rules 2020-09-19 13:28:30 +02:00
def c31fc33cf2 Fix MouseInside to only select one field (fixes #2868) 2020-09-19 11:50:33 +02:00
bors[bot] 6ae7b19c4a
Merge #2865
2865: Fix localizing demo list r=Jupeyy a=def-

You can't store the result of Localize in a static, it will be removed
by switching to another language.

Thanks to Jupeyy for report

Co-authored-by: def <dennis@felsin9.de>
2020-09-18 21:42:20 +00:00
def 1cf68d7191 Fix localizing demo list
You can't store the result of Localize in a static, it will be removed
by switching to another language.

Thanks to Jupeyy for report
2020-09-18 23:33:51 +02:00
def f11679afb2 Implement censoring words on server 2020-09-18 19:18:08 +02:00
清歌 7ab35dc55e fix localhost lookup problem when ws enable 2020-09-18 23:02:25 +08:00
清歌 059a2a0a35 fix websockets behavior in net_socket_read_wait 2020-09-18 21:28:17 +08:00
Dennis Felsing 4317cb7af8
Merge pull request #2855 from def-/pr-kill-server-on-quit
Kill server on quit
2020-09-18 08:04:44 +02:00
def 848c8c992c Version 15.0.3 2020-09-18 07:57:54 +02:00
def 427450ddc3 Demo viewer: Ignore shortcuts when popup is open
As reported by Shyzo on Discord
2020-09-18 07:57:43 +02:00
Jupeyy 1270434f5e Fix skin prefix search crash 2020-09-18 06:27:18 +02:00
def 46b21020be Kill server on quit
As suggested by Ryozuki
2020-09-18 00:30:31 +02:00
def 3983bfeeef Version 15.0.2 2020-09-17 23:12:33 +02:00
def 9717d032ff Don't call atexit in forked process 2020-09-17 22:19:13 +02:00
def d5648f5cde Fix localizing in browser
Thanks to gerdoe for noticing
2020-09-17 21:54:24 +02:00
def 9da149f84b Localize control settings 2020-09-17 21:18:33 +02:00
def 2221881f79 Version 15.0.1 2020-09-17 21:06:55 +02:00
def da4a8c704b Fix running server from other directory 2020-09-17 21:06:02 +02:00
Dennis Felsing 8ad64820ef
Merge pull request #2830 from def-/pr-15
Version 15.0
2020-09-17 18:34:59 +02:00
Dennis Felsing 514e974667
Merge pull request #2849 from def-/pr-max-requests
Increase br_max_requests to 100
2020-09-17 18:34:44 +02:00
bors[bot] 93e592dcd9
Merge #2813
2813: Sort spectator view by team, then name (not score) (fixes #2808) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-17 16:07:28 +00:00
def 3e58d8b756 Increase br_max_requests to 100
As suggested by BannZay on Discord. We scale down when we notice that
no responses arrive. The idea is that player's internet has become
faster than when DDNet started, so increasing the default is ok.
2020-09-17 17:41:14 +02:00
清歌 b5592cc204
fix websockets client link problem in xp
implement a simple version of inet_ntop by myself
2020-09-17 23:23:16 +08:00
bors[bot] 65ca97a5fa
Merge #2820
2820: Server: Only recv new packets when we know they are waiting r=Jupeyy a=def-

Reduces the number of syscalls

Co-authored-by: def <dennis@felsin9.de>
2020-09-17 14:47:07 +00:00
bors[bot] da62510a2d
Merge #2840
2840: [Idea] Add some decent hover effects and colors r=def- a=Jupeyy

Generally, would be nice to have very decent hover effects and decent colors.

I just tried for fun adding hover effects to menu tabs(red for the quit button),

hover effects for the server browser items

and color for search/exclude

I'm not an artist, it doesnt look good, if someone wants to overtake, he/she would be very welcome todo so

![image](https://user-images.githubusercontent.com/6654924/93282252-44ee1a00-f7ce-11ea-8b16-5d563610c9ce.png)

![image](https://user-images.githubusercontent.com/6654924/93282271-50d9dc00-f7ce-11ea-89cf-8f1e38b4a6b7.png)

![screenshot_2020-09-16_03-38-40](https://user-images.githubusercontent.com/6654924/93282288-57685380-f7ce-11ea-8cbe-3f04f8d89bc4.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-17 14:19:22 +00:00
def 7dd611a2d0 Version 15.0 2020-09-17 16:11:44 +02:00
bors[bot] 9ea816c779
Merge #2817
2817: Don't exit(1) in video recorder on failure r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-17 14:07:42 +00:00
bors[bot] 21e080596a
Merge #2836 #2841 #2845
2836: Only make Esc key leave editor when no popup is open r=Jupeyy a=def-



2841: Fix ingame browser tab change (fixes #2839) r=Jupeyy a=def-



2845: Fix spacing in kick-vote menu (center tees and text) r=Learath2 a=def-

Old: ![screenshot-20200917@090205](https://user-images.githubusercontent.com/2335377/93431529-882ab480-f8c4-11ea-8e56-dfe903a5ae06.png)
New: ![screenshot-20200917@090226](https://user-images.githubusercontent.com/2335377/93431538-8cef6880-f8c4-11ea-8946-449e7aa6dea7.png)


Co-authored-by: def <dennis@felsin9.de>
2020-09-17 14:00:09 +00:00
bors[bot] 77cb30aec4
Merge #2733
2733: Implement on-demand skin downloader, remove Lappi's non-free skins (fixes #1166, fixes #2547) r=Learath2 a=def-

Seems to work on first try, I'm somewhat surprised :D

Future ideas:

- I haven't checked how the performance impact is of a new skin joining,
  might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
  want to compare modified time.
- Make all skins load on demand only to save some memory?

Co-authored-by: def <dennis@felsin9.de>
2020-09-17 13:49:23 +00:00
Jupeyy 1fe09f496c Add some decent hover effects and colors 2020-09-17 15:47:13 +02:00
def 24526d0fc8 Further websockets build fixes 2020-09-17 13:44:47 +02:00
def b5b218d67f Fix spacing in kick-vote menu (center tees and text) 2020-09-17 09:39:50 +02:00
def 81d30f838d Fix ingame browser tab change (fixes #2839) 2020-09-16 07:36:47 +02:00
Jupeyy 1cef3bf047 Only show new icons, when client is offline 2020-09-16 02:14:11 +02:00
bors[bot] 0bb24004dd
Merge #2837
2837: Don't allow zero/empty images(bcs malloc(0) and other things) r=def- a=Jupeyy

Would be nicer, if the map loader would check the map for such things, but since the backend works with the image data and assumes its valid, this prevents crashes.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-15 20:31:44 +00:00
Jupeyy 2a713ebe2c Don't allow malloc on empty images 2020-09-15 22:23:36 +02:00
def f42a5a0431 Fix clang-format 2020-09-15 22:17:09 +02:00
def 3cc1e47ec4 Implement on-demand skin downloader (fixes #1166)
Seems to work on first try, I'm somewhat surprised :D

Future ideas (not for this change):

- I haven't checked how the performance impact is of a new skin joining,
  might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
  want to compare modified time.
- Make all skins load on demand only to save some memory?
2020-09-15 22:17:08 +02:00
def 433881824a Only make Esc key leave editor when no popup is open 2020-09-15 21:57:09 +02:00
bors[bot] edb4462f8a
Merge #2814 #2818
2814: Remove saving to other servers r=Learath2 a=def-

sv_sql_valid_servernames is no longer required

2818: Load fonts from memory (fixes #2810) r=Learath2 a=def-

Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.

@QingGo Could you give this a try from the Github build artifacts? If not, I can provide you a nightly build.

Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:16:21 +00:00
def 6ce04d93f1 Server: Only recv new packets when we know they are waiting
Reduces the number of syscalls
2020-09-15 19:11:51 +02:00
bors[bot] c1d54da9f7
Merge #2826 #2829 #2835
2826: map_convert_07: Check for width/height 0 r=Learath2 a=def-

as suggested by Jupeyy

2829: Add libsteam_api.a to gitignore r=Learath2 a=def-



2835: Make spacing in top menu buttons consistent, fit for 5:4 r=Learath2 a=def-

![screenshot-20200915@184840](https://user-images.githubusercontent.com/2335377/93240346-4db9fe00-f784-11ea-9755-3a52f51d2755.png)


Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:08:45 +00:00
bors[bot] 3b0bb7d777
Merge #2816
2816: Implement context for translations (largely taken from Teeworlds) r=Learath2 a=def-

Missing: scripts/languages doesn't work yet, but the context can be
added manually, see german.txt for an example.

Co-authored-by: def <dennis@felsin9.de>
2020-09-15 17:02:00 +00:00
def 7a82779ff7 Make spacing in top menu buttons consistent, fit for 5:4 2020-09-15 18:49:43 +02:00
bors[bot] a2a2abb26c
Merge #2833
2833: Use 0.7 cursor r=def- a=Jupeyy

![image](https://user-images.githubusercontent.com/6654924/93222705-83a0b780-f76f-11ea-866a-b2be9f47296e.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-15 16:40:57 +00:00
Jupeyy dc3580d976 0.7 cursor 2020-09-15 16:18:12 +02:00
bors[bot] a4edac3969
Merge #2832
2832: Add new icons for demo, home and server browser r=def- a=Jupeyy

![image](https://user-images.githubusercontent.com/6654924/93217198-ff4b3600-f768-11ea-95a2-cd826b9ffbf5.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-15 14:07:57 +00:00
Jupeyy 6a352b40eb Add new icons for demo, home and server browser 2020-09-15 15:31:52 +02:00
QingGo d627b85202 add windows websockets client support 2020-09-15 20:54:33 +08:00
bors[bot] 981d5d4e99
Merge #2675
2675: support multiple modifiers for binds r=def- a=plsplsplslol



Co-authored-by: plsplsplslol <alpootagpro@gmail.com>
2020-09-15 08:37:38 +00:00
def 3daa798639 Implement script/languages support for contexts 2020-09-15 10:30:49 +02:00
def 7af517009c Implement context for translations (largely taken from Teeworlds)
Missing: scripts/languages doesn't work yet, but the context can be
added manually, see german.txt for an example.
2020-09-15 10:30:49 +02:00
bors[bot] 393f3deed4
Merge #2828
2828: Use resize instead of rescale r=def- a=Jupeyy

rescale doesn't clamp, and looks worse, might be slightly faster tho.

So i also renamed the config vars that might cause resizing and/or are not very useful

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-14 22:02:59 +00:00
Jupeyy 8b29240491 Use POT texture when resizing, when NOTP is not supported 2020-09-14 22:12:58 +02:00
Jupeyy 3eea399d37 Rename quality texture and compressed texture, because they should not be used 2020-09-14 21:34:56 +02:00
Jupeyy 9a4dd80a5e Remove rescale function, always use resize 2020-09-14 21:30:25 +02:00
def f9ec8c5696 map_convert_07: Check for width/height 0
as suggested by Jupeyy
2020-09-14 18:03:23 +02:00
bors[bot] c0f7a2bf03
Merge #2825
2825: Fix entity text & improve Grow r=def- a=Jupeyy

fixes #2822

@BannZay wanna check?

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-14 15:12:37 +00:00
Jupeyy fbdd66c092 Improve grow 2020-09-14 16:42:33 +02:00
Jupeyy 8923116324 Fix entity text 2020-09-14 16:42:21 +02:00
bors[bot] 3392933385
Merge #2819
2819: Fix compilation on MinGW Windows r=Learath2 a=def-

graphics.h:197:36: error: ‘uint8_t’ has not been declared

Co-authored-by: def <dennis@felsin9.de>
2020-09-14 14:08:34 +00:00
bors[bot] 3df140740c
Merge #2815
2815: Renamed tile names. r=def- a=gerdoe-jr

I didn't get why some tiles' names end with `END/START` and another with `DISABLE/ENABLE`, so, I just replaced all `END/START` with `DISABLE/ENABLE`.
Also, I renamed `TILE_BONUS` and `TILE_PENALTY`, because you need to check the variables' declarations/references for understanding their purposes.

Co-authored-by: Vlad <gerdoexx@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2020-09-14 14:02:05 +00:00
def a67a8e36aa clang-format: fix style 2020-09-14 16:00:51 +02:00
def 77d47a85ee Load fonts from memory (fixes #2810)
Missing: Freeing the memory again. But not so important since we keep
the same fonts until end of process anyway in our case.

@QingGo Could you give this a try from the Github build artifacts?
2020-09-13 23:06:12 +02:00
def 2c5f01a093 Fix compilation on MinGW Windows
graphics.h:197:36: error: ‘uint8_t’ has not been declared
2020-09-13 23:05:43 +02:00
def 062c897edd Don't exit(1) in video recorder on failure 2020-09-13 22:50:04 +02:00
Vlad be90f3f48b Replaced tile names. 2020-09-13 23:00:49 +03:00
def 0f8d682f81 Remove saving to other servers
sv_sql_valid_servernames is no longer required
2020-09-13 21:49:44 +02:00
def 3832d948bd Sort spectator view by team, then name (not score) (fixes #2808) 2020-09-13 21:31:10 +02:00
bors[bot] 5d64ed34aa
Merge #2805
2805: update libwebsocket to 4.x and fix bug and make client able to use websocket r=def- a=QingGo



Co-authored-by: QingGo <zyqingjohn@qq.com>
2020-09-13 19:10:36 +00:00
QingGo b64a0ef4c6 make client able to connect ws server with ws:// 2020-09-13 09:59:10 +08:00
bors[bot] 5228473ec9
Merge #2807
2807: Remove sv_team_lock command r=heinrich5991 a=BannZay

No map uses this command. Does not seems like this command is used anywhere.

Any reason to keep this command ?

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-12 22:33:38 +00:00
Andrii a81f46dee2 fix formatting 2020-09-13 01:16:31 +03:00
Andrii a2b149a114 remove sv_team_lock command 2020-09-13 00:46:49 +03:00
Andrii bea30a879d
Apply suggestions from code review
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-13 00:40:22 +03:00
Andrii 3835395591 allow to use config_retrieve on whole directory 2020-09-12 23:48:01 +03:00
QingGo 4ae0833701 use clang formatter 2020-09-12 01:43:42 +08:00
QingGo 3fa500aa60 update libwebsocket to 4.x and fix bug 2020-09-12 00:53:15 +08:00
heinrich5991 ffab6292ad
Merge branch 'master' into pr-start 2020-09-11 14:25:50 +02:00
def aeb8bcbd9a Show an error message on missing file 2020-09-11 09:59:05 +02:00
def 277040fc7c shell_execute: handle some failures 2020-09-11 09:47:19 +02:00
bors[bot] d720f74cfd
Merge #2800
2800: Style-fixed version of #2784 r=def- a=heinrich5991

Thanks to @Jupeyy for the original pull request.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-11 07:10:29 +00:00
bors[bot] 5ac6c3bac9
Merge #2803
2803: Always accept the local server name for saves r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-11 06:37:27 +00:00
heinrich5991 35228fb997 Always accept the local server name for saves 2020-09-11 06:10:53 +02:00
heinrich5991 aa46ca6bf9 Fix some style issues via scripts/fix_style.py, size_t 2020-09-11 00:47:38 +02:00
Jupeyy 1e1c16f83a Make override consistent 2020-09-11 00:34:43 +02:00
Jupeyy 3b403f76a9 Fix editor speedup brush 2020-09-11 00:34:43 +02:00
Jupeyy b83d8735fe Create entity textures seperately 2020-09-11 00:34:42 +02:00
bors[bot] f6e1ed5f19
Merge #2738
2738: Don't search the sorted array linearly r=heinrich5991 a=Learath2

Small optimization but it could start mattering with #2733

Co-authored-by: Learath <learath2@gmail.com>
2020-09-10 22:30:46 +00:00
bors[bot] 51483c2ff1
Merge #2789 #2797
2789: Refresh server browser immediately when updated ddnet info arrived r=heinrich5991 a=def-

At the moment it only happens the next time you press refresh.

Before we had it so that it always reloaded once the ddnet info arrived,
causing a quick flickering and lots of packets having to be resent every
time someone pressed refresh, even if nothing changed.

The new approach combines the advantages of both without the
disadvantages. An even nicer way would be to compare the json objects,
so that news and version updates don't matter, but our json library
doesn't seem to support that.

2797: dilate: Don't crash if file doesn't exist r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-10 22:24:06 +00:00
def d92e6ecb00 Use check_header_guards script 2020-09-11 00:03:31 +02:00
def 80b7ceb3d7 dilate: Don't crash if file doesn't exist 2020-09-10 23:25:33 +02:00
def c839dc96d9 Remove tools we don't need anymore
Following Jupeyys new renderer
2020-09-10 23:15:28 +02:00
def 8a6acfbb4a Fix loading bar by adding menu images to count 2020-09-10 22:56:59 +02:00
Zwelf 3a986fbe52 Fix SQL query style using clang-format 2020-09-10 20:24:34 +02:00
Zwelf a78e84d724 Only call sqlite3_expanded_sql when it exists
Only print expanded SQLite statement, when expanding function exists. This is
required to not bump the minimum required Ubuntu version, since Ubuntu 16.04
doesn't ship SQLite 3.14 or above. SQLite introduced ``sqlite3_expanded_sql`
in 3.14, Ubuntu 16.04 packages 3.11.

Disabled weak linking on MSVC, since it isn't supported.
2020-09-10 20:22:37 +02:00
Zwelf 88dc1c1a9c Add print functionality to SQLite 2020-09-10 20:16:42 +02:00
Zwelf 46b0ff354e Align InsertIgnore with other SQL query related functions 2020-09-10 20:16:42 +02:00
def f7b37eaf6a clang-format fixes 2020-09-10 20:16:09 +02:00
def a52c8a22a6 Quit without popup when it makes sense 2020-09-10 20:13:01 +02:00
def 419942ace4 Some more size improvements 2020-09-10 20:13:01 +02:00
def b07d0d21d6 Default to DDNet if no page selected 2020-09-10 20:13:01 +02:00
def 57e2905e24 Clean up econ stuff, don't need it 2020-09-10 20:13:01 +02:00
def 0f051def21 Fix cbSize for Windows 2020-09-10 20:13:01 +02:00
def 0aef743d7a Move News/Website/Wiki/Discord to bottom left 2020-09-10 20:13:01 +02:00
def 83d297a370 Server -> Econ (in preparation of the real change) 2020-09-10 20:13:01 +02:00
def 2ca613d982 Back -> Menu 2020-09-10 20:13:01 +02:00
def 90f3199d98 Implement opening server on Windows (reading autoexec_server.log not working yet) 2020-09-10 20:13:01 +02:00
def 33eefa449b Only run server when pressing R 2020-09-10 20:13:01 +02:00
def b2cfdc57eb Clean up top menus, add back button 2020-09-10 20:13:01 +02:00
def 4ca4449ee4 Use Storage for opening autoexec_server.log 2020-09-10 20:13:01 +02:00
def b522bbbb96 Localize the Learn link 2020-09-10 20:13:01 +02:00
def 9a5ee2cdbf Auto-bind F7 to show server console if it's free 2020-09-10 20:13:01 +02:00
def 2cdc7d0faf Adapt 0.7 start menu
- Working Local Server button (needs fixing for Windows)
- Highlight buttons if server is running, new news is out and editor has
  unsaved changes
2020-09-10 20:13:01 +02:00
bors[bot] d1aa014357
Merge #2793
2793: Add some more space for Countries & Types r=Learath2 a=def-

Since DDNet has too many locations now. A scroll wheel would be even better for the future if someone wants to implement that.

![screenshot-20200910@175801](https://user-images.githubusercontent.com/2335377/92758709-4ca55d00-f38f-11ea-924d-f13b998403f7.png)

Co-authored-by: def <dennis@felsin9.de>
2020-09-10 16:52:55 +00:00
def cddfd6836b Add some more space for Countries & Types
Since DDNet has too many locations now
2020-09-10 17:59:40 +02:00
Learath 1f261198a7 Don't search the sorted array linearly 2020-09-09 21:10:40 +03:00
def 279deffa86 Refresh server browser immediately when updated ddnet info arrived
At the moment it only happens the next time you press refresh.

Before we had it so that it always reloaded once the ddnet info arrived,
causing a quick flickering and lots of packets having to be resent every
time someone pressed refresh, even if nothing changed.

The new approach combines the advantages of both without the
disadvantages. An even nicer way would be to compare the json objects,
so that news and version updates don't matter, but our json library
doesn't seem to support that.
2020-09-09 17:51:32 +02:00
def 7bea697114 Add some keyboard shortcuts for demos 2020-09-08 11:42:52 +02:00
def 757998e7d0 Fix some 5:4 rendering in demo menu & recorder menu 2020-09-08 11:37:37 +02:00
def 7abe20175a Version 14.7.1, fix Mac build 2020-09-08 07:48:25 +02:00
def 9bbd7f6259 Improve performance of /points
No need to do the rank() calculation at all

by heinrich5991
2020-09-07 23:11:24 +02:00
def 9ef407fa13 Version 14.7 2020-09-07 18:04:46 +02:00
def 28cd437684 Document which commands only work in initial config (fixes #2773) 2020-09-07 12:31:00 +02:00
def a2b5d639a0 Fix duplicate teamranks (fixes #2405)
by ordering names in binary collation, consistent with C++ std::sort

Required since the official DDNet DB uses utf8mb4_general_ci default collation
2020-09-07 12:12:55 +02:00
def d492d6d270 Fix duplicate teamranks (fixes #2405)
by ordering names in binary collation, consistent with C++ std::sort

Required since the official DDNet DB uses utf8mb4_general_ci default collation
2020-09-07 12:10:23 +02:00
def 45457b6185 Bundle FFmpeg for everything
so that we can enable videorecorder by default

Works as expected.
2020-09-07 07:04:29 +02:00
bors[bot] cbc272fd5d
Merge #2758 #2769 #2772
2758: Remove the rudimentary fuzzing since no one uses it anyway r=heinrich5991 a=def-



2769: Update front.png by Soreu r=heinrich5991 a=def-



2772: Dont predict camera position on spectator changed r=heinrich5991 a=BannZay

No reason to predict camera position in case when we just changed spectator.
But tbh I have not found a big reason to predict it at all.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-06 23:25:16 +00:00
bors[bot] acea5bd955
Merge #2747
2747: Fix proof circle position in editor r=heinrich5991 a=def-

As reported by Ravie on Discord. Tee is not drawn exactly in center.

Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:19:01 +00:00
bors[bot] e3cfb23f28
Merge #2742 #2745
2742: Add str_utf8_copy that trim broken utf8 sequence at the end. r=heinrich5991 a=TsFreddie

Currently this replaces `str_copy` text input and clipboard paste in chat. Many places may need the same treatments, like steam names.

![image](https://user-images.githubusercontent.com/3797859/92263741-08b8e080-eed5-11ea-84a5-b7f070ded260.png)

Test string:
abcd今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打开了家门咱迎春风今天是个好日子心想的事儿都能成今天是个好日子打

2745: Update mapres by mind r=heinrich5991 a=def-

Adapted from 0.7 for new renderer. Not sure if this makes sense :D

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:12:04 +00:00
bors[bot] 742ee9094c
Merge #2744
2744: Allow different timeouts for different downloads r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:05:57 +00:00