Commit graph

7150 commits

Author SHA1 Message Date
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
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
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
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 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
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
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] 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 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
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
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
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 3eea399d37 Rename quality texture and compressed texture, because they should not be used 2020-09-14 21:34:56 +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 8923116324 Fix entity text 2020-09-14 16:42:21 +02:00
def a67a8e36aa clang-format: fix style 2020-09-14 16:00:51 +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
Andrii a2b149a114 remove sv_team_lock command 2020-09-13 00:46:49 +03: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
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 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
def d92e6ecb00 Use check_header_guards script 2020-09-11 00:03:31 +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 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 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 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
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
Andrii 7069d26b5a dont predict camera position on spectator changed 2020-09-07 02:02:17 +03:00
bors[bot] 85f8095295
Merge #2767
2767: Don't lock SQL writes r=Zwelf a=def-

The slow query logs are full of this:

    # Time: 200906 21:03:43
    # User@Host: teeworlds[teeworlds] @ ger6.ddnet.tw [89.163.212.120]
    # Thread_id: 101540  Schema: teeworlds  QC_hit: No
    # Query_time: 11.012166  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
    # Rows_affected: 0  Bytes_sent: 67
    SET timestamp=1599419023;
    LOCK TABLES record_teamrace WRITE, record_teamrace AS r WRITE;

Do we really need these lock? See also
https://dev.mysql.com/doc/refman/5.7/en/table-locking.html

> InnoDB tables use row-level locking so that multiple sessions and
> applications can read from and write to the same table simultaneously,
> without making each other wait or producing inconsistent results. For
> this storage engine, avoid using the LOCK TABLES statement, because it
> does not offer any extra protection, but instead reduces concurrency.

Co-authored-by: def <dennis@felsin9.de>
2020-09-06 22:49:26 +00:00
def f89766034c Don't lock SQL writes for teamrace
The slow query logs are full of this:

  # Time: 200906 21:03:43
  # User@Host: teeworlds[teeworlds] @ ger6.ddnet.tw [89.163.212.120]
  # Thread_id: 101540  Schema: teeworlds  QC_hit: No
  # Query_time: 11.012166  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0
  # Rows_affected: 0  Bytes_sent: 67
  SET timestamp=1599419023;
  LOCK TABLES record_teamrace WRITE, record_teamrace AS r WRITE;

Do we really need these lock? See also
https://dev.mysql.com/doc/refman/5.7/en/table-locking.html

> InnoDB tables use row-level locking so that multiple sessions and
> applications can read from and write to the same table simultaneously,
> without making each other wait or producing inconsistent results. For
> this storage engine, avoid using the LOCK TABLES statement, because it
> does not offer any extra protection, but instead reduces concurrency.
2020-09-07 00:34:01 +02:00
Jupeyy bfd24d7dd8 Clamp camera zoom 2020-09-07 00:19:38 +02:00
Jupeyy ebe5b51230 Clamp kill border count 2020-09-06 23:58:54 +02:00
TsFreddie badc49cac7 Revert "Revert & use "str_utf8_truncate" instead"
This reverts commit b045a3d6ee.
2020-09-06 20:54:57 +01:00
def 4c74efd93f Version 14.6.2 2020-09-05 19:25:15 +02:00
bors[bot] 7fd43163b7
Merge #2751 #2752 #2756
2751: More aggressive analysis & check 2.0 gl Functions that were used r=def- a=Jupeyy

If even that fails, I'm out of ideas

Checks all texture shaders, checks all functions used.

2752: Can't detect if paused on KoG, so don't show button r=def- a=def-

Since they're running an old version of DDNet server

2756: Don't deactivate menu when a popup is active r=def- a=Learath2

Deactivating menu while a popup is active causes the menu to never open again.

Reported by Anxton on discord.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Learath <learath2@gmail.com>
2020-09-05 17:10:35 +00:00
def e162045026 Can't detect if paused on KoG, so don't show button
Since they're running an old version of DDNet server
2020-09-05 19:06:12 +02:00
Learath 9e35752d1c Don't deactivate menu when a popup is active 2020-09-05 18:13:32 +03:00
Jupeyy 89a6251ad7 Add message popup again 2020-09-05 16:54:20 +02:00
TsFreddie b045a3d6ee Revert & use "str_utf8_truncate" instead 2020-09-05 00:51:39 +01:00
def a496583a93 Fix proof circle position in editor
As reported by Ravie on Discord. Tee is not drawn exactly in center.
2020-09-04 23:57:21 +02:00
plsplsplslol 4326d00df9 fix style and reomved repeated code 2020-09-04 13:49:14 -07:00
def b7c3a6dfd8 Allow different timeouts for different downloads 2020-09-04 19:58:32 +02:00
TsFreddie 44c699b812 Fix unicode pasting in DoEditBox 2020-09-04 18:03:08 +01:00
TsFreddie 92d08d07de add str_utf8_copy 2020-09-04 17:34:27 +01:00
def 2e29005549 Version 14.6.1 2020-09-04 18:23:43 +02:00
def c3f9dc7c9f INSERT OR IGNORE on sqlite 2020-09-04 16:12:12 +02:00
Dennis Felsing 0d3489e0ef
Merge pull request #2732 from def-/pr-14-6
Version 14.6
2020-09-04 14:41:55 +02:00
bors[bot] 62e52b829e
Merge #2720
2720: Add buttons for Kill and Pause r=Learath2 a=def-

