Commit graph

9005 commits

Author SHA1 Message Date
Jupeyy 8923116324 Fix entity text 2020-09-14 16:42:21 +02:00
bors[bot] 3392933385
Merge #2819
2819: Fix compilation on MinGW Windows r=Learath2 a=def-

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

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

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

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

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



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

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

Any reason to keep this command ?

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

Thanks to @Jupeyy for the original pull request.

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



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

Small optimization but it could start mattering with #2733

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

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

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

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

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



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

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

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

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

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

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

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

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

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

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

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



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



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

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

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

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

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

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

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

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

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

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

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



Co-authored-by: def <dennis@felsin9.de>
2020-09-06 23:05:57 +00:00
TsFreddie 05c199e2aa I can't count 2020-09-07 00:03:40 +01:00
Andrii 7069d26b5a dont predict camera position on spectator changed 2020-09-07 02:02:17 +03:00
TsFreddie e48596dc6c Add test cases 2020-09-06 23:57:21 +01: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
bors[bot] 297f2764f7
Merge #2764
2764: Prevent NULL pointer in mem_copy (fixes #2753) r=heinrich5991 a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-06 22:42:29 +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
bors[bot] d6a353f618
Merge #2763 #2768
2763: Allow joining and inviting others via Steam friend list r=def- a=heinrich5991

Fixes #2642.

2768: Clamp kill border count r=def- a=Jupeyy

fixes #2766

Appearently the center of the camera can even go outside of the kill border(like even left from it)

I also notice that sometimes when zooming out, and then in again the zoom level gets negative(since the new smooth zoom)(atleast i see everything upside down for few frames)

These numerical unstableness makes me sweat a bit xd

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-06 22:23:19 +00: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 6b053936c7 str_utf8_copy using str_utf8_truncate 2020-09-06 20:58:26 +01:00
TsFreddie badc49cac7 Revert "Revert & use "str_utf8_truncate" instead"
This reverts commit b045a3d6ee.
2020-09-06 20:54:57 +01:00
def 1fd5c3ebc3 Try out higher mysql timeouts 2020-09-06 21:51:31 +02:00
Jupeyy aed4293040 Prevent NULL pointer in mem_copy (fixes #2753) 2020-09-06 18:32:56 +02:00
heinrich5991 435137d79e Allow joining and inviting others via Steam friend list while ingame
Fixes #2642.
2020-09-06 17:08:38 +02:00
heinrich5991 7162ded266 Fix formatting in CClient::Update 2020-09-06 15:43:02 +02:00
heinrich5991 89eb210297 Mark players on the same server as playing together in Steam 2020-09-06 13:38:03 +02:00
heinrich5991 f682a79d5f Make it possible to join via the Steam friend list 2020-09-06 13:37:48 +02:00
def b7da058b76 Remove the rudimentary fuzzing since no one uses it anyway 2020-09-05 23:50:31 +02: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
Jupeyy 7ca716fb3f Do more aggressive analysis and check all gl Functions that were used and added in 2.0 2020-09-05 13:07:25 +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
bors[bot] b95ad532ee
Merge #2743
2743: Save cl_overlay_entities r=def- a=Jupeyy

Is there a reason not todo it?
The players, that want this enable it anyway

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-04 17:33:44 +00:00
Jupeyy 145d3244db Save cl_overlay_entities 2020-09-04 19:16:28 +02:00
TsFreddie 44c699b812 Fix unicode pasting in DoEditBox 2020-09-04 18:03:08 +01:00
TsFreddie a3a363f665 C90 2020-09-04 17:48:18 +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 35a8aa5146 Revert "Don't time out on info2.ddnet.tw"
This reverts commit e936a86b5b.
2020-09-04 18:23:43 +02:00
Jupeyy 9299a2a1e4 Initialize variables from base class for the gl 3.3 class 2020-09-04 18:08:00 +02:00
Dennis Felsing dde40779fe
Merge pull request #2737 from def-/pr-ignore
INSERT OR IGNORE on sqlite
2020-09-04 16:27:20 +02:00
Dennis Felsing 27f8402755
Merge pull request #2735 from def-/pr-timeout
Don't time out on info2.ddnet.tw
2020-09-04 16:26:03 +02:00
bors[bot] e3b879f616
Merge #2736
2736: Let 0.7 clients fastdownload too r=def- a=Learath2

Easier than expected, I wonder why I didn't do this at the start.

Co-authored-by: Learath <learath2@gmail.com>
2020-09-04 14:17:32 +00:00
def c3f9dc7c9f INSERT OR IGNORE on sqlite 2020-09-04 16:12:12 +02:00
Learath b8242689c6 Let 0.7 clients fastdownload too 2020-09-04 16:45:49 +03:00
def e936a86b5b Don't time out on info2.ddnet.tw 2020-09-04 15:36:00 +02:00
def 80df6ca3b1 Remove temporary files after failure 2020-09-04 15:32:35 +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
bors[bot] f48ba92161
Merge #2718
2718: Fix texture destroy r=heinrich5991 a=Jupeyy

Might already help with #2717

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-04 10:14:34 +00:00
def 3a730cc30d Version 14.6 2020-09-04 12:03:45 +02:00
bors[bot] 8704c1f1a3
Merge #2728
2728: Allow loading from any server r=Zwelf a=def-

Since we are switching to a single write sql server for sake of simplicity

Co-authored-by: def <dennis@felsin9.de>
2020-09-04 09:00:51 +00:00
TsFreddie f71c36285f Textrender: count glyphs and chars separately 2020-09-03 23:53:26 +01: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
bors[bot] 9edb3706dd
Merge #2721
2721: Don't update news when something was only removed r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-03 18:49:22 +00:00
def 0ba18cd891 Inform client about failure to join because of invalid utf8 2020-09-03 20:34:05 +02:00
bors[bot] e40e1866e2
Merge #2726
2726: Only send valid UTF-8 over the network r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-09-03 17:13:10 +00:00
heinrich5991 5b669bcb32 Only send valid UTF-8 over the network 2020-09-03 18:50:23 +02:00
bors[bot] 53e03192dd
Merge #2722
2722: Increase default font texture size r=heinrich5991 a=Jupeyy

Now that we have fallback fonts this makes sense.

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-03 15:38:45 +00:00
Jupeyy b0bd0a8c62 Increase default font texture size 2020-09-03 14:18:44 +02:00
def d6f74eb654 Don't update news when something was only removed 2020-09-03 12:32:13 +02:00
Jupeyy 6b3ad82786 Add shutdown command again 2020-09-03 11:49:47 +02:00
Jupeyy 49d2e36e26 Fix texture destroy 2020-09-03 10:46:15 +02:00
d3fault b5861f2857 add #ifdef check around GLEW_VERSION_4_6
This fixes compilation on Debian Stretch
2020-09-02 23:44:24 -07:00
bors[bot] 7a1d2c0f4e
Merge #2715
2715: Fix server responses handling in game browser r=heinrich5991 a=BannZay

Fixes all problems for #2620

Explanations of existed problems:
Lan has non expected servers because we were creating browser entry regardless token check
DDNet tab has ping 0 for servers as we weren`t rejecting previous refresh responses

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-09-03 01:37:37 +00: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 840d8cb1a7 reset token seed on browser refresh 2020-09-03 03:03:22 +03:00
Andrii 836c56aeb5 create serverbrowser entry only after broadcast token check 2020-09-03 02:51:33 +03: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
heinrich5991 674d7856fd Begin the groundwork to set a custom status on Steam
Currently, this just shows the current map in the status. Might need
localization data in Steamworks to be available to work in languages
other than English.

CC #2642
2020-09-02 00:32:22 +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
bors[bot] 447b9181e1
Merge #2696
2696: Fix syntax for primary key tables r=Zwelf a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-01 09:39:09 +00:00
def e0cbd3b888 Remove fallback for Teeworlds' settings.cfg (partially fixes #2698) 2020-09-01 09:55:14 +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
def a51f38e6b8 Fix syntax for primary key tables 2020-08-31 23:14:58 +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 5d239bce80 Also check for divisibility by 16 of height (fixes #2687) 2020-08-31 14:01:34 +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 ffa955096f Add localization for texture warning, improve wording (fixes #2688) 2020-08-31 13:07:57 +02:00
bors[bot] 2795082c38
Merge #2678 #2681
2678: Load serverbrowser more fairly r=heinrich5991 a=def-

One from each country and so on instead of doing one country fully first
before moving to the next. This makes loading servers like Japan and AUS
much faster since they're at the back of the list. This also reduces the
peak number of packets sent to each IP at once.

2681: Upgrade SDL2 for Linux Steam release to 2.0.12 (fixes #2679) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-31 10:24:52 +00:00
def 2b0e13db53 Add platform and arch in console output 2020-08-31 12:05:50 +02:00
def 44b1014f41 Load serverbrowser more fairly
One from each country and so on instead of doing one country fully first
before moving to the next. This makes loading servers like Japan and AUS
much faster since they're at the back of the list. This also reduces the
peak number of packets sent to each IP at once.
2020-08-31 00:10:26 +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
Jupeyy af4923b75b Add config variable, to ignore the check after it executed once 2020-08-29 18:44:48 +02:00
Jupeyy 570f148287 Analyse 3D/2D array texture sampling data when creating context 2020-08-29 18:44:42 +02: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
bors[bot] ff3885b12c
Merge #2665
2665: Use the correct name for determining ranks r=def- a=heinrich5991

Was broken by the recent Steam name update.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-08-29 13:03:30 +00: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
def 7417c2f937 Introduce primary keys for record_race and record_teamrace 2020-08-29 14:53:36 +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
heinrich5991 db52340ab1 Use the correct name for determining ranks
Was broken by the recent Steam name update.
2020-08-29 12:39:57 +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
bors[bot] 5f6df2b5a4
Merge #2662
2662: Read server port from CNetServer but not from app config r=def- a=BannZay

Due to a34c72530b we may see "[register]: ERROR: configure your firewall/nat to let through udp on port 0."

Reason: reading port data from configs but not from server object itself

I am new to server code, take a close look to changes please

Co-authored-by: Andrii <bannzay3@gmail.com>
2020-08-27 21:35:54 +00:00
Andrii cec8bf2195 Read server port from CNetServer but not from app config 2020-08-27 19:54:44 +03:00
Learath fbb498588c Missed a vote case 2020-08-27 19:48:19 +03:00
Jupeyy e84d3a2659 Resize non devidable by 16 images for 3D/2D array textures 2020-08-27 02:07:25 +02: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
Dennis Felsing 62d68d24fa
Merge pull request #2654 from def-/pr-input
Try to fix input in Steam version on Windows (fixes #2645)
2020-08-26 19:59:52 +02:00
Andrii 620f67af15 Refresh browser on Indicate map finish click 2020-08-26 20:23:25 +03:00
bors[bot] b13197e9f2
Merge #2650
2650: Remove panic quit button r=Learath2 a=def-

Use alt-f4 or whatever your window manager wants instead.

Co-authored-by: def <dennis@felsin9.de>
2020-08-26 16:26:26 +00:00
bors[bot] 47b716a25b
Merge #2656
2656: Forbid some more whitespace and whitespace-like characters r=Learath2 a=def-

Made sure everything from
https://en.wikipedia.org/wiki/Whitespace_character#Unicode is included

As reported by Im 'corneum

Co-authored-by: def <dennis@felsin9.de>
2020-08-26 16:19:53 +00: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
def 7781c8826e Forbid some more whitespace and whitespace-like characters
Made sure everything from
https://en.wikipedia.org/wiki/Whitespace_character#Unicode is included
2020-08-26 16:43:47 +02: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
def df82d24ffc Remove panic quit button 2020-08-26 15:38:39 +02:00
Jupeyy 14d383ef15 Fix background map loading 2020-08-26 15:25:44 +02:00
def 71cd53acfe Try to fix input in Steam version on Windows (fixes #2645) 2020-08-26 15:15:06 +02:00
bors[bot] 01944fabd4
Merge #2648
2648: Support Linux shared libs in autoupdater r=Learath2 a=def-

Since we now ship our first shared lib on Linux, libsteam_api.so

Co-authored-by: def <dennis@felsin9.de>
2020-08-26 09:35:13 +00:00
bors[bot] 736488cdf7
Merge #2647
2647: No sampler calls in old OpenGL API r=def- a=Jupeyy

Sadly didn't see it earlier, old API still binds its samplers to textures directly.
Need this before steam release @def- 

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-08-26 09:26:49 +00:00
def ca5346ed61 Support Linux shared libs in autoupdater
Since we now ship our first shared lib on Linux, libsteam_api.so
2020-08-26 11:14:04 +02:00
Jupeyy 61374cfb33 No sampler calls in old OpenGL API 2020-08-26 00:59:31 +02:00
trml c98a1f0a59 Only send pain sound in freeze if fire was released 2020-08-25 22:45:23 +02:00
Dennis Felsing 955ccb9995
Merge pull request #2634 from def-/pr-borderless-mac
Use borderless by default on Mac (fixes #2632)
2020-08-25 20:28:56 +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] 3d1bc414d2
Merge #2639
2639: Give a more instructive message on DNSBL ban r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-08-25 11:53:48 +00:00
def d41a6e6878 Give a more instructive message on DNSBL ban 2020-08-25 13:41:38 +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
heinrich5991 3c6f05887f Add SteamAPI + stub 2020-08-25 13:03:20 +02:00
trml d5c030065a Sort players by descending order first 2020-08-25 02:26:36 +02: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 23a3d46719 Use borderless by default on Mac (fixes #2632)
Proper fix would be 7f594afc9b

Would be great if someone could provide and test it.
2020-08-23 19:16:24 +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 2c02314708 Stronger 1.x fallback, if OpenGL 3.0 was invalidly created 2020-08-22 21:49:30 +02:00
Jupeyy f04ec93898 Use OpenGL 3.0 as default 2020-08-22 21:16:30 +02:00
Jupeyy 5b9269f30a Check NPOT textures and stronger 1.x fallback (fixes #2630) 2020-08-22 21:15:50 +02:00
Zwelf c5bba96556 Clarify sv_use_sql config description 2020-08-22 17:17:29 +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
Zwelf 2cbbd9088b Fix copy paste error 2020-08-21 22:43:22 +02:00
Dennis Felsing b2ebcb4f3c
Merge pull request #2623 from Zwelf/pr-mysql-enhance-unreachable-server-situation
MySQL enhance unreachable server situation
2020-08-21 20:15:49 +02:00
Zwelf 3a30dfbd84 Keep connecting to last reachable MySQL server 2020-08-21 19:46:44 +02:00
Zwelf a808ad5463 Enhance SQL error reporting 2020-08-21 10:37:52 +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 178d864ec9 Switch to Source Han Sans font 2020-08-20 13:55:03 +02:00
bors[bot] 780d64806f
Merge #2606
2606: Remove need for custom certificate r=heinrich5991 a=def-

in anticipation of using CloudFlare

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-08-20 09:43:48 +00:00
def 446526486d Use two fonts, one as explicit fallback
Merging with fontforge had problems, for example for the Bei (U+5317) in
Beijing, see https://github.com/fontforge/fontforge/issues/4432
2020-08-20 11:13:08 +02:00
yeojingkang de6ea67663 Update math.h 2020-08-20 05:02:33 +08:00
yeojingkang 6e9c370eca Added constexpr to math functions 2020-08-20 04:47:09 +08: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
bors[bot] eec9949a8b
Merge #2590
2590: Add DoxyFile and document CUIRect r=def- a=edg-l

I will probably document more stuff later.

To generate docs: `doxygen Doxyfile`

Co-authored-by: Edgar <git@edgarluque.com>
2020-08-19 12:37:54 +00:00
bors[bot] 09faaffec0
Merge #2595
2595: Change default from borderless to fullscreen r=Learath2 a=def-

Switching the default means everyone with borderless window will be
switched to fullscreen. Fullscreen has lower latency and better
performance.

As suggested by Shyzo and voted on on Discord.

Co-authored-by: def <dennis@felsin9.de>
2020-08-19 12:04:58 +00:00
def 99cf35d461 Don't bother Steam users with red update text 2020-08-19 13:41:11 +02:00
def 539c20a200 Add support for PLATFORM_SUFFIX define
So that we can set it like this:

  CXXFLAGS='-DPLATFORM_SUFFIX="steam"' CPPFLAGS='-DPLATFORM_SUFFIX="steam"' make
2020-08-19 13:41:06 +02:00
bors[bot] 8b41dca059
Merge #2602
2602: Merge DejaVuSansCJKName with DejavuWenQuanYiMicroHei and use it for all (fixes #2593) r=Learath2 a=def-

allows reading CJK for everyone independent of language chosen.

got them merged with fontforge, finally looks good.

Hopefully the lags are gone.

Co-authored-by: def <dennis@felsin9.de>
2020-08-19 11:35:10 +00:00
def 03ae471060 Version 14.4 2020-08-19 13:28:23 +02:00
Learath 97b6704a6b Add ban_region_range and sv_region_name 2020-08-19 14:07:55 +03:00
def 1394ac0fc4 Merge DejaVuSansCJKName with DejavuWenQuanYiMicroHei and use it for all (fixes #2593)
got them merged with fontforge, finally looks good.

allows reading CJK for everyone independent of language chosen.

Hopefully the lags are gone.
2020-08-19 12:31:55 +02:00
Learath 6a936602aa Add ban_region 2020-08-19 12:38:49 +03: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
def dd71c293ea Ignore clan of friends by default (fixes #2596) 2020-08-18 19:43:55 +02:00
def 3f5cccd4b1 Change default from borderless to fullscreen
Switching the default means everyone with borderless window will be
switched to fullscreen. Fullscreen has lower latency and better
performance.

As suggested by Shyzo and voted on on Discord.
2020-08-18 19:10:03 +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
Dennis Felsing e8d9496f2e
Merge pull request #2586 from def-/pr-show_direction
Enable cl_show_direction by default (fixes #2585)
2020-08-18 11:00:53 +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 4da0592d78 Replace Kobra 4 and Goo! with Gold Mine
and add maps7 version
2020-08-18 10:47:17 +02: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
def 6cab3c37cc Enable cl_show_direction by default (fixes #2585) 2020-08-18 06:31:51 +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 53c43536d5 map_convert_07: Support drag'n'drop 2020-08-16 23:21:00 +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 b756eaf6dc Ignore non-existing dll file
Happened when adding the new sqlite3.dll file.
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
Dennis Felsing d44d596458
Merge pull request #2554 from heinrich5991/pr_ddnet_fix_token
Fix the same token being generated for each client
2020-08-10 23:46:03 +02:00
def e0c06464d2 Version 14.3.1 2020-08-10 23:43:10 +02:00
heinrich5991 2db4e2a3c8 Fix the same token being generated for each client
Theoretically, a regression test would be nice here, but we don't really
have the infrastructure…

This fixes a spoofing vulnerability.
2020-08-10 22:38:49 +02:00
Arda Demir fabc194081 Flag afk when player timed-out 2020-08-10 21:59:31 +03:00
def 467778fc56 Satisfy old C standard
system.c:2325:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
  for(int cursor = 0, pos = 0; pos <= truncation_len && cursor < dst_size && size != cursor; cursor = str_utf8_forward(src, cursor), pos++)
2020-08-10 18:11:51 +02: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 961ad077fb Don't print MySQL password to console 2020-08-09 18:18:25 +02:00
Zwelf 81e5bb924c Move sync_barrier to only used place
to remove `#include <windows.h>` from header file preventing compiling on windows
2020-08-09 18:17:42 +02: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
Zwelf 61ffd88f34 Reformulate #if not defined() because MSVC errors on this expression 2020-08-09 17:13:21 +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
bors[bot] 2aba0a48db
Merge #2536
2536: Send extended snap objects as is to Sixup r=def- a=Learath2

Seems to work, @fokkonaut can you take a look?

Co-authored-by: Learath <learath2@gmail.com>
2020-08-08 12:53:55 +00: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
Learath f324647aec Send extended snap objects as is to Sixup 2020-08-04 20:10:49 +03:00
Zwelf b2cf3cafc5 Implement dump_sqlserver 2020-08-03 16:37:50 +02:00
Zwelf 9e1979f561 Rename Database connect result from ERROR to FAILURE 2020-08-03 13:11:52 +02: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 e3a78a7a31 Add BindBlob and BindFloat function to IDbConnection interface 2020-08-03 12:58:52 +02:00
Zwelf 26a2c91235 Trying to reconnect when ongoing MySQL connection failed 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 17de42a947 Implement locking in SQLite 2020-08-03 12:58:52 +02:00
Zwelf 1677e1fed5 Gracefully shutdown database pool 2020-08-03 12:58:52 +02:00
Zwelf 89ee5944b4 Add missing include 2020-08-03 12:58:52 +02:00
Zwelf 00da45191c Make CREATE TABLE compatible with SQLite 2020-08-03 12:58:52 +02:00
Zwelf 452017a58b Move format string to CREATE TABLE into own file 2020-08-03 12:58:52 +02:00
Zwelf 2c5f892205 Apply suggestions from code review 2020-08-03 12:58:52 +02:00
Zwelf b898f8c7c2 Remove unused MySQL interface 2020-08-03 12:58:52 +02:00
Zwelf 7c31a15c93 Add SQLite interface 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
Zwelf 295ce95d64 Roughly define database pool interface 2020-08-03 12:58:52 +02:00
Zwelf d59cdf47b5 Define new database interface 2020-08-03 12:58:52 +02:00
bors[bot] abb7e7ba1b
Merge #2531
2531: Client: Support .map file drag-and-drop to open map in editor r=heinrich5991 a=def-

As suggested by Lady Saavik

Co-authored-by: def <dennis@felsin9.de>
2020-08-03 10:39:25 +00: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
def 07f18d4ac4 Client: Support .map file drag-and-drop to open map in editor
As suggested by Lady Saavik
2020-08-02 13:00:01 +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
def c8876b2c02 Fix legacy 64 player serverinfo, don't send duplicate packets (fixes #2495)
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.
2020-07-13 00:19:00 +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 a34c72530b Some minor improvements to sv_port 0, make it default 2020-07-09 18:28:20 +02:00
MikiGamer f7eda384ea changes for auto port 2020-07-09 17:48:03 +02:00
MikiGamer beaadca6a9 switch, limited tries & sv_port 0 2020-07-09 17:47:30 +02:00
MikiGamer 6a87278c3d find available port 2020-07-09 17:46:22 +02: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] 0bf10ca765
Merge #2482
2482: Only write non-defaulted config values to settings_ddnet.cfg r=heinrich5991 a=def-

As a consequence changed defaults in an update will be respected
instantly if the player hasn't changed the value.

Co-authored-by: def <dennis@felsin9.de>
2020-07-09 11:35:22 +00: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
def 3729629c1c Only write non-defaulted config values to settings_ddnet.cfg
As a consequence changed defaults in an update will be respected
instantly if the player hasn't changed the value.
2020-07-09 12:40:35 +02: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
bors[bot] 6d17220947
Merge #2461
2461: Fix video recorder (follow-up to 83c820db) r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-08 12:05:40 +00: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
bors[bot] f3778302a5
Merge #2463
2463: Make zoom reset respect cl_default_zoom (fixes #2453) r=Zwelf a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-07-07 19:23:47 +00:00
def f9d2c14ff6 Make zoom reset respect cl_default_zoom (fixes #2453) 2020-07-07 18:02:21 +02:00
def 42f1aba2c3 Fix video recorder (follow-up to 83c820db) 2020-07-07 15:45:36 +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
def f15ac1d869 Fix uninitialised values in sixup differently (fixes #2421)
"./DDNet-Server shutdown" still works
2020-07-07 10:26:44 +02: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
Zwelf 6be35cd4e7 Remove unused function 2020-07-03 20:13:51 +02: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