Commit graph

8819 commits

Author SHA1 Message Date
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
bors[bot] 7266bcad78
Merge #2444
2444: Fix erroneous "unable to find all characters" message r=heinrich5991 a=Zwelf

Fixes #2443 

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-07-02 15:07:55 +00:00
Zwelf 17bb4522fc Fix erroneous "unable to find all characters" message 2020-07-02 16:34:36 +02:00
Zwelf ab9cdc294d Reset all input after rescuing 2020-07-02 16:24:23 +02:00
Zwelf 538de72c94 Don't load movement and pause state when rescuing 2020-07-02 14:06:18 +02:00
Zwelf 4388579d48 Fix reenabling practice mode after kill on solo server 2020-07-02 11:13:07 +02:00
heinrich5991 9ed54440cb Add some tests for the bezier stuff 2020-07-02 11:07:30 +02:00
heinrich5991 9c3f8894b0 Restore some lines to the state before working on smooth zoom 2020-07-02 10:53:20 +02:00
bors[bot] a62eeeb829
Merge #2434
2434: Send Sixup information to antibot r=heinrich5991 a=Learath2



Co-authored-by: Learath <learath2@gmail.com>
2020-07-01 22:37:50 +00:00
Learath f9bf6cf354 Spam protection on /rank 2020-07-01 23:53:25 +03:00
Learath 416cb37000 Send Sixup information to antibot 2020-07-01 21:09:58 +03:00
bors[bot] 6da2f117cf
Merge #2425
2425: Fix doors not resetting on restart on solo server r=heinrich5991 a=Zwelf



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

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

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-07-01 16:01:25 +00:00
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
Zwelf bff8e90319 Fix loading team sets teamstate to TEAMSTATE_OPEN 2020-07-01 09:03:16 +02:00
heinrich5991 cdd715fd53 Add smoothing of camera zoom using a cubic polynomial 2020-07-01 00:19:17 +02:00
Zwelf 9e43f8d483 Add CCharacter::m_ReloadTimer to save 2020-06-30 23:49:40 +02:00
Dennis Felsing ac42861d1b
Merge pull request #2427 from def-/pr-14.0.4
Version 14.1
2020-06-30 22:44:20 +02:00
Dennis Felsing 47a3318d2b
Merge pull request #2422 from def-/pr-updateserverinfo
Fix #2421
2020-06-30 22:44:13 +02:00
def 1cb9454ab8 Rename showothers2 -> showothers
and the old showothers to legacy
2020-06-30 21:38:51 +02:00
def edba33be33 Add Show others (own team only) menu setting 2020-06-30 21:38:14 +02:00
def c3521572ea Add showothers2@netmsg.ddnet.tw
to support cl_show_others 2 properly
2020-06-30 21:38:14 +02:00
def 1b17c25fda Version 14.1 2020-06-30 21:32:25 +02:00
Zwelf 6f9dd48401 Fix doors not resetting on restart on solo server 2020-06-30 20:42:01 +02:00
Zwelf b99bbccd24 Revert "Revert "Fix /save on solo server""
This reverts commit 59a7e1f187.
2020-06-30 20:22:17 +02:00
def 3de5b3a12f Revert "Revert "Explain why the randomly generated save code is used""
This reverts commit 4476ec39f9.
2020-06-30 20:18:58 +02:00
def 4476ec39f9 Revert "Explain why the randomly generated save code is used"
This reverts commit 0d887e8b37.
2020-06-30 20:15:50 +02:00
def d10cb17e54 Revert "Restore old /save behavior"
This reverts commit d169bb1b52.
2020-06-30 20:15:46 +02:00
Zwelf 839fd08d6a Check if player still in team when loading hook 2020-06-30 20:13:45 +02:00
Edgar 3578c74667
new defaults use logistic curve 2020-06-30 19:06:29 +02:00
def 59a7e1f187 Revert "Fix /save on solo server"
This reverts commit 506602d472.
2020-06-30 18:41:22 +02:00
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
Zwelf 7427e41959 Keep hook when loading 2020-06-30 18:09:26 +02:00
Learath 8d8f1d7208 Only SendChat to clients that exist. Initialize m_Sixup anyway 2020-06-30 18:58:44 +03:00
Zwelf f2b5abb1fb Keep weak/strong when reloading 2020-06-30 17:52:55 +02:00
Zwelf 949d710597 Fix wrong indention 2020-06-30 17:52:55 +02:00
Zwelf c9f8cc99b1 Stop searching when player was found 2020-06-30 17:52:55 +02:00
Edgar ce57d928eb
newline at end of file 2020-06-30 16:30:40 +02:00
Edgar a46b266564
Smooth zoom 2020-06-30 16:25:54 +02:00
bors[bot] b96544f8ac
Merge #2413
2413: Fix showothers for specchar r=heinrich5991 a=edg-l

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

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

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



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



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

