Commit graph

3154 commits

Author SHA1 Message Date
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
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
def 4da0592d78 Replace Kobra 4 and Goo! with Gold Mine
and add maps7 version
2020-08-18 10:47:17 +02:00
def 6cab3c37cc Enable cl_show_direction by default (fixes #2585) 2020-08-18 06:31:51 +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
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
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
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
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 61ffd88f34 Reformulate #if not defined() because MSVC errors on this expression 2020-08-09 17:13:21 +02: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 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 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 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 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
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 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
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
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
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 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] 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
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 66c7bf8851 Tell why DNSBL isn't allowing to vote (fixes #2466) 2020-07-07 23:12:55 +02:00
def 42f1aba2c3 Fix video recorder (follow-up to 83c820db) 2020-07-07 15:45:36 +02:00
def f15ac1d869 Fix uninitialised values in sixup differently (fixes #2421)
"./DDNet-Server shutdown" still works
2020-07-07 10:26:44 +02:00
Zwelf 6be35cd4e7 Remove unused function 2020-07-03 20:13:51 +02:00
Learath 416cb37000 Send Sixup information to antibot 2020-07-01 21:09:58 +03:00
heinrich5991 358735aadb Revert "Don't run UpdateServerInfo if server isn't initialized yet"
This reverts commit e69f747e5f.

Fixes `shutdown` on the initial command line which is also used on CI.
2020-07-01 17:45:01 +02:00
def e69f747e5f Don't run UpdateServerInfo if server isn't initialized yet
or currently shutting down anyway. Fixes the first half of #2421
2020-06-30 18:33: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
Learath 8d8f1d7208 Only SendChat to clients that exist. Initialize m_Sixup anyway 2020-06-30 18:58:44 +03: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] 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
Learath af2e02ccd2 Fix color toggles 2020-06-27 15:12:53 +03: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 bd11e7ee95 Fix reading old ghosts (fixes #2382) 2020-06-26 15:17:38 +02: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 d8aab366fc Log save/load in teehistorian 2020-06-26 00:01:12 +02:00
bors[bot] 38b95f6c33
Merge #2358
2358: Allow any update.json size r=heinrich5991 a=def-

just grew over 16 KB and thus updates failed. I still need to setup update5 server and will need to release a last release on update4 to have a seemless upgrade-path.

Update: https://update5.ddnet.tw/update.json is ready, 14.0.1 will still land on update4, then we switch to update5.

Co-authored-by: def <dennis@felsin9.de>
2020-06-25 11:46:34 +00:00
Zwelf a8abc3937b Make game less dependend on score backend 2020-06-25 12:36:01 +02:00
def cf77b567f8 Allow any update.json size
just grew over 16 KB and thus updates failed. I still need to setup
update5 server and will need to release a last release on update4 to
have a seemless upgrade-path.
2020-06-25 00:11:00 +02: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
def ef61793854 Don't forget video recorder fps setting
after switching to non-videorecorder client
2020-06-24 14:50:25 +02:00
def 5b3b42b771 Make it more clear that this is a sixup translation server 2020-06-24 14:49:23 +02:00
def a8a2b41f3a Set skill level for Sixup (fixes #2334) 2020-06-23 22:47:29 +02:00
Learath f327e5bc42 Log join type 2020-06-23 18:30:57 +03: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] 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 0db5c51ed9 Add a simple CSV writer for Python's "excel" csv dialect 2020-06-23 09:11:59 +02:00
bors[bot] b720737e5c
Merge #2314
2314: Fix uninitialized warning on SBufferContainerInfo r=def- a=edg-l



Co-authored-by: Edgar <git@edgarluque.com>
2020-06-23 06:05:35 +00:00
def 83c820db09 Fix some naming conventions in videorecorder 2020-06-23 08:00:03 +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
Edgar a03a22b8e5
Fix uninitialized warning on SBufferContainerInfo 2020-06-22 11:23:52 +02:00
Learath 28905c4659 Disable timeout for 0.7 clients 2020-06-20 19:52:23 +03: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
Learath 91c44f1808 Sixup needs it's own maps 2020-06-20 01:00:45 +03:00
bors[bot] 5b4227fbba
Merge #2283
2283: teehistorian: Track whether clients join via the 0.7 protocol r=Learath2 a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-06-19 20:31:40 +00:00
heinrich5991 e294da41ba teehistorian: Track whether clients join via the 0.7 protocol 2020-06-19 22:06:39 +02:00
Learath da68923ac3 Implement a switch for 0.7 compatibility 2020-06-19 22:08:41 +03: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 444bd93437 Fix recvmmsg again... 2020-06-19 20:28:55 +03:00
Learath aeb7ea2971 Don't forget that the client is Sixup 2020-06-19 20:28:55 +03:00
Learath 70ecf785bb Compatible version filter 2020-06-19 20:28:55 +03:00
Learath d794520748 Remove forgotten debug messages 2020-06-19 20:28:55 +03:00
Learath 32fb6718dd Allow joining TEAM_SPECTATOR 2020-06-19 20:28:55 +03:00
Learath 9f71478099 Get Rcon working 2020-06-19 20:28:55 +03:00
Learath 2f760e3e40 Forgot to drop port 2020-06-19 20:28:55 +03:00
Learath 88ca573682 Serverinfo and Register support for 0.7
Co-authored-by: Tim Schumacher <tim@timakro.de>
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 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 40247f6b43 Fix chat 2020-06-19 20:28:55 +03:00
Learath f9cc634683 Fix recvmmsg issue 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 f7e9df7abf Move the rest of the translation to CServer 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
Learath e9ba23b53a Migrate to 0.6.5 flags 2020-06-19 20:27:15 +03:00
def e36dc36b15 Fix demos header (fixes #2278)
Initially broken in 7aed6476dc
2020-06-19 10:42:19 +02:00
def 47e6c7cce2 Only forbid resizing when videorecorder is recording 2020-06-19 08:19:40 +02:00
bors[bot] 6f8f606e05
Merge #2276
2276: Fix segmentation fault when creating sql tables failed r=heinrich5991 a=Zwelf

`GameServer()->OnShutdown(true);` (which would wait on running threads to exit)
wasn't called if an error occured in the server init. Therefore `CServer` was
freed before the init-thread finished executing, causing a use after free from
`CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`.

Fixes #2271 

Note that the server exits when creating tables failed. Since the tables are created by default, it has to be disabled explicitly (e.g. `add_sqlserver r teeworlds record teeworlds PASSWORD "localhost" 3306 0`) if the servers should start even when the database connection fails.

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-18 19:23:00 +00:00
Zwelf f5ac6eea56 Fix segmentation fault when creating sql tables failed
`GameServer()->OnShutdown(true);` (which would wait on running threads to exit)
wasn't called if an error occured in the server init. Therefore `CServer` was
freed before the init-thread finished executing, causing a use after free from
`CSqlConnector::ms_ppSqlReadServers` pointing to `CServer->m_apSqlReadServers`.
2020-06-18 21:11:36 +02:00
def 7aed6476dc Allow larger map names 2020-06-18 18:29:27 +02:00
def 882185e299 Make SaveID DEFAULT NULL 2020-06-18 10:32:58 +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
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 62d56ca8e8 Make database init with create tables synchronous
Note: database init without creating tables behaves the same
2020-06-15 11:14:15 +02:00
Zwelf 031ac52320 Thread safe /save 2020-06-15 11:14:15 +02:00
Zwelf 4152a1995e Add missing dependeny to sql string helper 2020-06-15 11:14:15 +02:00
12pm 01092a30c1 add sv_tele_others_auth_level 2020-06-14 19:21:12 +03:00
Learath 345798f9e1 Don't miss dummy disconnects. Fix #2257 2020-06-11 13:33:08 +03: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
heinrich5991 f339fea748
Merge pull request #2139 from edg-l/pr_add_upnp
Add UPnP support
2020-05-24 22:23:20 +02:00
Edgar 3569e174f2
refactor upnp code 2020-05-24 11:36:43 +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 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
Learath 850e4e84e4 Reserve bytes for the type and token 2020-05-18 21:13:15 +03:00
Learath 788fc8bb5f Update can happen when the gameserver doesn't exist 2020-05-18 16:17:06 +03:00
Learath 1426392ae7 Don't Destroy if we didn't Init 2020-05-16 23:10:42 +03:00
bors[bot] 3c573cfd2f
Merge #2181
2181: Some antibot fixes r=Learath2 a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-16 08:06:53 +00:00
bors[bot] 8c2ae65059
Merge #2177
2177: Extend antibot interface r=def- a=Learath2

Supersedes #2167 

Co-authored-by: Learath <learath2@gmail.com>
2020-05-16 06:07:55 +00:00
heinrich5991 afe2fc930e Fix ITIS, IDONTKNOW not being system messages 2020-05-16 00:41:03 +02:00
heinrich5991 457c4db964 Some antibot fixes 2020-05-16 00:39:17 +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
trml 99baf219d0 Revert "Remove the dummy prediction"
This reverts commit 681f30950c.
2020-04-18 22:16:25 +02:00
Arda Demir 8648b1a7dc Don't push notification when active 2020-04-15 00:37:58 +03: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
Ryozuki ea7f3f0a62
prevent endless loop 2020-04-14 12:51:48 +02:00
Ryozuki b647c1e978
Add UPnP support 2020-04-14 12:11:50 +02:00
Ryozuki 588f8a833f
Fix snapshot storage leak 2020-04-11 13:38:02 +02:00
Ryozuki 5f565a5eb5
check for WavpackCloseFile 2020-04-11 13:17:21 +02:00
Ryozuki 7d51a0992a
fix memory leak on sound decoding 2020-04-11 13:17:21 +02:00
Ryozuki 09b79701af
don't check, use dbg_assert 2020-04-11 13:17:20 +02:00
Ryozuki cde63e2f48
Fix TexEx UB 2020-04-11 13:17:20 +02:00
Ryozuki c6731c7e83
Fix uninitialized m_LastProgramID 2020-04-11 13:17:19 +02:00
def dde88bbd77 Fix division by 0 (fixes #2131)
Caused by https://github.com/ddnet/ddnet/pull/2119/
2020-04-10 20:54:05 +02:00
Ryozuki 0da0dddf15 drop glu dependency 2020-04-08 18:19:12 +02:00
def 6fd7ded869 Whitespace 2020-04-07 22:57:07 +02:00
Learath 388d792205 Add an option for highdpi 2020-04-07 23:47:15 +03:00
bors[bot] 65673ab402
Merge #2119
2119: Change last render logic, when inactive r=def- a=Jupeyy

Just a small fix to let the client not try to get high fps, when it "thinks" it didn't render for a long time.
(is still affected by the SDL check "if window has input" at the cl_refresh_rate calculation, so not a 100% fix).

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-04-07 15:27:29 +00:00
def f7e8b10bff Make gfx_resizable default to 0
because of common graphics issues. As suggested by Jupstar
2020-04-06 12:04:53 +02:00
Jupeyy 888223a529 Change last render logic, when inactive 2020-04-06 03:18:30 +02: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
Learath 61e5667624 Streamline platform client 2020-03-28 02:20:16 +03:00
sirius 3c085b53ed fix bug that demo can't play when demo pause and use start_video 2020-03-26 18:25:50 +08:00
bors[bot] 6e78deb0c4
Merge #2069 #2076 #2095
2069: Move global configuration out of client interface r=heinrich5991 a=ChillerDragon



2076: Allow editing multiple tile layer props r=heinrich5991 a=Learath2

Requested by Ravie on discord

2095: Fix `AntibotDestroy` being called twice r=def- a=heinrich5991

The resource deallocation needs to happen in symmetry with the
allocation, otherwise we get unmatched dealloctions leading to crashes.

Allocations happened in `CAntibot::Init`, but it was not guaranteed that
this was called before the destructor.

Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
Co-authored-by: Learath <learath2@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-03-23 17:04:15 +00:00
bors[bot] 048ca9fe0a
Merge #2070
2070: Fix demo recording with broken maps r=heinrich5991 a=Learath2

Apparently there are maps out there with broken headers advertising the wrong map size. This allows demos to be recorded on those.

Example of such a map is `ctf4_old_d668e9fa_2f472051b26b6bffaa4af8990cf882cafd6364e00e1333b77762cb9911e49464.map`
Hosted on `Allround Network`

Reported by teini94 on discord

Co-authored-by: Learath <learath2@gmail.com>
2020-03-23 16:58:01 +00:00
bors[bot] bf821fe391
Merge #2071
2071: Add an option to only start a new demo when connect while automatically record demos r=def- a=sirius1242

Origin auto demo recording of ddnet will generate lots of demo files especially when playing in mods which have shorter rounds, such as infclass. I added a new option to open a new demo file only when connect to server (include map changing), this is disabled by default, and can use `cl_auto_demo_on_connect 1` to open. It works only when `cl_auto_demo_record` open.

Co-authored-by: sirius <sirius.ustc@gmail.com>
2020-03-23 16:38:17 +00:00
Learath 6919ed3041 Use updated stub, switch around versions 2020-03-23 15:46:57 +01:00
Learath 060d60f2ea Output library versions 2020-03-23 15:46:57 +01:00
def 2319151fb4 Disable currently broken sv_vanilla_antispoof 2020-02-27 22:53:56 +01:00
sirius 72fd0f9a21 forget to check CONF_VIDEORECORDER defined or not for video rendering pause 2020-02-27 20:32:42 +08:00
sirius b5c931279f add option to pause video rendering when demo playing pause 2020-02-27 18:50:18 +08:00
def 127372b03d Fix timeout protection (fixes #2067)
CNetMsg_Cl_Say should not be a system message
2020-02-22 09:55:17 +01:00
sirius 50b980ea16 add an option to only start a new demo when connect while automatically record demos 2020-02-21 17:01:31 +08:00
Learath c52bbb6c02 Fix demo recording with broken maps 2020-02-19 15:38:58 +03:00
ChillerDragon 9e0f6d2ce0 Move global configuration out of client interface 2020-02-19 11:24:58 +01:00
bors[bot] 43ecec1f2f
Merge #2061
2061: use pid in file names of temporary files r=heinrich5991 a=def-

to prevent race conditions with multiple clients running when saving maps, config on quit, during upgrade


Co-authored-by: def <dennis@felsin9.de>
2020-02-13 00:03:23 +00:00
def 31ae4c4d5a use pid in file names of temporary files
to prevent race conditions with multiple clients running when saving
maps, config on quit, during upgrade
2020-02-12 23:14:30 +01:00
def 00b74d2acb Don't overcomplicate Success = false 2020-02-12 22:45:09 +01:00
bors[bot] 72fcf9caa8
Merge #2050
2050: Fix race condition. Closes #2004 r=def- a=Learath2

I guess a new state is better then a global variable

Co-authored-by: Learath <learath2@gmail.com>
2020-01-26 15:49:30 +00:00
Learath cc8dea393d Address feedback 2020-01-25 21:05:33 +01:00
Dennis Felsing 50d848ec43
Merge pull request #1928 from sirius1242/demo_render2
Demo to video converter function.
2020-01-25 21:01:08 +01:00
Learath 40dc9692aa Fix race condition. Closes #2004 2020-01-25 17:48:32 +01:00
bors[bot] 7a3ebd5948
Merge #2041
2041: Strip spaces in browser (server name) r=heinrich5991 a=ChillerDragon

before:
![image](https://user-images.githubusercontent.com/20344300/72688976-b45f1d00-3b0c-11ea-8920-5328c6d721f7.png)
after:
![image](https://user-images.githubusercontent.com/20344300/72688970-9db8c600-3b0c-11ea-8636-330218d75ca1.png)


Co-authored-by: KillaBilla <robomastermail@googlemail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-01-25 12:45:36 +00:00
bors[bot] 749929431a
Merge #2040
2040: fixed faulty message id r=heinrich5991 a=ChillerDragon

(cherry picked from commit 9023796d27)

Co-authored-by: oy <Tom_Adams@web.de>
2020-01-25 12:40:14 +00:00
sirius 97064a1b09 Keep trying to solve fluency issues 2020-01-25 19:14:45 +08:00
def 8779be6bd8 Looks like my comment was wrong... 2020-01-25 07:37:28 +01:00
12pm ec42291756 Allow filtering by name in status
Easier to find players when the server is full
2020-01-24 14:44:54 +01:00
ChillerDragon 610976eddd Fix max snapshot size 2020-01-22 13:44:05 +01:00
ChillerDragon ee825f42e9 Add snap check for dummy 2020-01-21 22:20:09 +01:00
oy 49168da784 fixed typo
(cherry picked from commit 3deb58d409)
2020-01-21 22:17:20 +01:00
oy ef3bce204c added some checks to snap handling
(cherry picked from commit a09d498bc9)
2020-01-21 22:16:28 +01:00
KillaBilla ba1abac52f remove leading and trailing space from server name and forbit the use of multiple spaces
(cherry picked from commit a9cc1e8de2)
2020-01-19 22:28:19 +01:00
oy 1b4131a7fd fixed faulty message id
(cherry picked from commit 9023796d27)
2020-01-19 21:30:12 +01:00
sirius d6dc811674 seems fluent problem solved, and fix a error when compile by msvs 2020-01-12 16:57:40 +08:00
sirius 483885b6b1 try to solve the problem that video not fluent caused by previous commits 2020-01-08 14:25:06 +08:00
sirius d45b66938d make latter to wait when write_frame collision between audio and video 2020-01-07 11:32:56 +08:00