Seems more useful than Spectate and Connect Dummy, both of which are often mistaken by newcomers.
![screenshot-20200903@120548](https://user-images.githubusercontent.com/2335377/92101991-37a05b00-edde-11ea-8505-f1aaa275e18d.png)

Co-authored-by: def <dennis@felsin9.de>
2020-09-04 12:33:26 +00:00
def 69e6a8fa41 Add buttons for Kill and Pause
Seems more useful than Spectate and Connect Dummy, both of which are
often mistaken by newcomers.

Make button sizes more consistent

Hide buttons that make no sense
2020-09-04 12:39:53 +02:00
def 92766b796c Update cl_nameplates_friendmark documentation 2020-09-04 12:16:28 +02:00
def 3a730cc30d Version 14.6 2020-09-04 12:03:45 +02:00
def e613f7df7f Allow loading from any server
Since we are switching to a single write sql server for sake of
simplicity
2020-09-03 22:56:22 +02:00
def 0ba18cd891 Inform client about failure to join because of invalid utf8 2020-09-03 20:34:05 +02:00
Andrii 701bbab0bd refresh on max ping filter changed 2020-09-03 04:08:34 +03:00
bors[bot] dac3c782d3
Merge #2713
2713: allow empty max ping filter r=heinrich5991 a=BannZay

The inconvenieces I discovered so far:
1. You got to write 999 to "disable" this filter
2. If you try to clear this field and then type 75 then the field will contain 750 because the last zero is bugged at this point
Those are fixed

What I would like to be fixed as well (not sure if I gona do this soon):
1. Update browser servers live without refreshing. You press refresh - you receives all the servers and then you should be able (but currently not) to filter them out without pressing on "Refresh" button again but just by changing the max ping value

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-03 00:37:47 +00:00
Andrii b1d5538a96
fix style
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-03 00:08:33 +03:00
Andrii a215e375db allow empty max ping filter 2020-09-02 19:26:26 +03:00
bors[bot] 197fe955e1
Merge #2674
2674: Add nameplates friend marks r=heinrich5991 a=BannZay

Problem: when I play with a friend in team 0, and there are many players nearby, I cannot distinguish him due to nameplates overlapping. It's getting worse when they are in freeze.

Solution: Mark your teammate as "Friend" and setup "cl_nameplates_friendmark"

Result:
![v2](https://user-images.githubusercontent.com/17499770/91647684-08988b00-ea66-11ea-9407-336437391b4f.png)


Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-02 16:12:15 +00:00
Andrii 271f0d8049 remove cl_nameplates_friendMark 2 2020-09-02 19:10:48 +03:00
bors[bot] ca30afdd66
Merge #2710
2710: Fix layers right click on item opens menu for previously selected (left clicked) item r=heinrich5991 a=BannZay

```
Im 'corneumToday at 16:55
when i have a layer selected and rightclick on another one to change its properties, it doesnt switch to that layer. that hasnt always been this way and its throwing me off lately
especially because it still opens the menu for the other layer
```

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-02 15:59:48 +00:00
Andrii 5ef0270cd2 Fix map details layout 2020-09-02 18:28:28 +03:00
Andrii e156cd570c keep layers selection on group right click 2020-09-02 18:11:57 +03:00
Andrii 392f58ae2f select layer under mouse pointer on right click 2020-09-02 18:11:24 +03:00
bors[bot] 9b334e6fcf
Merge #2708
2708: Disabling 3.3 in settings tab should reset to version 3.0 r=def- a=Jupeyy

We don't have a way to query the default config value, except including the config_variables.h, do we?

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-02 06:14:33 +00:00
Jupeyy 93a86f265f Disabling OpenGL 3.3 in settings tab should reset the OpenGL version to the configs default 3.0 2020-09-02 07:53:03 +02:00
bors[bot] ea7b2671bc
Merge #2691 #2701 #2702 #2705
2691: Also check for divisibility by 16 of height (fixes #2687) r=heinrich5991 a=def-



2701: Set search field active when opening file dialog in editor r=heinrich5991 a=def-



2702: Remove fallback for Teeworlds' settings.cfg (partially fixes #2698) r=heinrich5991 a=def-



2705: Clarify kill and /kill r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-01 14:25:09 +00:00
def 253c8e00b2 Clarify kill and /kill 2020-09-01 15:35:17 +02:00
def c0f8ad50dc Set search field active when opening file dialog 2020-09-01 09:48:51 +02:00
def 19d9741438 Rename m_aFileDialogActivate to m_FileDialogActivate 2020-09-01 09:48:13 +02:00
Jupeyy cf80537eb8 Fix entities text size not recreating new texture (fixes #2438) 2020-09-01 09:13:47 +02:00
Andrii 2969d93941 disable mouse buttons if console not closed 2020-08-31 22:40:57 +03:00
Andrii 74f729109e Set blendmode on background render 2020-08-31 17:16:40 +03:00
def b718282def Add warning for editor as well 2020-08-31 15:08:04 +02:00
def 9dc6a1c1c2 Remove Quality Textures & Texture Compression from graphics menu (fixes #2676)
Since people just randomly click it and then complain about bad looking
graphics
2020-08-31 13:25:16 +02:00
def 2b0e13db53 Add platform and arch in console output 2020-08-31 12:05:50 +02:00
Andrii e0616b38d7 add cl_nameplates_friendmark 2 2020-08-30 14:54:42 +03:00
Dennis Felsing 92616f1a55
Merge pull request #2664 from ddnet/pr-revert-revert
Revert "Revert Jupeyy's OpenGL changes" (fixes #2659)
2020-08-30 10:55:15 +02:00
plsplsplslol 6782f93419 support multiple modifiers for binds 2020-08-29 17:04:36 -07:00
Andrii 90d1a93f40 add friend nameplate marks 2020-08-30 02:06:31 +03:00
bors[bot] 3101747d46
Merge #2666
2666: Non divisible by 16 texture resize and warning r=heinrich5991 a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-29 15:25:35 +00:00
Jupeyy b1e98b598b Show warnings with non divisible by 16 textures(3D/2D array textures) 2020-08-29 17:04:30 +02:00
Dennis Felsing 958d75abf1
Merge pull request #2663 from def-/pr-duplicate-db
Ignore duplicate records when inserting (fixes #2636)
2020-08-29 15:02:46 +02:00
bors[bot] 446270549c
Merge #2667
2667: Fix server port in teehistorian r=def- a=heinrich5991

Official servers weren't affected because they didn't use the default of
`sv_port 0`.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-08-29 12:34:33 +00:00
heinrich5991 31cfa9250d Fix server port in teehistorian
Official servers weren't affected because they didn't use the default of
`sv_port 0`.
2020-08-29 14:14:37 +02:00
bors[bot] a6738d9fd6
Merge #2635
2635: We don't just list countries, but also regions like EU  r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-29 10:37:52 +00:00
def 63c782bb46 We don't just list countries, but also regions like EU 2020-08-29 12:31:17 +02:00
def c85ffb90af Revert "Revert Jupeyy's OpenGL changes"
This reverts commit 3eab3f5eb7.
2020-08-29 12:10:53 +02:00
def 63f6ecd19d Ignore duplicate records when inserting (fixes #2636) 2020-08-29 08:26:03 +02:00
Learath fbb498588c Missed a vote case 2020-08-27 19:48:19 +03:00
def 38e583f2f0 Version 14.5.1 2020-08-26 20:04:25 +02:00
def 3eab3f5eb7 Revert Jupeyy's OpenGL changes
Emergency-revert for 14.5.1 release, too many problems
2020-08-26 20:03:22 +02:00
Andrii 620f67af15 Refresh browser on Indicate map finish click 2020-08-26 20:23:25 +03:00
bors[bot] 9ba36991a9
Merge #2655
2655: Entity text should use space more effectively r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-26 16:07:58 +00:00
Jupeyy 410c4b3250 Entity text should use space more effectivly 2020-08-26 15:56:23 +02:00
bors[bot] efdd35439e
Merge #2653
2653: Fix background map loading r=def- a=Jupeyy

As reported.

Tested all possible contexts, hope this is right now

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-26 13:49:30 +00:00
Jupeyy 14d383ef15 Fix background map loading 2020-08-26 15:25:44 +02:00
trml c98a1f0a59 Only send pain sound in freeze if fire was released 2020-08-25 22:45:23 +02:00
def 18103935d5 Version 14.5 2020-08-25 18:21:22 +02:00
bors[bot] 694db44ee2
Merge #2598
2598: Allow specifying an OpenGL version manually r=def- a=Jupeyy

Ofc don't merge, we'll test it first, and if we want merge it, i'd need to enable shader compability for OpenGL 4+, and general support for OpenGL 3.1 and 3.2(bcs i think they already don't allow some older GL commands).

Also i never really read in the OpenGL 1.x specification, i remember that older OpenGL versions required glBegin and stuff like that

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-25 15:35:30 +00:00
bors[bot] f2cb651075
Merge #2615
2615: Use player name from the Steam API as fallback r=def- a=heinrich5991

Fixes #2605.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-08-25 15:23:42 +00:00
heinrich5991 bfe7b3cbeb Use player name prefixed with "[D] " for the dummy name 2020-08-25 16:22:03 +02:00
heinrich5991 5d83e9177f Use player name from the Steam API as fallback
Fixes #2605.
2020-08-25 16:21:58 +02:00
bors[bot] 5b8e8ba208
Merge #2631
2631: Enable "Switch weapon on pickup" by default r=heinrich5991 a=def-

As voted in Discord, suggested by Lady Saavik

Co-authored-by: def <dennis@felsin9.de>
2020-08-25 11:14:11 +00:00
bors[bot] 836863b213
Merge #2637
2637: Send larger distance when zooming r=heinrich5991 a=def-

since sometimes with dyncam it can be just at the border.

As reported by Lady Saavik

Co-authored-by: def <dennis@felsin9.de>
2020-08-25 11:07:16 +00:00
trml 4abe8caab8 Sort servers by a combination of players and ping as default 2020-08-24 23:25:45 +02:00
def d24dbd01ae Send larger distance when zooming
since sometimes with dyncam it can be just at the border.

As reported by Lady Saavik
2020-08-24 20:11:53 +02:00
def d5045ce691 Enable "Switch weapon on pickup" by default
As voted in Discord
2020-08-23 10:33:49 +02:00
Jupeyy 3117a936a9 Do not create 2D textures, if not required 2020-08-23 08:53:26 +02:00
def 6718d06de3 Version 14.4.1 2020-08-23 08:02:24 +02:00
Jupeyy a07e9ac2cf Add OpenGL 1.x, 2.x, 3.x support (fixes #2619) (fixes #2607) 2020-08-22 10:22:51 +02:00
Dennis Felsing dbb9c662ba
Merge pull request #2617 from Jupeyy/pr_font_fallback
Font fallback
2020-08-20 20:34:48 +02:00
def a388b709d6 Generalize loading fallback fonts 2020-08-20 19:48:08 +02:00
def c458ee52b0 Remove need for custom certificate
in anticipation of using CloudFlare
2020-08-19 17:54:05 +02:00
Dennis Felsing b147950ef1
Merge pull request #2604 from def-/pr-14.4
Version 14.4
2020-08-19 15:55:46 +02:00
bors[bot] 607f5f0014
Merge #2594
2594: Add support for PLATFORM_SUFFIX define, Don't bother Steam users with red update text r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-19 13:33:14 +00:00
def 99cf35d461 Don't bother Steam users with red update text 2020-08-19 13:41:11 +02:00
def 03ae471060 Version 14.4 2020-08-19 13:28:23 +02:00
Jupeyy 7450e354de Add OpenGL 4.x support & cleanup 2020-08-19 08:42:09 +02:00
Jupeyy c2ce132ba3 Allow specifying an OpenGL version manually 2020-08-19 07:04:54 +02:00
Edgar 05d19089ae
Add DoxyFile and document CUIRect 2020-08-18 12:50:25 +02:00
Dennis Felsing 2451f7bea1
Merge pull request #2580 from def-/pr-14.3.3
Version 14.3.3
2020-08-18 11:01:05 +02:00
bors[bot] ac1649d13b
Merge #2579 #2588
2579: Ship map_convert_07 executable, allow drag'n'drop and ship Gold Mine map (with sixup version) instead of Kobra 4 and Goo! r=def- a=def-



2588: Add instructions about how to kill and pause game r=def- a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-18 08:52:26 +00:00
def 1c583e5569 Add instructions about how to kill and pause game
As suggested by Lukas Kawalec on Discord
2020-08-18 10:32:44 +02:00
bors[bot] 579b763575
Merge #2566
2566: Optimization: Don't calculate with too small fraction r=heinrich5991 a=def-

since it won't add up to anything anyway.

Hopefully doesn't break any physics.

Co-authored-by: def <dennis@felsin9.de>
2020-08-17 19:04:38 +00:00
heinrich5991 535dc09e6f
Merge pull request #2581 from def-/pr-ctrl-u
Add ctrl-u to delete entire line, fix server browser keys when nothing was selected
2020-08-17 18:28:56 +02:00
def 3ca4dadb92 Allow server list key bindings when nothing was selected 2020-08-17 10:14:33 +02:00
def bd3656f6ad Implement ctrl-u in lineinput to clear 2020-08-17 10:14:24 +02:00
def 7032249b26 Fix leak when loading map in editor (fixes #2573) 2020-08-17 00:09:07 +02:00
def 99d1c4939a Version 14.3.3 2020-08-16 22:46:22 +02:00
plsplsplslol 8abf00b52c move checkpoint to debug 2020-08-15 17:00:02 -07:00
Zwelf 52af88826c Allow switching weak/strong with saving and loading 2020-08-13 16:19:07 +02:00
def 2f4eac2cf3 Optimization: Don't calculate with too small fraction
since it won't add up to anything anyway.

Hopefully doesn't break any physics.
2020-08-13 13:15:59 +02:00
bors[bot] 875bcea1e9
Merge #2571
2571: Add +resetdummy r=def- a=ardadem

Closes #2053

Co-authored-by: Arda Demir <ddmirarda@gmail.com>
2020-08-13 08:48:51 +00:00
Arda Demir 35995322d7 Add +resetdummy 2020-08-13 11:19:13 +03:00
Zwelf f3619c27ee Remove incorrect check when inserting team ranks
Can be reliable reproduced by finishing in this sequence:

1. A, B
2. A, C
3. B, C <- triggers error

Fixes #2568
2020-08-13 09:58:56 +02:00
Zwelf a866c3e9b7 Fix team rank not updating after SQLite update 2020-08-12 10:57:43 +02:00
def 048bb992bb Version 14.3.2 2020-08-11 14:07:16 +02:00
def a8aeaa4cb6 Editor: Fix Left/right arrow keys when editing text
as reported by Silex
2020-08-11 12:21:33 +02:00
def e0c06464d2 Version 14.3.1 2020-08-10 23:43:10 +02:00
Arda Demir fabc194081 Flag afk when player timed-out 2020-08-10 21:59:31 +03:00
Dennis Felsing 77d61973fa
Merge pull request #2545 from def-/pr-version-14.3
Version 14.3
2020-08-10 17:50:29 +02:00
Dennis Felsing 9d4a77130c
Merge pull request #2541 from def-/pr-editor
Arrow key support in editor
2020-08-10 17:50:14 +02:00
def 4ceb4ddb9f Version 14.3 2020-08-10 17:50:05 +02:00
def 285701695b Prevent crash by keeping m_SelectedImage/Sound in correct range 2020-08-10 17:41:58 +02:00
def 29332ea72e Editor: Add ctrl+n for new map, ctrl+a to append map, add hints 2020-08-10 09:28:36 +02:00
bors[bot] b06bea7c04
Merge #2465
2465: Sqlite3 support and prepared statements r=heinrich5991 a=Zwelf

This PR changes the abstraction layer of the score backend to thin abstractions over the MySQL and SQLite3 library. It executes all Queries in one worker thread making it easier to use the ddnet thread pool. This doesn't change much, because each the mysql-connection was locked with `m_SqlLock` beforehand, serializing writes and reads respectively.

Behavior change (even though I tried to minimize them):

* `sv_use_sql` is used to determine if mysql server should be added
* `sv_sql_failure_file` is replaced by `sv_sqlite_file`
* `sv_sqlite_file` is either used as a backup server when `sv_use_sql` is enabled or as the primary read+write server when `sv_use_sql` is disabled
* `/load` now escapes the like-string

Since I am not good at designing config file commands, I would appreciate feedback on this part.

WIP:
* [x] rewrite SQL statements to work in both MySQL and SQLite (preferable just ANSI-SQL)
  * [x] create tables (`COLLATE BINARY` and encoding info)
  * [x] store rank (UPSERT for points)
  * [x] load birthday (different function in sqlite for time handling)
  * [x] `/mapinfo` (`convert(? using utf8mb4) COLLATE utf8mb4_general_ci`)
  * [x] `/map` (`convert(? using utf8mb4) COLLATE utf8mb4_general_ci`)
  * [x] store teamrank (`GROUP_CONCAT`)
  * [x] `/teamrank` (`GROUP_CONCAT`)
  * [x] ~`/top5team` (`GROUP_CONCAT`)~ doesn't contain GROUP_CONCAT
  * [x] `/times` (`UNIX_TIMESTAMP`)
  * [x] `/load` without any arguments (`UNIX_TIMESTAMP`)
* [x] all commits compiling, making future bisect easier
* [x] write a sqlite_to_mysql script
* [x] write an old_file_server to sqlite script
* [x] gracefully shutdown DbPool

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-08-09 23:30:08 +00:00
bors[bot] 026ac99895
Merge #2543
2543: Remove unlicensed skins (fixes #2518) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-09 23:23:40 +00:00
bors[bot] 3fde3ac496
Merge #2538
2538: Add Client message color option in HUD setting r=Learath2 a=def-

As requested by reo

Co-authored-by: def <dennis@felsin9.de>
2020-08-09 16:58:41 +00:00
Zwelf 5893913922 Clean up includes in sql backend 2020-08-09 17:54:25 +02:00
Zwelf 5b53a05a40 Rename LoadString to FromString to fix windows build 2020-08-09 17:14:11 +02:00
def 20e8bfd12a Try to fix Windows build 2020-08-09 17:14:11 +02:00
def 7be7160d9b Remove unlicensed skins (fixes #2518)
and mention skin licenses (fixes #2544)

Still missing: Which skin is by btd?
2020-08-09 15:07:08 +02:00
def 1ad43a76dd Editor: Support up/down for images/sounds 2020-08-08 12:22:37 +02:00
def 4c9d03c063 Editor: Left/Right switch between layers/images/sounds 2020-08-08 12:09:15 +02:00
def c66201dd22 Editor: Get rid of some debugging output 2020-08-08 12:09:03 +02:00
def 8174dfa779 Editor: Support up/down keys to switch layers
Also with shift to add layers

As suggested by Lady Saavik
2020-08-08 12:06:17 +02:00
def 02f6e7081a Right click: Don't remove selection of layers 2020-08-08 10:33:18 +02:00
def 20eb5a5d86 Add Client message color option in HUD setting
As requested by reo
2020-08-05 12:39:13 +02:00
Learath 039139b836 Fix more sixup vote issues 2020-08-04 20:14:37 +03:00
Zwelf d71bf5cef1 Use DB write server for /load 2020-08-03 12:58:52 +02:00
Zwelf 3e1324dd0a Add uuid parsing 2020-08-03 12:58:52 +02:00
Zwelf c6b1b08355 Database specific collate utf8 nocase
making and work
2020-08-03 12:58:52 +02:00
Zwelf d16bb5cc08 Make timestamps compatible with SQLite
works for `/mapinfo`, `/load`, `/save`, `/times`
2020-08-03 12:58:52 +02:00
Zwelf 41b5ee9dd8 Make /teamrank compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf aee73b99dc Rewrite insert teamrank making code reuse easier 2020-08-03 12:58:52 +02:00
Zwelf c8d710926f Fix missing last line 2020-08-03 12:58:52 +02:00
Zwelf 044edbe42b Make storing teamrank compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf a6df9be98e Make getting birthday compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf eb4d77f071 Make inserting ranks compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf 89ee5944b4 Add missing include 2020-08-03 12:58:52 +02:00
Zwelf 2eb3d23ef4 Rewrite score using the new interface
delete file_score for now as it will be replaced by a sqlite backend
2020-08-03 12:58:52 +02:00
def e2fde4d730 Fix utf8 handling in str_truncate (fixes #2533)
and rename to str_utf8_truncate since it's only used for utf8 strings
2020-08-02 18:32:42 +02:00
Fireball 7e610f9944 Fix sixup players not making sounds when hooking others
This also fixes some less noticeable edgecases with ground jump sound: for example, when spectating a tee who is in a solo part.
2020-07-18 19:13:56 +01:00
sirius 2394d49d34 update calling way of TextWidth() 2020-07-16 21:07:41 +08:00
sirius a6181ce8d3 Merge branch 'master' of https://github.com/ddnet/ddnet 2020-07-16 21:07:04 +08:00
Fireball ab9b96ddb2 Backported fix for Text() incorrect parameter type (int -> float)
The original fix was done by @oy for 0.7.4.
2020-07-15 20:49:14 +01:00
Fireball b1c17c3248 Backported fix for TextWidth() parameter mix-up
Fixes #2511 (Stack-buffer-overflows in some UIs).
The original fix was done by @oy for 0.7.4.
2020-07-15 20:48:29 +01:00
trml b354e034fc Fix prediction when chat is enabled 2020-07-15 03:15:35 +02:00
trml d57c8ef463 Fix desync of predicted reload timer 2020-07-15 02:47:51 +02:00
bors[bot] 69593a3191
Merge #2502
2502: Improved dummy switching r=def- a=Fireball-Teeworlds

- Fix a use-after-free when there are no new snapshots for the cl_dummy tee after the switch: #2499 .
- When one of the tees is hooked, cycling through them will no longer show phantom hook for the other tee: https://youtu.be/mxVT4pdyGnU.
- Dummy switch might happen a bit quicker since it doesn't depend on receiving new snapshots.
- Simplified code: m_LastDummy2 is no more.



Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-07-14 06:31:43 +00:00
sirius ef85308a47 remove aBuf 2020-07-14 10:45:03 +08:00
bors[bot] 3ff0a7fec6
Merge #2498
2498: Limit zooming out further (fixes #2497) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-13 21:34:05 +00:00
def 4d34dd365b Limit zooming out further (fixes #2497) 2020-07-13 20:23:49 +02:00
sirius 17bf1a9b38 change identifier style 2020-07-14 00:12:03 +08:00
sirius 9482ffa10a change identifier style 2020-07-13 23:10:00 +08:00
bors[bot] 37a906d972
Merge #2501
2501: Show "Free View" for Sixup r=fokkonaut a=Learath2

@fokkonaut is this enough?

bors delegate=fokkonaut

Co-authored-by: Learath <learath2@gmail.com>
2020-07-13 09:50:48 +00:00
Learath 85a2268b2a Show "Free View" for Sixup 2020-07-13 11:35:03 +03:00
sirius d7646666f0 use array instead of string 2020-07-13 12:41:07 +08:00
bors[bot] 38ea723d94
Merge #2433 #2505 #2506
2433: Fix votes for sixup r=heinrich5991 a=Learath2

I think this looks sane but I haven't tested it at all for idk how to even test this locally/alone

2505: Fix legacy 64 player serverinfo, don't send duplicate packets (fixes #2495) r=heinrich5991 a=def-

For legacy we sent the first packet once correctly, then the 2nd and 3rd
packet without the marker and token at the start, so they never worked.

For new 64 player serverinfo we sent all packets correctly but the 1st
packet twice.

Introduced in #1955.

2506: Prevent whisper spam from 0.7 (fixes #2504) r=heinrich5991 a=def-



Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: def <dennis@felsin9.de>
2020-07-12 22:58:23 +00:00
def 74197fc027 Prevent whisper spam from 0.7 (fixes #2504) 2020-07-13 00:28:47 +02:00
Fireball 918f321dfb Improved dummy switching
- Fix a use-after-free when there are no new snapshots for the cl_dummy tee after the switch.
- When one of the tees is hooked, cycling through them will no longer show phantom hook for the other tee.
- Dummy switch might happen a bit quicker since it doesn't depend on receiving new snapshots.
- Simplified code: m_LastDummy2 is no more.
2020-07-12 19:14:18 +01:00
Learath dd010364ed Fix double messages 2020-07-12 10:34:36 +03:00
def 8858fc24ec Fix compiler warning in stoppers without changing physics
Probably related to #2487, was previously fixed and caused stoppers not
to work.

src/game/collision.cpp:902:247: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
src/game/collision.cpp:891:252: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
src/game/collision.cpp:885:251: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
2020-07-11 11:38:29 +02:00
def a0e96d58ea Version 14.2 2020-07-10 08:32:12 +02:00
def 3585d83196 Don't request IUpdater interface when built without updater
Fixes warning:

[kernel]: failed to find interface with the name 'updater'
2020-07-10 00:01:02 +02:00
bors[bot] d7a0a914c3
Merge #2460
2460: Don't reset chat on map change (fixes #2451) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-09 18:38:40 +00:00
bors[bot] c4d5c8dfa2
Merge #2478 #2480
2478: Use (u)int64 from system.h instead of (u)int64_t from cstdint r=heinrich5991 a=def-

src/game/client/prediction/gameworld.h:62:90: error: ‘int64_t’ has not been declared
   62 |  void CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, int64_t Mask);
      |                                                                                          ^~~~~~~

2480: Send zoom status for dummy too r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-09 18:31:32 +00:00
def f4344dc420 Use (u)int64 from system.h instead of (u)int64_t from cstdint
src/game/client/prediction/gameworld.h:62:90: error: ‘int64_t’ has not been declared
   62 |  void CreateExplosion(vec2 Pos, int Owner, int Weapon, bool NoDamage, int ActivatedTeam, int64_t Mask);
      |                                                                                          ^~~~~~~
2020-07-09 13:55:28 +02:00
def 6b7e1f54f4 Send zoom status for dummy too 2020-07-09 13:51:37 +02:00
def b2b664bf53 Don't reset chat on map change (fixes #2451) 2020-07-09 13:47:48 +02:00
bors[bot] 5cc6a08c2b
Merge #2471
2471: Don't send zoom level while zooming (fixes #2470) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-09 11:24:19 +00:00
bors[bot] ac35b49e90
Merge #2479
2479: Set smaller default area for what distance to show r=heinrich5991 a=def-

as suggested by fokkonaut

Co-authored-by: def <dennis@felsin9.de>
2020-07-09 11:10:38 +00:00
bors[bot] 56ef688489
Merge #2467
2467: Add cl_smooth_zoom_time r=def- a=def-

as requested on Discord by nils & fokkonaut

Co-authored-by: def <dennis@felsin9.de>
2020-07-09 10:35:07 +00:00
def 5e7a45a49b Set smaller default area for what distance to show
as suggested by fokkonaut
2020-07-08 23:16:30 +02:00
bors[bot] 8a3743fa90
Merge #2474 #2476
2474: Remove IP skins r=heinrich5991 a=def-



2476: Use x instead of y in show distance (fixes #2475) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-08 20:39:01 +00:00
bors[bot] 70ff2f919d
Merge #2468
2468: Tell why DNSBL isn't allowing to vote (fixes #2466) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2020-07-08 20:30:51 +00:00
Dennis Felsing 05ed51cf86
Update src/game/server/gamecontext.cpp
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-07-08 22:02:36 +02:00
Dennis Felsing 71bd706f2a
Update src/game/server/gamecontext.cpp
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-07-08 22:02:31 +02:00
def 2a35121c84 Use x instead of y in show distance (fixes #2475) 2020-07-08 15:57:00 +02:00
def 2e8faac549 Don't send zoom level while zooming (fixes #2470) 2020-07-08 10:42:28 +02:00
sirius edab0d097d add variable to adjust size of health and armor nameplate 2020-07-08 15:41:44 +08:00
sirius 4a44b90b11 adjust distance between health and armor 2020-07-08 14:32:24 +08:00
sirius 00c4adf05b add function to show health and armor in nameplates (only when client can get the health and armor data) 2020-07-08 13:34:24 +08:00
def 66c7bf8851 Tell why DNSBL isn't allowing to vote (fixes #2466) 2020-07-07 23:12:55 +02:00
def defe2439bd Add cl_smooth_zoom_time
as requested on Discord by nils & fokkonaut
2020-07-07 22:59:20 +02:00
def f9d2c14ff6 Make zoom reset respect cl_default_zoom (fixes #2453) 2020-07-07 18:02:21 +02:00
Learath fb09f8a6c6 "Translate" the vote message 2020-07-07 13:16:53 +03:00
Learath 95d363b42c Fix votes for sixup 2020-07-07 13:14:07 +03:00
bors[bot] 9008c96e80
Merge #2429
2429: Use a cubic polynomial for smoothing zoom r=def- a=heinrich5991

Supersedes #2420.

Co-authored-by: Edgar <git@edgarluque.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-07-05 21:46:25 +00:00
bors[bot] ac3dde1d98
Merge #2446
2446: Fix storing finish on solo server with practice mode enabled r=heinrich5991 a=Zwelf

Fixes #2445 
vulnerable versions: 
* 506602d472c48821b6e7bb846b86431a113834a1..59a7e1f1873ad58b838cd3470d51b6ba84c02926~
* b99bbccd248437c928b25e32d40deaf98d8ef3ad..4186622d8750f4288be86b9064886a86c665c45d~

Problem was that `OnFinish` is only suited for team0 finishes, where `/practice` can't be enabled. Solo server finishes have to be handled like team finishes in CheckTeamFinished, which checks if `/practice` was enabled.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-07-02 21:08:20 +00:00
Zwelf d0975f9c4b Fix storing finish on solo server with practice mode enabled 2020-07-02 22:49:30 +02:00
Zwelf 0c0fab5e66 Moved include from teamscore.h to teamscore.cpp 2020-07-02 22:11:43 +02:00
bors[bot] 7266bcad78
Merge #2444
2444: Fix erroneous "unable to find all characters" message r=heinrich5991 a=Zwelf

Fixes #2443 

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-07-02 15:07:55 +00:00
Zwelf 17bb4522fc Fix erroneous "unable to find all characters" message 2020-07-02 16:34:36 +02:00
Zwelf ab9cdc294d Reset all input after rescuing 2020-07-02 16:24:23 +02:00
Zwelf 538de72c94 Don't load movement and pause state when rescuing 2020-07-02 14:06:18 +02:00
Zwelf 4388579d48 Fix reenabling practice mode after kill on solo server 2020-07-02 11:13:07 +02:00
Learath f9bf6cf354 Spam protection on /rank 2020-07-01 23:53:25 +03:00
bors[bot] 6da2f117cf
Merge #2425
2425: Fix doors not resetting on restart on solo server r=heinrich5991 a=Zwelf



Co-authored-by: Zwelf <zwelf@strct.cc>
2020-07-01 16:10:34 +00:00
bors[bot] 98779776e5
Merge #2424
2424:  Keep hook when loading  r=heinrich5991 a=Zwelf

Solves issue discussed in #2374. Also keeps direction and jump, which is evaluated when player is in /pause. Fire could be deleted, as it does not affect game play in any way.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-07-01 16:01:25 +00:00
Zwelf bff8e90319 Fix loading team sets teamstate to TEAMSTATE_OPEN 2020-07-01 09:03:16 +02:00
heinrich5991 cdd715fd53 Add smoothing of camera zoom using a cubic polynomial 2020-07-01 00:19:17 +02:00
Zwelf 9e43f8d483 Add CCharacter::m_ReloadTimer to save 2020-06-30 23:49:40 +02:00
Dennis Felsing ac42861d1b
Merge pull request #2427 from def-/pr-14.0.4
Version 14.1
2020-06-30 22:44:20 +02:00
def 1cb9454ab8 Rename showothers2 -> showothers
and the old showothers to legacy
2020-06-30 21:38:51 +02:00
def edba33be33 Add Show others (own team only) menu setting 2020-06-30 21:38:14 +02:00
def c3521572ea Add showothers2@netmsg.ddnet.tw
to support cl_show_others 2 properly
2020-06-30 21:38:14 +02:00
def 1b17c25fda Version 14.1 2020-06-30 21:32:25 +02:00
Zwelf 6f9dd48401 Fix doors not resetting on restart on solo server 2020-06-30 20:42:01 +02:00
Zwelf b99bbccd24 Revert "Revert "Fix /save on solo server""
This reverts commit 59a7e1f187.
2020-06-30 20:22:17 +02:00
def 3de5b3a12f Revert "Revert "Explain why the randomly generated save code is used""
This reverts commit 4476ec39f9.
2020-06-30 20:18:58 +02:00
def 4476ec39f9 Revert "Explain why the randomly generated save code is used"
This reverts commit 0d887e8b37.
2020-06-30 20:15:50 +02:00
def d10cb17e54 Revert "Restore old /save behavior"
This reverts commit d169bb1b52.
2020-06-30 20:15:46 +02:00
Zwelf 839fd08d6a Check if player still in team when loading hook 2020-06-30 20:13:45 +02:00
Edgar 3578c74667
new defaults use logistic curve 2020-06-30 19:06:29 +02:00
def 59a7e1f187 Revert "Fix /save on solo server"
This reverts commit 506602d472.
2020-06-30 18:41:22 +02:00
bors[bot] 5a41318cbd
Merge #2423
2423: Only SendChat to clients that exist. Initialize m_Sixup anyway r=def- a=Learath2

#2421 

Co-authored-by: Learath <learath2@gmail.com>
2020-06-30 16:25:47 +00:00
Zwelf 7427e41959 Keep hook when loading 2020-06-30 18:09:26 +02:00
Learath 8d8f1d7208 Only SendChat to clients that exist. Initialize m_Sixup anyway 2020-06-30 18:58:44 +03:00
Zwelf f2b5abb1fb Keep weak/strong when reloading 2020-06-30 17:52:55 +02:00
Zwelf 949d710597 Fix wrong indention 2020-06-30 17:52:55 +02:00
Zwelf c9f8cc99b1 Stop searching when player was found 2020-06-30 17:52:55 +02:00
Edgar ce57d928eb
newline at end of file 2020-06-30 16:30:40 +02:00
Edgar a46b266564
Smooth zoom 2020-06-30 16:25:54 +02:00
bors[bot] b96544f8ac
Merge #2413
2413: Fix showothers for specchar r=heinrich5991 a=edg-l

Fixes https://github.com/ddnet/ddnet/issues/2410

I also made it use the Alpha on specchars that are on another team.

Co-authored-by: Edgar <git@edgarluque.com>
2020-06-30 12:45:18 +00:00
bors[bot] 3e77272133
Merge #2417
2417: Fix out of bounds read in CPlayer::Snap with IsSixup (fixes #2416) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-30 12:37:37 +00:00
bors[bot] 3f61babae3
Merge #2418
2418: Clean and fix style on character snap r=def- a=edg-l



Co-authored-by: Edgar <git@edgarluque.com>
2020-06-30 12:19:34 +00:00
Edgar 5c45f0876b
Clean and fix style on character snap 2020-06-30 14:17:27 +02:00
def 49ba9078f5 Fix out of bounds read in CPlayer::Snap with IsSixup (fixes #2416) 2020-06-30 14:08:55 +02:00
Edgar eb1779f58c
Fix showothers for specchar 2020-06-30 14:04:41 +02:00
bors[bot] a79b1265df
Merge #2401
2401: Client tells server its zoom level (fixes #2087) r=heinrich5991 a=def-

and server adapts the visible distance to it

Co-authored-by: def <dennis@felsin9.de>
2020-06-30 10:01:01 +00:00
def ead2422dcf Fix practice on solo servers 2020-06-29 19:34:22 +02:00
Zwelf 506602d472 Fix /save on solo server
Fixes #2404
2020-06-29 19:34:21 +02:00
def 1782d95d99 Client tells server its zoom level (fixes #2087)
and server adapts the visible distance to it
2020-06-29 18:59:07 +02:00
bors[bot] 87407be1c5
Merge #2408
2408: Don't use %ll format r=def- a=heinrich5991

It's not supported in MSVS. Fix #2407.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-29 12:17:44 +00:00
bors[bot] de8cc79578
Merge #2389
2389: Ignore emoticon of spammy players (fixes #2387) r=heinrich5991 a=def-

Controlled with the regular ignore chat button in players menu

Co-authored-by: def <dennis@felsin9.de>
2020-06-29 12:09:48 +00:00
heinrich5991 efc4a8abf7 Don't use %ll format
It's not supported in MSVS. Fix #2407.
2020-06-29 13:57:08 +02:00
def ab22bb9665 Add ; when writing save into file 2020-06-29 11:08:51 +02:00
def 2af5001fe7 Version 14.0.3 2020-06-29 08:47:58 +02:00
def 6455689e32 Super team can't be saved/loaded
Thanks to Lady Saavik for report
2020-06-29 08:46:34 +02:00
def b3b0e1041c Center the icons 2020-06-27 22:58:28 +02:00
bors[bot] 42455d4b4d
Merge #2388
2388: Get rid of the annoying font size warnings r=heinrich5991 a=def-

Since we're not doing anything about them anyway, and I get them
spamming me on every client start.

Co-authored-by: def <dennis@felsin9.de>
2020-06-27 20:53:39 +00:00
bors[bot] dcd0976159
Merge #2397
2397: Update game id when updating team score r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-27 20:47:00 +00:00
def b2371522f9 Fix alignment of icons in player options 2020-06-27 22:40:22 +02:00
bors[bot] 6a7695e696
Merge #2396
2396: Color Selector improvement + cleanup r=Learath2 a=def-

![screenshot-20200627@150939](https://user-images.githubusercontent.com/2335377/85923064-3d326f80-b888-11ea-92f3-a7cf685890dc.png)

Tadaa, new feature in -200 lines :D

Co-authored-by: def <dennis@felsin9.de>
2020-06-27 20:38:42 +00:00
bors[bot] 70ccf76dcf
Merge #2390
2390: Support cl_show_hook_coll_own/other 2 to always show (fixes #2383) r=heinrich5991 a=def-

hook collision, without broadcasting to other players.

Removed cl_show_hook_coll_always in return

Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency

Co-authored-by: def <dennis@felsin9.de>
2020-06-27 20:31:29 +00:00
def 1c09798504 Update game id when updating team score 2020-06-27 22:30:14 +02:00
def 4e5912909b Improve & fix 2020-06-27 19:40:04 +02:00
def 50af2a8ed6 Show number in color scrollbars
As suggested by Lady Saavik
2020-06-27 15:08:50 +02:00
def d147c1c7f5 Cleanup color scrollbars in menus 2020-06-27 15:08:35 +02:00
def 7608eb67d6 Ignore emoticon of spammy players (fixes #2387)
Add ignore emoticon button in player menu.
Someone needs to draw the graphic for that.
2020-06-27 01:15:09 +02:00
def dc92626a3b Support cl_show_hook_coll_own/other 2 to always show (fixes #2383)
hook collision, without broadcasting to other players.

Removed cl_show_hook_coll_always in return

Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency
2020-06-26 23:58:07 +02:00
def d6ba9440ca Get rid of the annoying font size warnings
Since we're not doing anything about them anyway, and I get them
spamming me on every client start.
2020-06-26 23:42:04 +02:00
def 0a8a1b078b Localization: Print line number where failure occured 2020-06-26 18:42:56 +02:00
def 2d6e56fec8 Translation fixes
- Code didn't work with newlines, get rid of them
- Some stylistic improvements
2020-06-26 18:34:50 +02:00
def 1a87abe96b Version 14.0.2 2020-06-26 15:20:07 +02:00
def 07e6dafb50 Revert "Fix out of bounds access in RenderPlayer (fixes #2365)"
This reverts commit 80931b606a.
2020-06-26 15:10:38 +02:00
bors[bot] cfda912307
Merge #2009
2009: Fix min mouse position for follow factor r=heinrich5991 a=Jupeyy

@Learath2 you were the last to change this, would be nice if you could check if this is correct behaviour, i didn't find anything wrong :D

Co-authored-by: jupeyy <jupjopjap@gmail.com>
2020-06-26 12:54:49 +00:00
bors[bot] ec472a9d0a
Merge #2298
2298: Log save/load in teehistorian r=heinrich5991 a=Zwelf

Including tests

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-26 12:45:08 +00:00
Zwelf ef2f306067 Fix teehistorian debug output for save/load 2020-06-26 14:37:14 +02:00
bors[bot] c414a8a624
Merge #2379
2379: Fix unused translations r=def- a=3edcxzaq1

Fix so that "Connect Dummy" and "Disconnect Dummy" follows language file

Co-authored-by: sven <sven@rx.lan>
Co-authored-by: 3edcxzaq1 <66034590+3edcxzaq1@users.noreply.github.com>
2020-06-26 09:19:45 +00:00
3edcxzaq1 4e7b534622
Update menus_ingame.cpp 2020-06-26 11:13:55 +02:00
def 42ab24794f Remove unused cl_show_spec_tee config (fixes #2378) 2020-06-26 08:07:34 +02:00
sven 9d0bae9769 Fix unused translation 2020-06-26 02:49:35 +02:00
def d907ec3c11 Version 14.0.1
Waiting for #2363, #2358, #2356, #2331
2020-06-26 00:03:04 +02:00
Zwelf d8aab366fc Log save/load in teehistorian 2020-06-26 00:01:12 +02:00
bors[bot] b4472d72cf
Merge #2372
2372: Fix out of bounds access in RenderPlayer (fixes #2365) r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-25 21:56:35 +00:00
bors[bot] 9fb6fa7720
Merge #2373 #2376
2373: Fix out of bounds access in OnNewSnapshot (fixes #2366) r=Learath2 a=def-



2376: Add instructions for translation stats r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-25 20:49:21 +00:00
def 53971f44f1 ddnet-saves.txt: Also parse correctly when saving on other country 2020-06-25 22:30:51 +02:00
def 431d824cf1 Revert "Fix wrong usage of bitwise-or which is resulting in an always true"
This reverts commit 1b6ff929a2.
2020-06-25 22:00:08 +02:00
bors[bot] 00eb2044b2
Merge #2374
2374: Restore old /save behavior r=def- a=Zwelf

Fixes #2362, supersedes #2367 

I didn't change the /save message. There are already two different: "Use '/load %s' on %s to continue" and "Use '/load %s' to continue".
I think it would be better to add a NetMessage, this could also solve the problem of saving which team members were in the team.

>  I guess this can't be used to cheat anything?

Only if an instant rehook is necessary. Might be useful for rehooking an edge hook (but you still have to aim).

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-25 19:43:30 +00:00
Zwelf 0d887e8b37 Explain why the randomly generated save code is used
to the player when the database connection failed
2020-06-25 20:44:00 +02:00
Zwelf d169bb1b52 Restore old /save behavior 2020-06-25 20:42:48 +02:00
def e03066c8bd Fix out of bounds access in OnNewSnapshot (fixes #2366) 2020-06-25 18:34:41 +02:00
def 80931b606a Fix out of bounds access in RenderPlayer (fixes #2365) 2020-06-25 18:33:41 +02:00
bors[bot] 97c7525438
Merge #2368
2368: Make spec character rendering a bit cleaner r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-25 16:18:20 +00:00
heinrich5991 8c095b2727 Make spec character rendering a bit cleaner 2020-06-25 14:56:23 +02:00
bors[bot] df66d83a04
Merge #2356
2356: Make game less dependend on score backend r=heinrich5991 a=Zwelf

Behavior change:
* `sv_save_worse_scores` is respected on file based servers

Mainly a clean up after #2247, but helps #2298 too

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-25 10:40:02 +00:00
Zwelf a8abc3937b Make game less dependend on score backend 2020-06-25 12:36:01 +02:00
Edgar 2922b4b672
show spectee when player is inactive only 2020-06-25 10:34:57 +02:00
Edgar 2f3073c547
fix /spec hook 2020-06-25 10:12:17 +02:00
bors[bot] bad43e77a0
Merge #2354
2354: Set rescue tee immediately after loading (fixes #2248) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-24 21:37:47 +00:00
Arda Demir 1b6ff929a2 Fix wrong usage of bitwise-or which is resulting in an always true 2020-06-24 22:53:09 +03:00
bors[bot] 677d92aa32
Merge #2353
2353: Fix /spec rendering r=def- a=edg-l

Fixes https://github.com/ddnet/ddnet/issues/2344

Co-authored-by: Edgar <git@edgarluque.com>
2020-06-24 19:29:29 +00:00
bors[bot] bd2cb5a8bd
Merge #2352
2352: Fix SendChatTarget demo recording r=def- a=Learath2



Co-authored-by: Learath <learath2@gmail.com>
2020-06-24 19:23:23 +00:00
def 3530d0ae32 Set rescue tee immediately after loading (fixes #2248) 2020-06-24 21:19:46 +02:00
Edgar b33180ae77
fix /spec rendering 2020-06-24 19:01:01 +02:00
Learath 581904d849 Fix SendChatTarget demo recording 2020-06-24 19:22:41 +03:00
bors[bot] cbde23aba9
Merge #2305
2305: Version 14.0 r=def- a=def-

Waiting for https://github.com/ddnet/ddnet/pull/2303 https://github.com/ddnet/ddnet/pull/2301 https://github.com/ddnet/ddnet/pull/2296 https://github.com/ddnet/ddnet/pull/2295 https://github.com/ddnet/ddnet/pull/2294 https://github.com/ddnet/ddnet/pull/2280 https://github.com/ddnet/ddnet/pull/2279 https://github.com/ddnet/ddnet/pull/2242 and probably some sixup fixes by Learath2 :)

Co-authored-by: def <dennis@felsin9.de>
2020-06-24 16:20:53 +00:00
Learath e122462ae8 Ugly fix for SendChatTarget(-1...). Closes #2337 2020-06-24 18:54:27 +03:00
Learath b6fb304508 Name change hack for 0.7. Close #2330 2020-06-24 18:14:15 +03:00
bors[bot] 09f60fc919
Merge #2242
2242: Use CSaveTee for rescue (fixes #2241) r=heinrich5991 a=def-

Untested. Edit: Tested, seems to work.

Co-authored-by: def <dennis@felsin9.de>
2020-06-24 14:51:13 +00:00
bors[bot] 1750bb09f7
Merge #2335 #2336 #2340 #2342 #2349
2335: Make it more clear that this is a sixup translation server r=heinrich5991 a=def-



2336: Set skill level for Sixup (fixes #2334) r=heinrich5991 a=def-



2340: Keeping multiple states consistent is hard (fixes #2315) r=heinrich5991 a=def-

let's go recount every time

2342: Don't forget video recorder fps setting r=heinrich5991 a=def-

after switching to non-videorecorder client

2349: Document which MySQL/MariaDB versions we require (fixes #2343) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-24 14:37:53 +00:00
Learath 3a9fa693f2 Set LastChangeInfo on a Sixup skin change 2020-06-24 16:25:35 +03:00
def 0bb4e4c0cd Version 14.0 2020-06-24 15:17:22 +02:00
def 243be18fb4 Keeping multiple states consistent is hard (fixes #2315)
let's go recount every time
2020-06-24 14:50:32 +02:00
def 5b3b42b771 Make it more clear that this is a sixup translation server 2020-06-24 14:49:23 +02:00
def ff4c2c51ec Don't fail on empty teamtop5 2020-06-24 12:13:18 +02:00
Edgar 24a308c50c fix saying /spec show you as chatting 2020-06-24 11:32:27 +02:00
def f51a443998 Merge remote-tracking branch 'edg-l/pr_show_spec'
Update x_spec with the more minimal version by HiRavie
Fix CMakeLists.txt
2020-06-24 09:55:59 +02:00
bors[bot] 0f0de9b333
Merge #2338
2338: Ensure that team state is always sent (fix #2315) r=def- a=trml

Noticed that team state wasn't sent to the client in some cases (when SetForceCharacterNewTeam is called directly), which I think this could happen if a team is unlocked between killing and respawning a player. Also added a CheckTeamFinished for that case.

Co-authored-by: trml <trml@users.noreply.github.com>
2020-06-24 05:46:25 +00:00
bors[bot] de328c1360
Merge #2301
2301: map_convert_07: Check image width for divisibility by 16 r=heinrich5991 a=def-

As noticed on Sunny Land.

> [5:31 PM] redix: in theory it should be enough if width and height are divisible by 16

Now running this over our maps and fixing them manually.

Co-authored-by: def <dennis@felsin9.de>
2020-06-23 23:30:34 +00:00
trml ca36f4787c Ensure that team state is always sent 2020-06-23 23:57:33 +02:00
Learath 5293f78f22 Translate the emoticon message 2020-06-23 12:25:04 +03:00
bors[bot] 366a0ec80b
Merge #2326
2326: Disable -Wstringop-overflow warning in IntsToStr r=heinrich5991 a=def-

Since it won't write into invalid memory when Num > 0

Co-authored-by: def <dennis@felsin9.de>
2020-06-23 08:55:37 +00:00
bors[bot] 160a7b71fb
Merge #2279 #2327
2279: Only forbid resizing when videorecorder is recording r=heinrich5991 a=def-



2327: List data files in `CMakeLists.txt` r=def- a=heinrich5991

This fixes missing files for people recompiling when we add new data
files.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-23 08:48:05 +00:00
bors[bot] e040c281e0
Merge #2325
2325: Fix array as initializer g++ 4.9 error (fixes #2320) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-23 08:39:29 +00:00
def 557f23b347 Disable -Wstringop-overflow warning in IntsToStr
Since it won't write into invalid memory when Num > 0
2020-06-23 10:35:41 +02:00
bors[bot] 1652d73a5e
Merge #2322
2322: Use proper CSV writing for save codes r=def- a=heinrich5991

Supersedes #2296.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-23 07:25:20 +00:00
heinrich5991 48e8ba69ca Use the CSV write to write save codes 2020-06-23 09:11:59 +02:00
def 85f772ba56 Fix array as initializer g++ 4.9 error (fixes #2320) 2020-06-23 08:02:09 +02:00
def 83c820db09 Fix some naming conventions in videorecorder 2020-06-23 08:00:03 +02:00
Learath ce5aca4759 Check for a null CPlayer::m_pCharacter
Players need not have characters at all times
2020-06-23 01:36:51 +03:00
bors[bot] 11e2f04c21
Merge #2280
2280: Add a slightly longer introduction text r=heinrich5991 a=def-

Since we don't have a tutorial
![Screenshot](https://user-images.githubusercontent.com/2335377/85120864-235bb180-b224-11ea-8bb6-700f7228ee0d.png)

Co-authored-by: def <dennis@felsin9.de>
2020-06-22 20:45:06 +00:00
def 57280fba99 Store saves client-side in ddnet-saves.txt
Only appends saves, just in case you forgot where you saved.

Unfortunately only stores your own name, not your entire team.
2020-06-22 21:12:35 +02:00
bors[bot] a407513630
Merge #2306
2306: Make ctrl-s/ctrl-l etc work everywhere in editor (fixes #2302) r=heinrich5991 a=def-

instead of just in the layers view

Co-authored-by: def <dennis@felsin9.de>
2020-06-22 18:56:01 +00:00
Edgar 933ea7cca3
fix bug, use ddnet character 2020-06-22 19:05:57 +02:00
Edgar 3f476171f1
change to white and use colors 2020-06-22 18:43:49 +02:00
bors[bot] 6384ebf13f
Merge #2321
2321: Use the 0.7 race features better r=def- a=Learath2

Mostly tested, couldn't test the diffs though as I don't have score set up. It looks good to me though.

Co-authored-by: Learath <learath2@gmail.com>
2020-06-22 16:04:18 +00:00
Learath 62d014d999 Forgot we faked ids for vanilla 2020-06-22 19:02:17 +03:00
Learath 287e3e2a45 Use 0.7 finish messages 2020-06-22 18:08:08 +03:00
def 07830c868f Fix whitespace in teeinfo.cpp 2020-06-22 15:06:01 +02:00
def 252cda2d49 Use str_comp instead of strcmp
error: ‘strcmp’ was not declared in this scope
2020-06-22 14:47:49 +02:00
def 79cb7d14eb Don't log preprocess nullptr return 2020-06-22 10:06:55 +02:00
def 9d9d5e26e6 Fix double hook sound in 0.7 2020-06-22 09:27:41 +02:00
bors[bot] 39eae1935b
Merge #2312
2312: Fix crash when player voting random_map leaves and vote passes r=def- a=Zwelf

Closes #2310 

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-22 05:47:46 +00:00
Zwelf b96d8673f3 Fix crash when player voting random_map leaves and vote passes
Closes #2310
2020-06-22 00:47:49 +02:00
def b1ff7d3ef2 Handle invalid packets more gracefully 2020-06-22 00:13:16 +02:00
def 9fccd5ecf6 Fix team rank for long map names 2020-06-21 23:47:45 +02:00
Edgar befc4fc1b2
make skin also use alpha 2020-06-21 18:24:51 +02:00
Edgar 78bcc1d8fc
apply alpha to spec nameplates 2020-06-21 18:05:43 +02:00
Edgar f3466e05ba
Show /spec tees with a dashed skin 2020-06-21 17:48:33 +02:00
Learath ea3772ce2a Don't send redundant commands. Remove /team on clientside. 2020-06-21 17:28:02 +03:00
Learath 35acd21933 Use the racetimer in 0.7
Clean up /timer while at it
2020-06-21 17:15:08 +03:00
bors[bot] 80f19b789a
Merge #2294
2294: Make the learn button fit (fixes #2293) r=edg-l a=def-

![screenshot_2020-06-20_14-57-03](https://user-images.githubusercontent.com/2335377/85202386-55454480-b306-11ea-99f5-e37ba6e616b5.png)


Co-authored-by: def <dennis@felsin9.de>
2020-06-21 09:31:51 +00:00
def 6cfc6adc83 Make ctrl-s/ctrl-l etc work everywhere in editor (fixes #2302)
instead of just in the layers view
2020-06-21 01:44:01 +02:00
def c7908524cd Add a slightly longer introduction text
Since we don't have a tutorial
2020-06-21 01:15:01 +02:00
def c99d791f4b Add warning in editor for image widths 2020-06-21 01:14:36 +02:00
bors[bot] 4dd72df777
Merge #2297
2297: Ingame time is in milliseconds on 0.7 r=def- a=Learath2



Co-authored-by: Learath <learath2@gmail.com>
2020-06-20 17:25:02 +00:00
Learath 28905c4659 Disable timeout for 0.7 clients 2020-06-20 19:52:23 +03:00
Learath 865afa613b Ingame time is in milliseconds 2020-06-20 17:31:06 +03:00
def 1610079020 Make the learn button fit (fixes #2293) 2020-06-20 14:57:52 +02:00
bors[bot] 17e77d73bb
Merge #2291
2291: Make PlayerResult messages an union variant r=def- a=Zwelf

and some small style and readability fixes in sql_score.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-20 12:44:59 +00:00
bors[bot] a3ab572fdc
Merge #2290
2290: Restore old message behavior when using /load and /save r=def- a=Zwelf

Only notify the player initiating /load about the error and don't send
'Loading initiated by ...' and 'Saving initiated by ...' messages resulting
in two messages per /load and /save.

Not sure if the old behavior is better or if we want to keep the new with sending two messages per /save and /load.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-20 12:34:28 +00:00
bors[bot] 07f6e71376
Merge #2289
2289: Fix votes called from 0.7 r=def- a=Learath2

Never assume how structures are laid out

Co-authored-by: Learath <learath2@gmail.com>
2020-06-20 12:27:22 +00:00
Zwelf 1e4ccd7cc2 Small style and readability fixes in sql_score 2020-06-20 14:08:38 +02:00
Zwelf 67643e82b0 Make PlayerResult messages an union variant
as it is only used for DIRECT and ALL variants and for no other variants
2020-06-20 14:04:08 +02:00
bors[bot] 4edac3143a
Merge #2281
2281: Add Learn button which opens the ddnet wiki in the browser. r=heinrich5991 a=edg-l

![image](https://user-images.githubusercontent.com/15859336/85147350-05f00d00-b24f-11ea-8b6c-f79dbf605747.png)

## **I didn't test it on windows or mac.**

Co-authored-by: Edgar <git@edgarluque.com>
2020-06-20 12:00:45 +00:00
Edgar 07f0239e01
Add Learn button which opens the ddnet wiki in the browser. 2020-06-20 13:56:02 +02:00
Learath 8d422dfd70 Fix snapping for ninja 2020-06-20 14:24:38 +03:00
Learath b032eddcb4 Fix votes called from 0.7 2020-06-20 14:22:46 +03:00
Zwelf 673f59d99f Restore old message behavior when using /load and /save
Only notify the player initiating /load about the error and don't send
'Loading initiated by ...' and 'Saving initiated by ...' messages resulting
in two messages per /load and /save.
2020-06-20 13:03:25 +02:00
bors[bot] 4a810091b1
Merge #2284
2284: Remove sv_spectator_votes r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-20 10:46:03 +00:00
def c53528b92f Allow spectators to start votes 2020-06-20 11:20:54 +02:00
Learath 6db72b2388 Times are no longer negative in 0.7 2020-06-20 11:59:46 +03:00
heinrich5991 e294da41ba teehistorian: Track whether clients join via the 0.7 protocol 2020-06-19 22:06:39 +02:00
Learath 75e96aa5d3 Get rid of more magic constants, adapt to 0.7 2020-06-19 21:48:48 +03:00
Learath d200ef0bb0 Remove ugly hack 2020-06-19 21:42:19 +03:00
Learath 623ba68c19 Fix an oversight on skin conversion and some UB 2020-06-19 20:28:55 +03:00
Learath ddaea93e60 Implement the new Chat Commands protocol 2020-06-19 20:28:55 +03:00
Learath 1d4ea6c41b Drop clients properly 2020-06-19 20:28:55 +03:00
Learath d794520748 Remove forgotten debug messages 2020-06-19 20:28:55 +03:00
Learath effa964f08 Translate playerflags 2020-06-19 20:28:55 +03:00
Learath df42ce8b16 Send gameinfo correctly 2020-06-19 20:28:55 +03:00
Learath 32fb6718dd Allow joining TEAM_SPECTATOR 2020-06-19 20:28:55 +03:00
Learath 4067e711ef More template magic. Cleans up 'send-to-all-sixup' 2020-06-19 20:28:55 +03:00
Learath 9e2434c65d Better skin colors. Better game message translation 2020-06-19 20:28:55 +03:00
Learath 1514a6df85 Fix NetObj translation, fix sounds 2020-06-19 20:28:55 +03:00
Learath 46a7b6de2c Fix some oob access 2020-06-19 20:28:55 +03:00
Learath 9dc1a0357a Get /spec working 2020-06-19 20:28:55 +03:00
Learath e81c718180 Rework netobjs, fix chat 2020-06-19 20:28:55 +03:00
Learath eff28c658a Fix server messages 2020-06-19 20:28:55 +03:00
Learath 939b45a0aa Actually remove duplicate message 2020-06-19 20:28:55 +03:00
Learath 465fd570e0 Implement whispers 2020-06-19 20:28:55 +03:00
Learath 25664da121 Remove duplicate message 2020-06-19 20:28:55 +03:00
Learath 974b373ec2 Translate Damage Indicators 2020-06-19 20:28:54 +03:00
Learath 03070d0567 Fix many issues 2020-06-19 20:28:52 +03:00
Learath 807c92f1a4 Generate the 0.7 protocol 2020-06-19 20:27:15 +03:00
Learath b0e5a37fa9 Do message translation differently 2020-06-19 20:27:15 +03:00
Learath 5000b248bb Fix things 2020-06-19 20:27:15 +03:00
Tim Schumacher 442148a194 Begin work on 0.7 support 2020-06-19 20:27:15 +03:00
bors[bot] 7d428676e2
Merge #2263
2263: Fix /spec + super bug r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-18 22:17:43 +00:00
def e38cd6b6f2 Fix /spec + super crash (fixes #2262)
Thanks to Learath2 for finding a better solution.
2020-06-18 23:54:05 +02:00
def 79ef6c0e84 Use CSaveTee for rescue (fixes #2241) 2020-06-18 23:41:37 +02:00
def 2c7f4c71aa Minor code style fixes in sql_score.cpp 2020-06-18 23:03:53 +02:00
bors[bot] 13237ee12e
Merge #2245 #2266
2245: Stop playing map sound when demo player is paused r=heinrich5991 a=def-

Noticed on Shooting Range map

2266: Reset hook & collision in prediction after kill r=heinrich5991 a=def-

Thanks to Pipou for reporting

Co-authored-by: def <dennis@felsin9.de>
2020-06-18 19:29:41 +00:00
def 7aed6476dc Allow larger map names 2020-06-18 18:29:27 +02:00
def 6fcb8abbd0 Initialize m_SqlRandomMapResult (fixes #2272) 2020-06-18 08:18:33 +02:00
def b3d22204c3 Update credits 2020-06-17 23:23:27 +02:00
bors[bot] 98b448ebcc
Merge #2247
2247: Thread safe SQL interaction r=def- a=Zwelf

This PR intends to make the database interaction thread safe and optimizes some SQL queries. This is still a WIP, but since it is a rather big PR I wanted to get feedback early on.

Benefits:

* remove race conditions leading to undefined behavior and potential crashes
* logging game related database results in teehistorian would be possible

Behavior change:

* /top5team prints ranks in reverse order when passing a negative number (like /top5, /top5points)
* Optimize SQL statements for /rank /teamrank /top5 /top5team /points /top5points
* /load without parameters doesn't pass the SQL error to the user (as most other functions)
* Simplify IScore interface
* Add UUID to /save table (update of database schema necessary):
  ```
  ALTER TABLE record_saves ADD SaveID varchar(64);
  ```
* /save immediately kills team and loads it again if the database insert fails.

still TBD:
* [x] saving (team) score when finishing
* [x] loading team save
* [x] loading initial time and birthday check
* [x] /map and random map votes
* [x] RFC: generate a passphrase (2-3 word) if save-code exists or no save-code is given making /save failures much more rare and save-codes more secure
* [x] clean up code (removing now unused structs, ordering of functions in IScore)

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-17 19:35:45 +00:00
Zwelf f1b2ff086c Clean up thread safe SQL refactor 2020-06-17 21:15:07 +02:00
Learath eed3e783e0 Mark unused tunes as such 2020-06-17 13:39:54 +03:00
bors[bot] c4d71c7ef4
Merge #2264
2264: Add Entites off sign to front layer (fixes #2261) r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-16 19:31:25 +00:00
Zwelf 9f15acdbee Thread safe random_unfinished_map and modified sql statement 2020-06-15 11:14:15 +02:00
Zwelf afe96ed69c Thread safe random_map 2020-06-15 11:14:15 +02:00
Zwelf 7f4dc2bb4e Thread safe /map 2020-06-15 11:14:15 +02:00
Zwelf ea31171873 Generate passphrase for save-code
* when none is given
* if the given save-code already exist
* if the database connection fails therefore it can't be checked if the save-code already exists

Using the short word list from eff:
https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
2020-06-15 11:14:15 +02:00
Zwelf 528ca377ed Thread safe saving of team score 2020-06-15 11:14:15 +02:00
Zwelf 13c80fdc56 Thread safe saving of score 2020-06-15 11:14:15 +02:00
Zwelf 5dcb6f3b0d Thread save Init 2020-06-15 11:14:15 +02:00
Zwelf c278d8dbc3 Read SaveID from database on /load 2020-06-15 11:14:15 +02:00
Zwelf dbf6ac88f6 Thread save loading of player time and birthday 2020-06-15 11:14:15 +02:00
Zwelf e9242f45f1 Thread safe /load 2020-06-15 11:14:15 +02:00
Zwelf 031ac52320 Thread safe /save 2020-06-15 11:14:15 +02:00
Zwelf f5ebbf59b6 Thread safe /load without paramters 2020-06-15 11:14:15 +02:00
Zwelf 7514e93a8a Optimize /top5points SQL query 2020-06-15 11:14:15 +02:00
Zwelf fa8972deb6 Thread safe /top5points 2020-06-15 11:14:15 +02:00
Zwelf 62f3f40c00 Optimize /points database query 2020-06-15 11:14:15 +02:00
Zwelf 0f3f845a7f Thread safe /points 2020-06-15 11:14:15 +02:00
Zwelf e37cf5f3cb Thread safe /times 2020-06-15 11:14:15 +02:00
Zwelf 8fc81e7eca Reworked PlayerResult to signal finished with use_count == 1
Therefore if the sql thread crashes, the result is deleted automatically
2020-06-15 11:14:15 +02:00
Zwelf 1d7289c8f0 Thread safe /top5team and optimize database query 2020-06-15 11:14:15 +02:00
Zwelf 83fbee5f81 Optimize /teamrank database query 2020-06-15 11:14:15 +02:00
Zwelf a92509a5df Simplify /top5 SQL statement 2020-06-15 11:14:15 +02:00
Zwelf 9cf28354d7 Thread safe /top5 command 2020-06-15 11:14:15 +02:00
Zwelf fd44b1dc5b Reduce boilerplate code needed to start player info requesting thread 2020-06-15 11:14:15 +02:00
Zwelf f18daa949c Thread safe /teamrank 2020-06-15 11:14:15 +02:00
Zwelf e311c39151 Remove unused parameters from IScore interface 2020-06-15 11:14:15 +02:00
Zwelf 68aa157c11 Simplify /rank sql request 2020-06-15 11:14:15 +02:00
Zwelf eda0bab4bb Thread safe /rank 2020-06-15 11:14:15 +02:00
Zwelf 91e286f54d Fix parsing responses from player 2020-06-15 11:14:15 +02:00
Zwelf 76c227a542 Reimplement /mapinfo command 2020-06-15 11:14:15 +02:00
Zwelf 9add354367 Use Template for SqlResult 2020-06-15 11:14:15 +02:00
Zwelf 873f478a82 Rename Debut to Offset 2020-06-15 11:14:15 +02:00
Zwelf 4ee08dcc5c Remove unused arguments from IScore 2020-06-15 11:14:15 +02:00
Zwelf 69cf72dae4 Adjust file based ShowRank, ShowTeamRank, ShowPoints consistent functions to sql 2020-06-15 11:14:15 +02:00
Zwelf 3d25953036 Ordered functions 2020-06-15 11:14:14 +02:00
Zwelf a990acc512 Remove existing CRandomMapResult to simplify IScore interface 2020-06-15 11:12:57 +02:00
Zwelf 3af18f5f60 Create shared pointer on demand 2020-06-15 10:59:59 +02:00
Zwelf 0891a0fd51 Remove some unnecessary header includes 2020-06-15 10:59:59 +02:00
Zwelf 8a22cce031 Start of sql refractor
* Use atomic integer in thread count for thread safety
2020-06-15 10:59:46 +02:00
Zwelf add4fab645 Disallow team join while save command is active 2020-06-15 10:59:46 +02:00
Zwelf 7146eb572b Save error handling clean up 2020-06-15 10:59:46 +02:00
Zwelf 2d7886bf33 Small cleanup 2020-06-15 10:59:46 +02:00
def 0d9d873abf Reset hook & collision in prediction after kill
Thanks to Pipou for reporting
2020-06-14 22:50:25 +02:00
12pm 01092a30c1 add sv_tele_others_auth_level 2020-06-14 19:21:12 +03:00
def 2d0340b1cd Add Entites off sign to front layer (fixes #2261) 2020-06-14 16:01:32 +02:00
Learath 8d255921b8 Fix out of bounds read 2020-06-14 12:38:52 +03:00
def 5676e8842a Improve quality default, persist video recorder settings when running other DDNet client 2020-06-06 00:04:42 +02:00
ZombieToad f12d84c2c7
Update gameclient.cpp
so demo renders the right clan as green
2020-06-04 13:49:29 +01:00
bors[bot] ef51f35840
Merge #2240
2240: Don't reset zoom when using timeline in demo r=heinrich5991 a=def-

Thanks to Lady Saavik for reporting

Co-authored-by: def <dennis@felsin9.de>
2020-06-02 17:25:02 +00:00
def d06f1949c2 Stop playing map sound when demo player is paused
Noticed on Shooting Range map
2020-06-02 13:47:05 +02:00
def 690fb852df Don't reset client on demo menu events 2020-06-02 13:22:00 +02:00
bors[bot] 3cd35de942
Merge #2236
2236: Fix team rejoin logic for sv_team 3 r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-02 10:27:13 +00:00
bors[bot] f59441f1c2
Merge #2243
2243: Workaround for client crash on predicted explosion r=def- a=trml

I haven't been able to find the exact source of the problem yet, but at least this seems to get rid of the segfault. The crash only happened with with recent versions of gcc and -O3 for me.

Co-authored-by: trml <trml@users.noreply.github.com>
2020-06-01 20:31:06 +00:00
trml e5d348975b Avoid client crash on predicted explosion 2020-06-01 21:23:18 +02:00
d3fault b9844ea6ec Save active weapon with /rescue 2020-05-31 22:39:28 -07:00
def 4f59000bda Version 13.2.2 2020-05-31 18:51:36 +02:00
bors[bot] a15053d462
Merge #2231
2231: Don't clamp values that have no reasonable values r=Learath2 a=def-

Still affects many values in editor, for example colors in tiles and quads.

Thanks to Pipou for report.

Co-authored-by: def <dennis@felsin9.de>
2020-05-31 11:25:53 +00:00
d3fault 65906070b6 clarified /practice voting instructions 2020-05-30 20:58:01 -07:00
def 88b65b6def Newly joined player should not immediately be subtracted from team 0 2020-05-31 00:34:29 +02:00
def d3b6df97f8 Fix team rejoin logic for sv_team 3 2020-05-30 14:47:34 +02:00
bors[bot] b432fe5d5e
Merge #2234
2234: add cl_nameplates_ids r=def- a=12pm

useful for moderating

Co-authored-by: 12pm <30786226+12pm@users.noreply.github.com>
2020-05-30 12:27:45 +00:00
Learath 6d019204f1 No point locking if teams are disabled 2020-05-30 14:07:30 +03:00
12pm e4b3559c95 add cl_nameplates_ids 2020-05-30 12:37:42 +02:00
def cf7dad8125 Get rid of the clamp that breaks most editor value selection 2020-05-30 09:09:01 +02:00
def 5886ac972e Fix grammar in ungrenade description (Thanks to Pipou) 2020-05-28 23:00:27 +02:00
def 4cc1bc0cf8 Kill player when /practice is on and they get kicked out of team 2020-05-28 21:50:35 +02:00
def 80adf66620 Version 13.2.1 2020-05-28 18:50:32 +02:00
bors[bot] 73b05272ab
Merge #2226
2226: Fix image/sound selection in editor r=heinrich5991 a=def-

Follow-up to https://github.com/ddnet/ddnet/pull/2186 by @BannZay 

Thanks to Cøke for notifying me

Co-authored-by: def <dennis@felsin9.de>
2020-05-28 16:32:59 +00:00
bors[bot] 0cd40c61c3
Merge #2218
2218: Practice mode fixes & improvements r=Learath2 a=def-

Thanks to NANAMAR for report.

Update: tested, works.

Co-authored-by: def <dennis@felsin9.de>
2020-05-28 16:21:01 +00:00
def d17e74ee7d Add sv_practice (fixes #2227) 2020-05-28 13:28:10 +02:00
def b25c75b558 Allow rescuing while falling down even when not frozen 2020-05-28 12:59:45 +02:00
def cacf17bd96 Save weapons as well with /rescue (fixes #2225) 2020-05-28 12:59:40 +02:00
def c00759a0ed Turn off practice mode and reset practice wishes when locked team dies 2020-05-28 12:59:31 +02:00
def 68132350b9 No cheating through noob filter with practice and then leaving team (fixes #2224) 2020-05-28 12:06:56 +02:00
def 6887b0ff3b Fix image/sound selection in editor
Follow-up to https://github.com/ddnet/ddnet/pull/2186

Thanks to Cøke for notifying me
2020-05-28 10:09:29 +02:00
def fb90990d6d Allow /rescue mid-flight
Thanks to Skeith for the suggestion
2020-05-27 23:48:17 +02:00
def 3cbd75b840 Make /rescue work in deepfreeze
Thanks to NANAMAR for report
2020-05-27 23:27:30 +02:00
bors[bot] ec6e6f99b6
Merge #2216
2216: Remove unused `Sv_PlayerTime` game message r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-27 20:40:53 +00:00
def 0f02fc51a8 Version 13.2 2020-05-27 20:37:40 +02:00
heinrich5991 941d3aa8a0 Some formatting 2020-05-27 20:03:11 +02:00
heinrich5991 209726552b Remove unused Sv_PlayerTime game message 2020-05-27 20:03:11 +02:00
bors[bot] 92fc95d742
Merge #2202
2202: Send DDNet version early in the connection process r=Learath2 a=heinrich5991

This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-27 17:49:31 +00:00
bors[bot] 438dc519d6
Merge #2212
2212: Use a consistent PRNG on all platforms r=Learath2 a=heinrich5991

I just used glibc's because that is what we use on all the servers. Based on https://www.mscs.dal.ca/~selinger/random/.

Behavior change: The PRNG is actually seeded now.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-27 16:14:09 +00:00
heinrich5991 9075bc452d Add a comment justifying the modulo for random numbers 2020-05-27 18:12:42 +02:00
def 6b95bc2636 Fix team save practice reset 2020-05-27 17:58:08 +02:00
def e1849ad1bb Implement /practice for teams
As discussed on Discord today, can be enabled inside of teams on the fly
during each run on any server. Finishes don't count. I haven't tested
save/load yet, would do that live on the server if this can be merged.
2020-05-27 17:33:26 +02:00
Zwelf fab1cde94e Rename variables for consistency
The following member variables:

* m_name to m_aName
* m_String to m_aString
* m_CpCurrent to m_aCpCurrent
* m_Switchers to m_pSwitchers
* SavedTees to m_pSavedTees
2020-05-26 21:49:58 +02:00
heinrich5991 c9c7f947b5 Use the PCG-XSH-RR PRNG instead
This came from a long discussion comparing PCG-* against xoroshiro*. Do
not generate integers without bias because it doesn't affect us very
much and it is easier to reimplement with modulo.
2020-05-26 10:59:49 +02:00
heinrich5991 b488be018f Actually seed the PRNG on each round 2020-05-25 15:19:29 +02:00
heinrich5991 2692f3c758 Use a consistent PRNG on all platforms 2020-05-25 15:19:29 +02:00
heinrich5991 7f14b4b2bb Add glibc's PRNG
Based on a description on https://www.mscs.dal.ca/~selinger/random/
(retrieved 2020-05-25).
2020-05-25 15:19:25 +02:00
bors[bot] 64f78fced9
Merge #2205
2205: Implement /unlock & clarify the /help lock text r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-05-24 20:24:02 +00:00
bors[bot] f18c42c5ba
Merge #2208
2208: Implement /load without params to show some info r=Learath2 a=def-

about your existing saves. Not the code of course, but only how many saves you have and when you last saved on this map.

Co-authored-by: def <dennis@felsin9.de>
2020-05-23 20:20:12 +00:00
bors[bot] 5cddef7efe
Merge #2209
2209: singular player in team start message r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-05-23 20:12:36 +00:00
bors[bot] a1f405aa5c
Merge #2210
2210: Fix name schema for char-arrays r=Learath2 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-05-23 20:06:42 +00:00
def a412773e5a Fix name schema for char-arrays 2020-05-23 21:55:22 +02:00
def 7c966bebc3 singular player in team start message 2020-05-23 21:53:12 +02:00
def c45995a010 Implement /load without params to show some info
about your existing saves. Not the code of course, but only how many
saves you have and when you last saved on this map.
2020-05-23 19:46:12 +02:00
def fd67259b77 Silence GCC warning
src/game/editor/auto_map.h:47:9: warning: ‘*((void*)& NewConf +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]

I don't think it's an actual problem
2020-05-23 18:11:35 +02:00
def 37e0a33da2 Also introduce /unlock as an alias of /lock 0 2020-05-23 17:55:56 +02:00
def d4452dd6e0 Clarify the /help lock text 2020-05-23 17:15:04 +02:00
heinrich5991 0d7872c79e Send DDNet version early in the connection process
This gets rid of the problem that we don't know whether we should send
full snapshots to clients because they haven't told us about them being
DDNet yet.
2020-05-22 17:58:41 +02:00
Zwelf 32085a091d Remove unused declaration 2020-05-22 16:38:20 +02:00
Zwelf 8bdf41c1b5 Break save/load string into multiple lines 2020-05-21 18:04:15 +02:00
Andrii e78b8ac6d8 fix format issues 2020-05-21 00:44:52 +02:00
Andrii ed0b15859a follow naming convention 2020-05-21 00:44:52 +02:00
Andrii 0505a0b577 code formatting 2020-05-21 00:44:52 +02:00
Andrii ab79036873 Set camera position on LoadCurrentMap 2020-05-21 00:44:52 +02:00
Andrii e1828b88ab fix more format failures 2020-05-21 00:44:41 +02:00
Andrii 4f62389eda follow naming convention 2020-05-21 00:44:41 +02:00
Andrii 1ae3d5e69c add key binding description to find empty slot button 2020-05-21 00:44:41 +02:00
Andrii e132fac612 hide Entities popup after item selected 2020-05-21 00:44:41 +02:00
Andrii df6e7ef454 add condition for animations 2020-05-21 00:44:41 +02:00
Andrii b24f12cec8 fix previously made mistake 2020-05-21 00:44:41 +02:00
Andrii 29f093841c add switch empty slot finder button 2020-05-21 00:44:41 +02:00
Andrii 192d118c85 add binding for teleFindEmpty button 2020-05-21 00:44:41 +02:00
Andrii 1c870a3e1b fix some tele number picker issues 2020-05-21 00:44:41 +02:00
Andrii 1a5f0ed6a2 use shift instead of alt for load current map 2020-05-21 00:44:41 +02:00
Andrii 0f1af41911 add binding for tele/switch/speedup/tune button 2020-05-21 00:44:41 +02:00
Andrii d3df450715 add more conditions to menu rendering 2020-05-21 00:44:41 +02:00
Andrii c9afec083d add toggle grid key binding 2020-05-21 00:44:41 +02:00
Andrii f71c886e34 minor refactor 2020-05-21 00:44:41 +02:00
Andrii 63f185fe94 add LoadCurrentMap key binding 2020-05-21 00:44:41 +02:00
Zwelf 71b687cbd6 Remove unused ConSaveTeam, ConLoadTeam declarations 2020-05-21 00:44:30 +02:00
bors[bot] 2a3515200d
Merge #2195
2195: BlockWorlds Entities r=heinrich5991 a=MikiGamer



Co-authored-by: MikiGamer <35080830+MikiGamer@users.noreply.github.com>
2020-05-20 20:36:29 +00:00
Zwelf 61787168a6 Rename aGameUuid to m_aGameUuid for consistency 2020-05-20 22:22:02 +02:00
Zwelf cd015c5e37 Fix storing incomplete game uuid on /save
Previously the formatted game uuid was cut off after 15 bytes.
Therefore only 52 out of 128 bit of the uuid were stored.

introduced in 69fd7f1767
2020-05-20 22:18:14 +02:00
MikiGamer d5c5235c18 Changes 2020-05-19 17:13:34 +02:00
patiga 3f8bebd7af boundary check on curve type label in editor, avoids client crash 2020-05-19 16:52:30 +02:00
MikiGamer 95c419d684 BlockWorlds Entities 2020-05-19 16:49:28 +02:00
Dennis Felsing ffd0228191
Merge pull request #2188 from def-/pr-pred-collision-switch-0
Fix crash in prediction when touching switch tile with number 0 (fixes #2182)
2020-05-19 08:43:35 +02:00
bors[bot] 6ac77b1e88
Merge #2191
2191: write automapper version, was not initialized r=heinrich5991 a=Patiga

write automapper version, was not initialized

Co-authored-by: patiga <patigatus21@gmail.com>
2020-05-17 22:41:07 +00:00
patiga 4bbd019423 fix whitespaces 2020-05-18 00:33:35 +02:00
heinrich5991 044aee2846 Fix compilation with mysql enabled
Caused by #2171's 850f8e3f27.
2020-05-18 00:29:15 +02:00
patiga 359257f73a write automapper version, was not initialized 2020-05-17 23:28:10 +02:00
def 21c4df0771 Fix crash in prediction when touching switch tile with number 0 (fixes #2182)
Just took the same code that we have on server side already
2020-05-17 08:52:21 +02:00
Dennis Felsing 898b4ce4b9
Merge pull request #2171 from Chairn/pr_loadsaveprintname
Print name of requester when saving or loading team
2020-05-16 17:41:34 +02:00
Chairn 850f8e3f27 Store client name in CSqlTeamSave/Load to ensure correctness of requester's name 2020-05-16 16:36:16 +02:00
bors[bot] e54bedd6b2
Merge #2180
2180: Don't count freshly loaded map as modified (fixes #2178) r=Learath2 a=def-

The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.

Co-authored-by: def <dennis@felsin9.de>
2020-05-16 07:12:49 +00:00
def b480492ded Don't count freshly loaded map as modified (fixes #2178)
The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.
2020-05-16 08:17:50 +02:00
Learath eacc56059b Keep ticks going 2020-05-15 19:29:34 +03:00
Learath 5e02bb5a23 Extend antibot interface
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-13 23:39:40 +03:00
Dennis Felsing 7aa69188b5
Merge pull request #2172 from fokkonaut/master
Fix #2162
2020-05-10 10:13:38 +02:00
fokkonaut 92927444d7
Fix #2162 2020-05-09 23:33:12 +02:00
Chairn fdb275b2f9 Print name of requester when saving or loading team 2020-05-09 19:33:40 +02:00
bors[bot] 2649fb5234
Merge #2161
2161: Small prediction fixes/update r=def- a=trml

I looked through the latest changes in the server code, and made some updates to the prediction with it. This includes the hammer-out-of-freeze server fix and a small fix for stopper prediction. Also cleaned up some code, and fixed predicted smoke-trails slightly so they don't go through walls in certain cases.

Co-authored-by: trml <trml@users.noreply.github.com>
2020-05-07 07:30:03 +00:00
bors[bot] 295a479db5
Merge #2164
2164: Fix empty sound (fixes #2163) r=heinrich5991 a=def-

The problem was that the string is empty after going through the trim, thus the main displaying loop doesn't run, but the sound still does. Verified that it works.

Co-authored-by: def <dennis@felsin9.de>
2020-05-06 08:48:24 +00:00
def 741c97ccc7 Fix empty sound (fixes #2163)
The problem was that the string is empty after going through the trim,
thus the main displaying loop doesn't run, but the sound still does.
2020-05-06 08:15:23 +02:00
trml f6c44468de Another update, fix typo 2020-05-03 00:00:27 +02:00
trml cda99668c7 Fix antiping smoketrails 2020-05-02 18:52:09 +02:00
trml 47cafe6d6b Remove unused code 2020-05-02 18:52:09 +02:00
trml eb1bacb969 Update prediction with latest server physics 2020-05-02 18:52:04 +02:00
bors[bot] 65284f3a28
Merge #2159
2159: Make the dummy always press fire when cl_dummy_hammer is active r=heinrich5991 a=trml



Co-authored-by: trml <trml@users.noreply.github.com>
2020-05-01 23:20:22 +00:00
def 7ae8988dd0 Don't load m_Ammo to fix loads (following #2086)
As reported by Konsti, thanks to heinrich5991 for remembering #2086
2020-05-01 23:51:01 +02:00
trml bcf9e003d7 Make dummy hold fire with cl_dummy_hammer 1 2020-05-01 16:23:42 +02:00
def d1b7e84488 Version 13.1 2020-04-30 18:34:51 +02:00
bors[bot] bd3b72e493
Merge #2152
2152: Fix whispering to players with quotes (fixes #2151) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-04-30 10:57:29 +00:00
bors[bot] d0cf8c08af
Merge #2154
2154: cl_showchat 2 to always show large chat area (fixes #2153) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-04-30 10:50:58 +00:00
Dennis Felsing 5e213a2619
Merge pull request #2086 from fokkonaut/master
Remove setting ammo for freeze to 0
2020-04-30 12:44:40 +02:00
fokkonaut d460470265
Move comment aswell 2020-04-30 11:49:04 +02:00
def 76eda61c99 cl_showchat 2 to always show large chat area (fixes #2153) 2020-04-28 22:35:56 +02:00
def 65a4eb775b Fix whispering to players with quotes (fixes #2151) 2020-04-28 08:54:24 +02:00
trml fe1a7fb1e0 Predict directinput order for dummy and main 2020-04-19 12:50:37 +02:00
trml cae7fad901 Use freeze end tick in prediction 2020-04-19 12:50:06 +02:00
trml a4a0b6e9ed Add config flag for dummy prediction and fix compilation 2020-04-18 23:28:40 +02:00
trml 99baf219d0 Revert "Remove the dummy prediction"
This reverts commit 681f30950c.
2020-04-18 22:16:25 +02:00
Arda Demir b7d452d2a0
Libnotify support for linux client (#2099)
Add libnotify support for linux client

Also unify notification management

Make libnotify mandatory for the client. It is installed on 100% of Arch
Linux systems and on 70% of Debian systems. I'd guess the remaining
Debian systems are servers.

Detect dependent libraries of `libnotify` using `pkg-config`. Remove
library-specific code from the game module. Decrement refcount for
libnotify notification object before leaving the function.
2020-04-14 17:53:53 +02:00
def e6d4fe4650 Version 13.0.2 2020-04-10 21:41:29 +02:00
Dennis Felsing 6dd7078e8d
Merge pull request #2118 from def-/pr-mingw-sdl2
Provide MinGW SDL2 (fixes 13.0 on Windows)
2020-04-07 23:01:43 +02:00
Learath 388d792205 Add an option for highdpi 2020-04-07 23:47:15 +03:00
def 2f77e1f349 Version 13.0.1 2020-04-07 22:32:41 +02:00
def d50b59b6b0 Add trafilaw to credits 2020-04-07 07:22:38 +02:00
def f06796e497 Version 13.0
I guess it's time for a new version even if we don't have any large
changes
2020-04-06 07:03:19 +02:00
bors[bot] 2367cd042d
Merge #2104
2104: Add spectate_closest now works when in Free-View r=def- a=d3fault

sry for the general refactor along with it xD

Co-authored-by: d3fault <d3fault@d3fault.net>
2020-04-01 07:02:56 +00:00
d3fault 7fb46beb85 Add spectate_closest now works when in Free-View 2020-03-31 23:30:25 -07:00
bors[bot] 4a6f5b156c
Merge #2101
2101: Add dbg_unpredicted_shadow (fixes #2100) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-03-31 16:41:31 +00:00
def a8c3d192d1 Add cl_unpredicted_shadow -1 value (fixes #2100)
to disasble unpredicted shadow even in debug mode
2020-03-31 18:00:20 +02:00
bors[bot] fe05f0dfbc
Merge #2103
2103: Add spectate_closest r=def- a=d3fault

Spectates the tee closest to the one you are currently spectating.
This commit brought to you by COVID-19 lockdown boredom.

Fix #1793

Co-authored-by: d3fault <d3fault@d3fault.net>
2020-03-31 08:19:58 +00:00
d3fault 6968b17017 Add spectate_closest
Spectates the tee closest to the one you are currently spectating.
This commit brought to you by COVID-19 lockdown boredom.

Fix #1793
2020-03-31 01:17:32 -07:00
trafilaw b6c25273f8 Fix compiling error 2020-03-31 03:29:45 +02:00
trafilaw 44cc0e29a4 Remove No reason given 2020-03-31 00:20:25 +02:00