and server adapts the visible distance to it

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

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

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

Controlled with the regular ignore chat button in players menu

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

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

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



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

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

Tadaa, new feature in -200 lines :D

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

hook collision, without broadcasting to other players.

Removed cl_show_hook_coll_always in return

Renamed cl_video_showhookcollother to cl_video_show_hook_coll_other for consistency

Co-authored-by: def <dennis@felsin9.de>
2020-06-27 20:31:29 +00:00
def 1c09798504 Update game id when updating team score 2020-06-27 22:30:14 +02:00
bors[bot] a48f71c854
Merge #2386
2386: localization fixes r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-06-27 20:24:46 +00:00
def 4e5912909b Improve & fix 2020-06-27 19:40:04 +02:00
def 50af2a8ed6 Show number in color scrollbars
As suggested by Lady Saavik
2020-06-27 15:08:50 +02:00
def d147c1c7f5 Cleanup color scrollbars in menus 2020-06-27 15:08:35 +02:00
Learath af2e02ccd2 Fix color toggles 2020-06-27 15:12:53 +03:00
def 7608eb67d6 Ignore emoticon of spammy players (fixes #2387)
Add ignore emoticon button in player menu.
Someone needs to draw the graphic for that.
2020-06-27 01:15:09 +02:00
def dc92626a3b Support cl_show_hook_coll_own/other 2 to always show (fixes #2383)
hook collision, without broadcasting to other players.

Removed cl_show_hook_coll_always in return

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

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

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

Including tests

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

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

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



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



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



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

Fixes #2362, supersedes #2367 

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

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

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

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



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

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

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

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



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

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

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



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

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

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

Untested. Edit: Tested, seems to work.

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



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



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

let's go recount every time

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

after switching to non-videorecorder client

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



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

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

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

As noticed on Sunny Land.

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

Now running this over our maps and fixing them manually.

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

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

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



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

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

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



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

Supersedes #2296.

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

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

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

Unfortunately only stores your own name, not your entire team.
2020-06-22 21:12:35 +02:00
bors[bot] 0ff34022ef
Merge #2303
2303: map_extract: Only access map info if it exists r=heinrich5991 a=def-

Noticed on map Paranormal

Co-authored-by: def <dennis@felsin9.de>
2020-06-22 19:02:17 +00:00
bors[bot] a407513630
Merge #2306
2306: Make ctrl-s/ctrl-l etc work everywhere in editor (fixes #2302) r=heinrich5991 a=def-

instead of just in the layers view

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

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

Co-authored-by: Learath <learath2@gmail.com>
2020-06-22 16:04:18 +00:00
Learath 62d014d999 Forgot we faked ids for vanilla 2020-06-22 19:02:17 +03:00
Learath 287e3e2a45 Use 0.7 finish messages 2020-06-22 18:08:08 +03:00
def 07830c868f Fix whitespace in teeinfo.cpp 2020-06-22 15:06:01 +02:00
def 252cda2d49 Use str_comp instead of strcmp
error: ‘strcmp’ was not declared in this scope
2020-06-22 14:47:49 +02:00
def a9f6d3716c Fix str_format on mingw
src/game/server/ddracecommands.cpp:743:39: warning: unknown conversion type character ‘l’ in format [-Wformat=]
  743 |  str_format(aBuf, sizeof(aBuf), "%s-%lld-%s.save", pSelf->Server()->GetMapName(), time_get(), pSelf->Server()->GetAuthName(pResult->m_ClientID));

See https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
2020-06-22 14:47:40 +02:00
Edgar a03a22b8e5
Fix uninitialized warning on SBufferContainerInfo 2020-06-22 11:23:52 +02:00
def 79cb7d14eb Don't log preprocess nullptr return 2020-06-22 10:06:55 +02:00
def 9d9d5e26e6 Fix double hook sound in 0.7 2020-06-22 09:27:41 +02:00
bors[bot] 39eae1935b
Merge #2312
2312: Fix crash when player voting random_map leaves and vote passes r=def- a=Zwelf

Closes #2310 

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

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


Co-authored-by: def <dennis@felsin9.de>
2020-06-21 09:31:51 +00:00
bors[bot] 715ef25328
Merge #2295
2295: Open links in background (fixes #2292) r=edg-l a=def-

Only tested on Linux

Co-authored-by: def <dennis@felsin9.de>
2020-06-21 09:25:28 +00:00
def 6cfc6adc83 Make ctrl-s/ctrl-l etc work everywhere in editor (fixes #2302)
instead of just in the layers view
2020-06-21 01:44:01 +02:00
def c7908524cd Add a slightly longer introduction text
Since we don't have a tutorial
2020-06-21 01:15:01 +02:00
def c99d791f4b Add warning in editor for image widths 2020-06-21 01:14:36 +02:00
def ca094df46b map_extract: Only access map info if it exists
Noticed on map Paranormal
2020-06-21 00:57:14 +02:00
def 66917c4b24 map_convert_07: Check image dimensions for divisibility by 16 2020-06-20 23:32:08 +02:00
bors[bot] 4dd72df777
Merge #2297
2297: Ingame time is in milliseconds on 0.7 r=def- a=Learath2



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

and some small style and readability fixes in sql_score.

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

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

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

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

Never assume how structures are laid out

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

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

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

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



Co-authored-by: def <dennis@felsin9.de>
2020-06-20 10:46:03 +00:00
def c53528b92f Allow spectators to start votes 2020-06-20 11:20:54 +02:00
Learath 6db72b2388 Times are no longer negative in 0.7 2020-06-20 11:59:46 +03:00
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 623ba68c19 Fix an oversight on skin conversion and some UB 2020-06-19 20:28:55 +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 ddaea93e60 Implement the new Chat Commands protocol 2020-06-19 20:28:55 +03:00
Learath 1d4ea6c41b Drop clients properly 2020-06-19 20:28:55 +03:00
Learath 9a4b1f3615 Fix fake_server 2020-06-19 20:28:55 +03:00
Learath d794520748 Remove forgotten debug messages 2020-06-19 20:28:55 +03:00
Learath effa964f08 Translate playerflags 2020-06-19 20:28:55 +03:00
Learath df42ce8b16 Send gameinfo correctly 2020-06-19 20:28:55 +03:00
Learath 32fb6718dd Allow joining TEAM_SPECTATOR 2020-06-19 20:28:55 +03:00
Learath 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 1514a6df85 Fix NetObj translation, fix sounds 2020-06-19 20:28:55 +03:00
Learath 46a7b6de2c Fix some oob access 2020-06-19 20:28:55 +03:00
Learath 9dc1a0357a Get /spec working 2020-06-19 20:28:55 +03:00
Learath e81c718180 Rework netobjs, fix chat 2020-06-19 20:28:55 +03:00
Learath eff28c658a Fix server messages 2020-06-19 20:28:55 +03:00
Learath 939b45a0aa Actually remove duplicate message 2020-06-19 20:28:55 +03:00
Learath 465fd570e0 Implement whispers 2020-06-19 20:28:55 +03:00
Learath 25664da121 Remove duplicate message 2020-06-19 20:28:55 +03:00
Learath 40247f6b43 Fix chat 2020-06-19 20:28:55 +03:00
Learath 974b373ec2 Translate Damage Indicators 2020-06-19 20:28:54 +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] 7d428676e2
Merge #2263
2263: Fix /spec + super bug r=Learath2 a=def-



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

Noticed on Shooting Range map

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

Thanks to Pipou for reporting

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

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

Benefits:

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

Behavior change:

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

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

Co-authored-by: Zwelf <zwelf@strct.cc>
2020-06-17 19:35:45 +00:00
bors[bot] 1ccce4a12d
Merge #2270
2270: Consider time_freq() r=def- a=Learath2

The timer ticks way faster on macOS leading to some insane pings :D

Co-authored-by: Learath <learath2@gmail.com>
2020-06-17 19:29:18 +00:00
Zwelf f1b2ff086c Clean up thread safe SQL refactor 2020-06-17 21:15:07 +02:00
Learath 88780cb495 Consider time_freq() 2020-06-17 20:56:29 +03:00
Learath eed3e783e0 Mark unused tunes as such 2020-06-17 13:39:54 +03:00
bors[bot] c4d71c7ef4
Merge #2264
2264: Add Entites off sign to front layer (fixes #2261) r=Learath2 a=def-



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

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



Co-authored-by: Learath <learath2@gmail.com>
2020-06-11 10:40:17 +00:00
Learath 345798f9e1 Don't miss dummy disconnects. Fix #2257 2020-06-11 13:33:08 +03:00
def 5676e8842a Improve quality default, persist video recorder settings when running other DDNet client 2020-06-06 00:04:42 +02:00
ZombieToad f12d84c2c7
Update gameclient.cpp
so demo renders the right clan as green
2020-06-04 13:49:29 +01:00
bors[bot] ef51f35840
Merge #2240
2240: Don't reset zoom when using timeline in demo r=heinrich5991 a=def-

Thanks to Lady Saavik for reporting

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



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

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

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

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

Thanks to Pipou for report.

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

useful for moderating

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

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

Thanks to Cøke for notifying me

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

Thanks to NANAMAR for report.

Update: tested, works.

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

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



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

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

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

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

Behavior change: The PRNG is actually seeded now.

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

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



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

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

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



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



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

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



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

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

write automapper version, was not initialized

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

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

Co-authored-by: def <dennis@felsin9.de>
2020-05-16 07:12:49 +00:00
def b480492ded Don't count freshly loaded map as modified (fixes #2178)
The reason is that we increased the sensitivity of the modified flag to
include adding layers and groups, and simply loading the map already
adds those, so every loaded map was considered modified.
2020-05-16 08:17:50 +02:00
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
bors[bot] fa4af4f4fe
Merge #2179
2179: Fix ITIS, IDONTKNOW not being system messages r=def- a=heinrich5991



Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-05-16 06:01:10 +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
Dennis Felsing 7aa69188b5
Merge pull request #2172 from fokkonaut/master
Fix #2162
2020-05-10 10:13:38 +02:00
fokkonaut 92927444d7
Fix #2162 2020-05-09 23:33:12 +02:00
Chairn fdb275b2f9 Print name of requester when saving or loading team 2020-05-09 19:33:40 +02:00
bors[bot] 2649fb5234
Merge #2161
2161: Small prediction fixes/update r=def- a=trml

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

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

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

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



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



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



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



Co-authored-by: def <dennis@felsin9.de>
2020-04-12 19:43:09 +00:00
def a951845083 Surprise: void x(); accepts any parameter in C!
Prevents accidentally passing parameters that would then be ignored.

C++ is more reasonable, so nothing to do there.
2020-04-12 20:06:38 +02:00
def 4c00e4533c Fix type of os_is_winxp_or_lower function (fixes #2135) 2020-04-12 10:23:08 +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 e6d4fe4650 Version 13.0.2 2020-04-10 21:41:29 +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
Dennis Felsing 6dd7078e8d
Merge pull request #2118 from def-/pr-mingw-sdl2
Provide MinGW SDL2 (fixes 13.0 on Windows)
2020-04-07 23:01:43 +02:00
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
def 2f77e1f349 Version 13.0.1 2020-04-07 22:32:41 +02: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 d50b59b6b0 Add trafilaw to credits 2020-04-07 07:22:38 +02:00
Dennis Felsing d1a5b45dc3
Merge pull request #2109 from def-/pr-13.0
Version 13.0
2020-04-07 07:13:50 +02: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
def f06796e497 Version 13.0
I guess it's time for a new version even if we don't have any large
changes
2020-04-06 07:03:19 +02:00
Jupeyy 888223a529 Change last render logic, when inactive 2020-04-06 03:18:30 +02:00
bors[bot] 2367cd042d
Merge #2104
2104: Add spectate_closest now works when in Free-View r=def- a=d3fault

sry for the general refactor along with it xD

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



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

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

Fix #1793

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

Fix #1793
2020-03-31 01:17:32 -07:00
trafilaw b6c25273f8 Fix compiling error 2020-03-31 03:29:45 +02:00
trafilaw 44cc0e29a4 Remove No reason given 2020-03-31 00:20:25 +02:00
trafilaw dc0e77f8e2 fix 2020-03-31 00:16:42 +02:00
trafilaw 8d8bc018c6 Add pr_mutereason 2020-03-30 23:51:58 +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
fokkonaut da72907b79 Fix ninja not getting removed 2020-03-24 21:43:26 +01:00
bors[bot] fb81000351
Merge #2096
2096: Fix the double-free of the antibot r=def- a=heinrich5991

I could not find an easy way to ensure that `AntibotDestroy` is only
being called once for each `AntibotInit` but still happening after all
the `CPlayer` destructors.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-03-24 15:16:24 +00:00
bors[bot] 10299266c3
Merge #2078
2078: Fix cl_showrecord with dummy (fixes #2077) r=heinrich5991 a=def-

Shows best time of either dummy or main player depending on which is selected

Co-authored-by: def <dennis@felsin9.de>
2020-03-24 14:23:38 +00:00
heinrich5991 a7042f7139 Fix the double-free of the antibot
I could not find an easy way to ensure that `AntibotDestroy` is only
being called once for each `AntibotInit` but still happening after all
the `CPlayer` destructors.
2020-03-24 15:15:40 +01:00
heinrich5991 d50547ea42 Revert "Fix AntibotDestroy being called twice"
This reverts commit efb3106b71.
2020-03-24 15:07:01 +01: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
heinrich5991 efb3106b71 Fix AntibotDestroy being called twice
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.
2020-03-23 15:35:16 +01:00
fokkonaut 69a6e94833 Fix two bugs 2020-03-17 13:55:30 +01:00
heinrich5991 ed76cd7b12 Fix antibot crash
`m_Core.m_HookedPlayer` can be -1 if you get teleported the moment you'd
normally attach the hook.
2020-03-16 14:16:04 +01:00
fokkonaut d22a1a8f06 Remove setting ammo for freeze to 0 2020-03-16 11:52:53 +01:00
heinrich5991 2574c060e4 Fix antibot crash after map change 2020-03-14 01:44:57 +01:00
heinrich5991 a3163c5b9c Add support for dynamically loading an antibot module
Support for this feature is turned off by default. This feature allows
to integrate with noby's anticheat feature.
2020-03-11 01:58:50 +01:00
def 6efcc473c9 Fix cl_showrecord with dummy (fixes #2077)
Shows best time of either dummy or main player depending on which is
selected
2020-03-01 12:55:01 +01:00
Learath d2498f257c Stateful editing 2020-02-28 18:25:27 +03:00
Learath f2103881c8 Add shift by, fix id overlap 2020-02-28 15:33:32 +03:00
def 2319151fb4 Disable currently broken sv_vanilla_antispoof 2020-02-27 22:53:56 +01:00
Learath a50e59d4f6 Allow editing colors, add warning 2020-02-27 18:02:36 +03:00
Learath ce8987cd43 Missing include 2020-02-27 16:56:40 +03:00
Learath f679fbfbc5 Allow editing multiple tile layer props 2020-02-27 16:53:12 +03:00
sirius 72fd0f9a21 forget to check CONF_VIDEORECORDER defined or not for video rendering pause 2020-02-27 20:32:42 +08:00
sirius 5dab6e2e1f make tee not transparent when playing demo from server 2020-02-27 20:13:16 +08:00
sirius b5c931279f add option to pause video rendering when demo playing pause 2020-02-27 18:50:18 +08:00
def de7a67baa7 Version 12.9.2 2020-02-22 09:56:13 +01: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] 7691227f24
Merge #2066
2066: Implement dry saves r=def- a=Learath2

I'm not sure how much I like this but it should be helpful

Co-authored-by: Learath2 <learath2@gmail.com>
2020-02-14 08:02:06 +00:00
Learath2 06e948e944 Cleanup 2020-02-14 00:03:49 +01:00
def d89877603b Version 12.9.1 2020-02-13 22:55:48 +01:00
def 964279a699 Reset quad rotation/color in damageind (fixes #2062)
Removed in 7ae4b39574
2020-02-13 22:55:32 +01:00
Learath2 ec42ce88f6 Change command name, refactor error handling 2020-02-13 17:04:58 +01:00
Learath2 27d9ac54b0 Implement dry saves 2020-02-13 16:16:35 +01:00
ElXreno 1799edc049
Fix build error
./src/game/client/components/maplayers.h:15:9: error: 'uintptr_t' does not name a type; did you mean 'uint64_t'?
   15 | typedef uintptr_t offset_ptr;
      |         ^~~~~~~~~
      |         uint64_t
../src/game/client/components/maplayers.h:61:4: error: 'offset_ptr' does not name a type; did you mean 'offset_ptr32'?
   61 |    offset_ptr IndexBufferByteOffset()
      |    ^~~~~~~~~~
      |    offset_ptr32
In file included from ../src/game/client/components/background.cpp:8:
../src/game/client/components/maplayers.h:105:4: error: 'offset_ptr' does not name a type; did you mean 'offset_ptr32'?
  105 |    offset_ptr m_IndexBufferByteOffset;
      |    ^~~~~~~~~~
      |    offset_ptr32
../src/game/client/components/maplayers.h: In constructor 'CMapLayers::SQuadLayerVisuals::SQuadVisual::SQuadVisual()':
../src/game/client/components/maplayers.h:103:20: error: class 'CMapLayers::SQuadLayerVisuals::SQuadVisual' does not have any field named 'm_IndexBufferByteOffset'
  103 |    SQuadVisual() : m_IndexBufferByteOffset(0) {}
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
2020-02-13 17:27:39 +03:00
Dennis Felsing cd44d6dba7 Version 12.9 2020-02-13 09:20:00 +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
def 598ec52892 Fix GCC 9.2.0 compilation
src/game/server/ddracechat.cpp:623:39: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
2020-02-05 08:22:04 +01:00
12pm f3b82273d4 Remove leading whitespaces from save codes 2020-01-30 18:53:00 +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
bors[bot] 8ab8834ccb
Merge #2048
2048: Display envelope name in popups r=12pm a=Learath2

A dropdown would've worked better, but we don't have one

Co-authored-by: Learath <learath2@gmail.com>
2020-01-23 20:54:49 +00:00
Learath e567fde9d7 Names aren't unique, thinner popup 2020-01-23 21:24:48 +01:00
Learath a2eee9a8db Truncate properly 2020-01-23 20:48:42 +01:00
Learath 2abe4fbcfb Display envelope name 2020-01-23 20:27:01 +01:00
12pm 9dcfcc8f10 Modify envelope index when appending maps
fixes #2044
2020-01-23 18:30:55 +01:00
Learath 4451fed535 Fix missing include 2020-01-23 16:07:40 +01:00
bors[bot] a47a94ee0e
Merge #2042
2042: Check snap r=def- a=ChillerDragon



Co-authored-by: oy <Tom_Adams@web.de>
Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
2020-01-22 13:02:04 +00: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
heinrich5991 8c4569991d Fix indentation and formatting of str_clean_whitespaces
(cherry picked from commit b9c4086382)
2020-01-19 22:38:08 +01:00
KillaBilla 75d076b3bc changed str_clean_whitespace implementation to pkoerner's one
(cherry picked from commit a9cc1e8de2)
2020-01-19 22:37:57 +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
ChillerDragon 949aa124e9 Overkill optimize editor code runs 200 fps faster 2020-01-19 17:48:07 +01:00
12pm 82ac6091eb Fix rotating rotatable tiles in switch layer 2020-01-17 18:22:41 +01:00
Corantin H a73525361b Fix del key removing commands while in editbox 2020-01-16 15:01:45 +01:00
Dennis Felsing fcc25dfc65 Fix crash on pDDNetCharacter 2020-01-16 12:35:26 +01:00
heinrich5991 fe1cf90327 Restore rcon rifle compatibility shim
Two more lines to keep backward compatibility.
2020-01-12 13:59:55 +01:00
sirius d6dc811674 seems fluent problem solved, and fix a error when compile by msvs 2020-01-12 16:57:40 +08:00
bors[bot] 173ca2e179
Merge #2026
2026: Only start showing emoticons after their start tick has passed (fixes #2025) r=Learath2 a=def-

Since we can go back in time in demo player

Co-authored-by: def <dennis@felsin9.de>
2020-01-08 09:27:09 +00: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
bors[bot] 7d7b51011d
Merge #2030
2030: Move /list to ddracechat r=def- a=fokkonaut



Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2020-01-06 21:39:19 +00:00
fokkonaut c27e28b7ad Move /list to ddracechat 2020-01-06 17:29:31 +01:00
sirius 3baba93ed2 fix the problem of audio when video fps is low 2020-01-06 11:57:24 +08:00
fokkonaut f5b8bbc2ff Simplify anti stuck code more 2020-01-05 11:49:21 +01:00
sirius 779afcb771 crf and preset can be set by variables 2020-01-05 11:18:51 +08:00
fokkonaut e2b252b714 Distance can't be negative 2020-01-04 16:32:51 +01:00
sirius 0be4629cc1 forget to deal with pError 2020-01-04 17:44:12 +08:00
sirius 3967ddba00 replace same operations by call Demoplay_Play() when rendering video by render button 2020-01-04 17:08:00 +08:00
def 54d4aef145 Only start showing emoticons after their start tick has passed (fixes #2025)
Since we can go back in time in demo player
2020-01-04 10:07:14 +01:00
sirius 521e822bbb update map fix part when rendering video 2020-01-04 17:02:00 +08:00
sirius 5350a12185 fix wired sound 2020-01-04 10:17:16 +08:00
def 600a3b0bad Fix preprocessor 2020-01-03 22:07:02 +01:00
def 511c9d248e Fix alignment of pixels for reading to video recorder 2020-01-03 21:43:15 +01:00
def 1e36b4df15 Move some code out as a small optimization 2020-01-03 21:42:53 +01:00
def 8d716452ba Fix sizes so that we don't write too far 2020-01-03 21:42:19 +01:00
def 54ae929b2f Disallow resizing windows when videorecorder is compiled in 2020-01-03 21:40:41 +01:00
def a0362019f0 Initialize m_NextaFrame 2020-01-03 20:37:27 +01:00
Learath d2fad6c79a Fix demo bug 2020-01-03 12:13:40 +03:00
sirius 6803726209 extend sound buffer, try to solve segment fault problem 2020-01-03 10:26:10 +08:00
def 017b8c3621 Move DDNet-custom json code out of external directory (fixes #2022) 2020-01-01 20:07:04 +01:00
def df807a7486 -DVIDEORECORDER=ON instead of -DFFMPEG=ON, fix README
remove unused files
2020-01-01 16:56:54 +01:00
sirius 7710b88670 Merge branch 'master' of https://github.com/ddnet/ddnet into demo_render2 2020-01-01 18:36:49 +08:00
Dennis Felsing ba3b436139 Fix Websockets warning 2019-12-30 10:12:16 +01:00
def b0406e335b Remove debugging help 2019-12-29 13:35:19 +01:00
def 0236f15018 Teamscore DDNet7 fix 2019-12-29 12:55:19 +01:00
def 6da92b4b9c Fix map_convert_07 tool 2019-12-29 12:43:41 +01:00
def 5f855b11b2 Version 12.8.1 2019-12-22 22:39:31 +01:00
Dennis Felsing 811ddb3283
Merge pull request #2008 from Learath2/dd_pr_demohotfix
Fix (not) small bug with demos that don't include a map
2019-12-22 22:38:22 +01:00
Learath a882cf5196 Fix bug with slices 2019-12-22 19:09:14 +03:00
def aa3e82cda7 Revert "Write out sql server prefix to failed_sql.sql"
This reverts commit c1a7961359.
2019-12-22 09:30:33 +01:00
def 8879f17341 Revert "Still pass in SqlServer even when writing to file since we need prefix"
This reverts commit 6e294d938b.
2019-12-22 09:28:14 +01:00
Dennis Felsing 83f2fc2669
Merge pull request #2012 from ChillerDragon/pr_func_style
Style 'void foo() {' -> 'void foo()\n{'
2019-12-21 18:18:49 +01:00
ChillerDragon 928e5407eb Style 'void foo() {' -> 'void foo()\n{' 2019-12-21 14:35:09 +01:00
Dennis Felsing 3e08d473ab
Merge pull request #2011 from heinrich5991/pr_ddnet_fix_comment
Fix outdated comment
2019-12-21 08:00:38 +01:00
heinrich5991 e70fb8e43d Fix outdated comment 2019-12-20 22:51:10 +01:00
jupeyy 8a8674b545 fix min mouse pos for follow factor 2019-12-19 00:26:54 +01:00
Learath 65ec25a8a1 Fix small bug with demos that don't include a map 2019-12-18 13:51:08 +01:00
Dennis Felsing 71857fdb80
Merge pull request #2007 from heinrich5991/pr_ddnet_rm_string_h
Remove `strcmp` from file score
2019-12-18 13:15:10 +01:00
heinrich5991 4aeeedbbea Remove strcmp from file score 2019-12-18 12:52:36 +01:00
def 354541a146 Add string.h include in file_score.cpp
src/game/server/score/file_score.cpp: In member function ‘CFileScore::CPlayerScore* CFileScore::SearchName(const char*, int*, bool)’:
src/game/server/score/file_score.cpp:169:9: error: ‘strcmp’ was not declared in this scope
  169 |    if (!strcmp(r.front().m_aName, pName))
      |         ^~~~~~
src/game/server/score/file_score.cpp:12:1: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
   11 | #include <engine/shared/console.h>
  +++ |+#include <cstring>
   12 |¬
2019-12-17 22:25:06 +01:00
def a7deac1b22 Update credits 2019-12-17 21:35:40 +01:00