Commit graph

9209 commits

Author SHA1 Message Date
def 5a9d93f160 Initialize pointer in dragger
How did this not blow up all day long for years?!

Found by UBSAN:

/home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29: runtime error: member call on address 0x0000013319b8 which does not point to an object of type 'CCharacter'
0x0000013319b8: note: object has invalid vptr
 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
    #0 0x5501de in CDragger::Move() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:32:29
    #1 0x5522c2 in CDragger::Tick() /home/teeworlds/src/master/src/game/server/entities/dragger.cpp:153:3
    #2 0x5eb11e in CGameWorld::Tick() /home/teeworlds/src/master/src/game/server/gameworld.cpp:261:11
    #3 0x58d660 in CGameContext::OnTick() /home/teeworlds/src/master/src/game/server/gamecontext.cpp:751:10
    #4 0x4afefe in CServer::Run() /home/teeworlds/src/master/src/engine/server/server.cpp:2558:19
    #5 0x4c26fd in main /home/teeworlds/src/master/src/engine/server/server.cpp:3551:21
    #6 0x7f2c8cc9309a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #7 0x451509 in _start (/home/teeworlds/servers/DDNet-Server-ubsan+0x451509)
2020-11-04 23:06:45 +01:00
def fea4481f8d Fix network x_ check (thanks to Jupeyy) 2020-11-04 19:28:06 +01:00
bors[bot] dcfdd05911
Merge #3237
3237: Create fallback wordlist in sourcecode (fixes #3206) r=Learath2 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-03 23:45:20 +00:00
Zwelf 5914dbb8fa Fix UUID in test case comment for teehistorian-ddnetver-old@ddnet.tw 2020-11-03 23:00:39 +01:00
def 06b534c07d Create fallback wordlist in sourcecode (fixes #3206) 2020-11-03 17:01:16 +01:00
bors[bot] 9b64b9ba1d
Merge #3222
3222: Kick-voting someone from team doesn't kill locked team (fixes #3207) r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-03 11:59:34 +00:00
bors[bot] 643bbb53c0
Merge #3233
3233: Fix clang-tidy in text.cpp r=heinrich5991 a=def-

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-03 11:52:36 +00:00
def 2c98f2b76b Kick-voting someone from team doesn't kill locked team (fixes #3207) 2020-11-03 08:37:56 +01:00
def 27625832f7 Fix clang-tidy in text.cpp 2020-11-03 08:30:12 +01:00
TsFreddie 996e519fe6 hint for disabling debug mode 2020-11-03 15:06:31 +08:00
bors[bot] 4abf699726
Merge #3117
3117: Enable further clang-tidy checks to modernize the code r=heinrich5991 a=def-

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

And fix the code:

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

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

First steps for #3088

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

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

## Checklist

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


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-11-02 21:48:33 +00:00
bors[bot] d1cc109933
Merge #3228
3228: Add m_PosEnv (of sound sources) as index that must be offset when appending a map r=heinrich5991 a=Patiga

If you append a map to another, all indices of it must be offset. This doesn't happen with the position envelope index of sound sources, meaning it would (if the original maps had at least one envelope) point to the wrong envelope.

## Checklist

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


Co-authored-by: Patiga <dev@patiga.eu>
2020-11-02 21:40:50 +00:00
def 63c093c065 Get rid of remaining strcpy calls 2020-11-02 22:40:41 +01:00
def 165857a5a8 Fix variable names manually 2020-11-02 22:40:40 +01:00
def b1f0fd8969 Enable modernize-loop-convert clang-tidy check
and run clang-format afterwards

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

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

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


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

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

## Checklist

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


Co-authored-by: def <dennis@felsin9.de>
2020-11-02 20:34:49 +00:00
Jupeyy 532d845aed Fix skin load 2020-11-02 21:21:57 +01:00
Patiga 143074349e Add m_PosEnv as index that must be offset when appended 2020-11-01 23:04:33 +01:00
Jupeyy 1d912b2df6 Don't align text with scoreboard open 2020-11-01 04:56:50 +01:00
Jupeyy c984203c2d Revert "Disable Chat render on TAB and fix tee icon position"
This reverts commit 75987a26cf.
2020-11-01 04:48:10 +01:00
bors[bot] 84ed6b7be2
Merge #3221
3221: Revert "Show halloween skins only on Halloween" r=Jupeyy a=def-

People are clearly unhappy with this event, so let's revert it. On
servers I've set events 0 already.

This reverts commit ae90bdf3f9.

## 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-31 22:55:33 +00:00
bors[bot] 664fa86071
Merge #3214
3214: Sort skins without case (fixes #3213) r=Jupeyy a=def-

![screenshot-20201030@100602](https://user-images.githubusercontent.com/2335377/97680791-8f360c80-1a97-11eb-8cdf-87f8c2014d47.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-31 22:47:52 +00:00
def bb7ff2a482 Revert "Show halloween skins only on Halloween"
People are clearly unhappy with this event, so let's revert it. On
servers I've set events 0 already.

This reverts commit ae90bdf3f9.
2020-10-31 09:51:06 +01:00
Дядя Женя 71079f0944 Fix overlapping of combined binds with modifiers 2020-10-31 01:23:07 +03:00
Дядя Женя 75987a26cf Disable Chat render on TAB and fix tee icon position 2020-10-30 21:51:59 +03:00
bors[bot] 1f6eff2cd1
Merge #3204
3204: Much more readable Call Vote menu and code r=def- a=Banana090

I find "Call Vote" menu useless af right now, because it's simply impossible to read it. So when you want to call vote for a map you open website and find the one you want, after that making /map skipping the "Call Vote" menu completely. It's useful for calling for random map btw, but anyway too ugly to look at.

**OLD LOOK**
![callvoteold](https://user-images.githubusercontent.com/39315809/97338602-a48e1980-1892-11eb-8c93-5d8656d3abeb.png)

**NEW LOOK**
![callvotenew](https://user-images.githubusercontent.com/39315809/97339380-9096e780-1893-11eb-8c3c-1f8630096d9f.png)

**NEW LOOK (RconAuted)**
![callvotenewrcon](https://user-images.githubusercontent.com/39315809/97340605-0e0f2780-1895-11eb-898b-3c3b8258cced.png)



Changed nothing, but row and text size + View rect size, because for some reason it was small for preserving space for RCON Auted users. Why?
Also changed the name of rect "Extended" to "RconExtension" to make it more clear what is it for.

Would be cool also to remove all that junk that is not actual votes from DDNet server vote list (finishers, average time) and merge it into one line with map's name. 

## Checklist

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


Co-authored-by: Дядя Женя <spy090@yandex.ru>
2020-10-30 09:08:51 +00:00
def 055eadd88d Sort skins without case (fixes #3213) 2020-10-30 10:05:48 +01:00
Дядя Женя d681cc6787 Rcon Panel looks just like before in call vote 2020-10-30 06:40:15 +03:00
bors[bot] 641d4db676
Merge #3171
3171: Some chat fixes r=def- a=Jupeyy

Very round:
![screenshot_2020-10-22_22-16-56](https://user-images.githubusercontent.com/6654924/96926091-6a4d0280-14b5-11eb-81bf-387019f29562.png)

bit round:
![screenshot_2020-10-22_22-17-33](https://user-images.githubusercontent.com/6654924/96926098-6de08980-14b5-11eb-8086-6b1ffc48bc86.png)

No rounding left:
![screenshot_2020-10-22_22-18-16](https://user-images.githubusercontent.com/6654924/96926111-72a53d80-14b5-11eb-93d3-cb3e4ff8b475.png)

No rounding at all:
![screenshot_2020-10-22_22-18-54](https://user-images.githubusercontent.com/6654924/96926120-76d15b00-14b5-11eb-8ab8-1cb1dfc8c1a8.png)

old chat:
![screenshot_2020-10-22_22-28-43](https://user-images.githubusercontent.com/6654924/96926568-04ad4600-14b6-11eb-92eb-ff3400edc499.png)


Just gave some examples so its easier to see what is nice

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-10-29 17:04:14 +00:00
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
Дядя Женя 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
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
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
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