Commit graph

2990 commits

Author SHA1 Message Date
Fireball 88c31a4711 Make menu background animations smoother
time_get_microseconds() count starts from 1970-01-01 and float's precision is not enough for every 1/60 of a second.

I'm replacing it with LocalTime() - it's also available in the menu and it's counted from the start of the game.

I've tested menu and in-game animations.
2020-10-03 20:07:14 +01:00
def 3a55ff86d6 Make types/countries fit ingame (fixes #2989) 2020-10-03 21:02:36 +02:00
def 1e900af5fa Disable +xxx binds when pressing ctrl+shift
Seems a bit more general than hardcoding ctrl+shift+d, ctrl+shift+g, ctrl+shift+e
2020-10-03 10:03:20 +02:00
def 830352fd70 Revert "Fix ctrl+shift+d moving tee (fixes #2930)"
This reverts commit 9b0081de57.
2020-10-03 09:57:20 +02:00
Jupeyy 54bbf69488 Fix laser prediction for non ddrace mods 2020-10-03 03:10:54 +02:00
bors[bot] b27b54a051
Merge #2893 #2972 #2974
2893: Determine binary dir independently of data dir (fixes #2891) r=heinrich5991 a=def-

@Learath2 Could you check if this can be extended to also find the DDNet-Server executable on Mac?

2972: Add explicit button for current map as BG r=heinrich5991 a=def-



2974: Fix autoformatting wrt. generated files r=def- a=heinrich5991

Fix #2962.

Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2020-10-02 17:43:04 +00:00
bors[bot] 839f0862fb
Merge #2968 #2969
2968: Create codeql-analysis.yaml r=heinrich5991 a=def-



2969: Print error when opening config file for writing fails r=heinrich5991 a=def-



Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:35:09 +00:00
bors[bot] 663d60fa9a
Merge #2941
2941: Fix ctrl+shift+d moving tee (fixes #2930) r=heinrich5991 a=def-

@plsplsplslol ok from your side?

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 17:21:39 +00:00
bors[bot] d2df9c6a66
Merge #2948 #2956 #2965
2948: Show File button in demo player r=heinrich5991 a=def-

to easily get the file instead of having to search for it in the file browser again. Complements #2946

2956: Add Background music volume slider r=heinrich5991 a=def-

as requested by hussainx3

2965: Clean up some data r=heinrich5991 a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:56:17 +00:00
bors[bot] 5dd1721e63
Merge #2958 #2961 #2963
2958: AntiPing limit is unintuitive, remove from settings r=heinrich5991 a=def-



2961: Fix hash in formatting-revs.txt r=heinrich5991 a=def-



2963: Handle PNG read errors (fixes #2959) r=heinrich5991 a=def-

and print a more telling error message

I'll check all our existing maps for failures now:
```
$ find . -iname '*.map' | while read i; do echo $i; map_extract $i > /dev/null; find . -iname '*.png' | while read j; do dilate $j; rm -- $j; done; done
```
For skins Soreu and the skin DB team is already taking care. (but I checked and the ones in Skin DB now can all be loaded without error)

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:31:13 +00:00
bors[bot] 4383b8a7e7
Merge #2942 #2943
2942: Update swedish translations (by cur.ie) r=heinrich5991 a=def-



2943: Need to send info when updating skin in text field r=heinrich5991 a=def-

As reported by abcqwerty on Discord

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:23:49 +00:00
bors[bot] 2a76cddb4e
Merge #2922
2922: Don't show wrong decisecs in game time in HUD r=heinrich5991 a=def-

I think .me' reported this to me 7 years ago and I've been noticing that they're wrong since then. Time to remove I guess, they don't seem useful anyway.

Co-authored-by: def <dennis@felsin9.de>
2020-10-02 16:16:55 +00:00
Dennis Felsing 317bf6bba4 Don't try to load %current% as a normal map 2020-10-02 16:23:16 +02:00
Dennis Felsing 2dc725e0f6 Rename CURRENT to CURRENT_MAP 2020-10-02 16:21:18 +02:00
Dennis Felsing 0f177bad46 Add explicit button for current map as BG 2020-10-02 16:20:19 +02:00
Dennis Felsing 6839e5f20d QUITING -> QUITTING 2020-10-02 16:06:21 +02:00
Dennis Felsing 2ba9535529 Use warnings popups for some io failures 2020-10-02 16:06:16 +02:00
bors[bot] 74550e2c45
Merge #2932
2932: Don't change SpectatorID when not spectating r=def- a=Fireball-Teeworlds

This prevents a confusing situation where /pause and /spec lead to spectating yourself: https://youtu.be/9MzvDoXtMLc (looks as if /pause is broken unless you notice that you are spectating yourself).

This could've happened when you pressed spectate_next button while playing and SpectatorID got changed to yourself. I think it doesn't make sense to allow changing SpectatorID when playing at all.

I've also tried to simplify the code: the number of `for` loops in the updated code goes down from 10 to 3.

Things tested with this change:
1. Cycling through players when spectating (works)
2. Changing SpectatorID when not spectating (no longer possible)
3. Spectating yourself (still possible with "spectate N" command but no longer happens accidentally because of 2)
4. "spectate_closest" command (works)
5. Replaying demos where player goes into spectators (works)


Co-authored-by: Fireball <fireball.teeworlds@gmail.com>
2020-10-02 07:55:30 +00:00
def 134400158a Clean up MapLayers 2020-09-30 23:59:50 +02:00
def 12f150393b Free assets 2020-09-30 23:59:38 +02:00
def 1560a88413 AntiPing limit is unintuitive, remove from settings 2020-09-30 10:17:17 +02:00
def ba258d7343 Add Background music volume slider
as requested by hussainx3
2020-09-30 10:06:55 +02:00
def 973a4caf4b Show days and hours in game time 2020-09-29 22:58:34 +02:00
def 1b1d8f7964 Don't show wrong decisecs in game time in HUD 2020-09-29 22:58:34 +02:00
def 9b0081de57 Fix ctrl+shift+d moving tee (fixes #2930) 2020-09-29 22:58:26 +02:00
def 10355851ca Need to send info when updating skin in text field
As reported by abcqwerty on Discord
2020-09-29 22:58:09 +02:00
def 8efff70d88 Show File button in demo player
to easily get the file instead of having to search for it in the file
browser again. Complements #2946
2020-09-29 22:57:55 +02:00
def b6e4626053 Add clear button to server address field
as suggested by Cøke
2020-09-29 22:41:41 +02:00
Dennis Felsing 1a7eed4937
Merge pull request #2951 from def-/pr-repeated
Reset m_TimesRepeated on new line
2020-09-29 19:02:34 +02:00
def 90211d18ef Reset m_TimesRepeated on new line
otherwise random lines will mistakenly show [2]
2020-09-29 17:01:57 +02:00
bors[bot] 7432f569e2
Merge #2946
2946: Add directory buttons r=def- a=Jupeyy

fixes #2944

windows:

![screenshot_2020-09-29_03-16-32](https://user-images.githubusercontent.com/6654924/94502023-78d03300-0203-11eb-8807-ba9d9dca801b.png)

skin:

![screenshot_2020-09-29_03-20-32](https://user-images.githubusercontent.com/6654924/94502035-85548b80-0203-11eb-8105-d1e52593f1e5.png)


but no chance for demo:
![screenshot_2020-09-29_03-23-13](https://user-images.githubusercontent.com/6654924/94502044-8b4a6c80-0203-11eb-8161-4897082a5a66.png)

naming suggestions are welcome
theme directory, themes directory
whatever

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-29 09:30:39 +00:00
Jupeyy 456625893b Add directory buttons 2020-09-29 10:24:40 +02:00
def e4023cb18b Dynamic Camera button: Use g_Config.m_ClDyncam as pID 2020-09-29 08:25:38 +02:00
Dennis Felsing 16f965a0e6
Merge pull request #2940 from def-/pr-empty-lines
Fix empty lines in chat (fixes #1835)
2020-09-29 07:51:12 +02:00
Dennis Felsing b88b33cea4
Merge pull request #2928 from Jupeyy/pr_multiple_pngs
Add changeable assets
2020-09-29 07:46:43 +02:00
def 18ad5b58c0 Fix empty lines in chat (fixes #1835) 2020-09-28 23:25:04 +02:00
Jupeyy 0e71a47708 Add customization 2020-09-28 23:21:32 +02:00
Fireball d06e956739 Don't change SpectatorID when not spectating, simplify code
This prevents a confusing situation where /pause and /spec lead to spectating yourself.
This happens if you accidentally pressed spectate_next key when playing.
2020-09-28 19:55:47 +01:00
plsplsplslol 236015c474 print out modifiers when unbinding 2020-09-27 17:38:50 -07:00
Edgar 12161cc55b
change and fix how counter is displayed 2020-09-27 13:28:50 +02:00
Edgar 1d8a20f17a join multiple identic chat lines 2020-09-27 00:39:16 +02:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
def 0bac9f0de8 Manual preparation for cleaner clang-format
Also include what you use explicitly
2020-09-26 21:41:01 +02:00
def f74cc43f4c Remove pure server filters, add space for Countries/Types
Not so relevant anymore
2020-09-26 21:33:25 +02:00
def dcfa752e61 After initialization: Agressively try to grab window again
Since some users on Windows report window not being initially focussed
2020-09-26 09:09:05 +02:00
bors[bot] c6ade7eeeb
Merge #2917
2917: Create ALLOW_X_SKINS game info flag r=heinrich5991 a=def-

To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.

Co-authored-by: def <dennis@felsin9.de>
2020-09-25 21:22:38 +00:00
def f2386d5c02 Address reviewer comments 2020-09-25 22:25:45 +02:00
Learath 32c3cba4fa Fix scoreboard alignment issues 2020-09-25 17:44:37 +03:00
bors[bot] 32c77faecc
Merge #2920
2920: stop disabling textinput during connecting r=def- a=TsFreddie

closes #2919 

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-25 05:51:32 +00:00
TsFreddie 712e9e90c0 stop disabling textinput during connecting 2020-09-25 01:08:48 +01:00
def 9ab8de5718 fix clang-format 2020-09-24 19:05:30 +02:00
def 00b66362c3 Allow zooming on city mod 2020-09-24 19:05:30 +02:00
def 9f9ccaccf7 Create ALLOW_X_SKINS game info flag
To allow server to set any x_ prefixed skin and client won't filter it
out. As requested by Pure_luck for his mod to show players as tanks,
walls, etc. Won't be enabled on DDNet-Servers, thus such skins can be
added where a server modification wants to fine-control what skins are
allowed and can enforce such skins.
2020-09-24 19:05:30 +02:00
def f7cf854c36 Make sure turning dyncam off in settings works
Even if players have cl_mouse_followfactor turned on

Alternative fix for #2761 since players keep reporting confusion about this
2020-09-24 18:27:31 +02:00
def ebb4e3debe Center update info text, add -DINFORM_UPDATE flag
to be used for Steam release, since autoupdates are enforced anyway and
players don't need to be reminded to update
2020-09-24 13:41:59 +02:00
bors[bot] ceefdacfbc
Merge #2894
2894: Add new renderer(as streamed vertices) for editor r=def- a=Jupeyy

Does not improve performance in editor!

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-24 08:06:42 +00:00
def d9719a3c15 Fix spacing in themes selection 2020-09-23 23:38:29 +02:00
Jupeyy 8235df7752 Add menu background map 2020-09-23 23:38:28 +02:00
bors[bot] d707b3883c
Merge #2909
2909: Set IME Window Position & Prevent Input from fighting with IME r=def- a=TsFreddie

Mainly solves the backspace problem where you were able to delete from chat and ime comps at the same time.
Also set the position of composition window

Need some testing from other languages' users.
Need https://github.com/ddnet/ddnet-libs/pull/14 to work on windows

Co-authored-by: TsFreddie <tsfreddiewang@gmail.com>
2020-09-23 21:23:02 +00:00
Jupeyy 84cad658d6 Add new renderer(as streamed vertices) for editor 2020-09-23 16:45:32 +02:00
bors[bot] 1b26312e3c
Merge #2902
2902: Don't rely on snapshot for ddnet gametype r=heinrich5991 a=Jupeyy

@fokkonaut you need to test again if you mod works.
This time i also did the test for masked entites(but not for non masked ones).

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-23 14:15:01 +00:00
Jupeyy eb7c84cd7f Add hover for demo list 2020-09-22 18:42:03 +02:00
TsFreddie d4da82f977 clang-format 2020-09-22 17:02:03 +01:00
TsFreddie 387bc53030 ime window position & ime input handling 2020-09-22 17:01:13 +01:00
Jupeyy 0ddc7fddb4 Don't rely on snapshot for ddnet gametype 2020-09-22 17:42:19 +02:00
bors[bot] fddb8b34c0
Merge #2898 #2901 #2908
2898: Inform players that they are in team already r=heinrich5991 a=def-



2901: Remove failed downloaded files immediately r=heinrich5991 a=def-

Especially skins were only deleted after they were requested again

2908: Don't log skin downloading progress r=heinrich5991 a=def-

since it's not really interesting for most players, as long as things work fine

Co-authored-by: def <dennis@felsin9.de>
2020-09-22 14:57:20 +00:00
def 56b152e962 Remove failed downloaded files immediately
Especially skins were only deleted after they were requested again
2020-09-22 16:51:40 +02:00
def 1505b64af0 Don't log skin downloading progress
since it's not really interesting for most players, as long as things work fine
2020-09-22 16:36:01 +02:00
bors[bot] 9e23623fa1
Merge #2874
2874: Add unmasked entities for all mods r=def- a=Jupeyy

Fixes switch tile for unmasked ddnet
And ddnet mods send that they are a race and ddrace mod appearently?
Not very intuitive that ddnet is a superset of them, bcs tiles changed.

Waiting for a review from @fokkonaut 

Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-21 20:46:51 +00:00
bors[bot] d61c97370f
Merge #2896
2896: Add edit box to write skin name, Add link to Skin Database r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-21 17:50:09 +00:00
def a273969bc1 Fix clang-format 2020-09-21 10:44:13 +02:00
def d17e0e4819 Add link to Skin Database 2020-09-21 10:39:42 +02:00
def f9e66f0b41 Add edit box to write skin name 2020-09-21 10:35:13 +02:00
def 3276f2925d Reload skin menu when skin count changed
fixes graphics bug when new skins are added, skins array is reallocated
and we accessed freed memory

Thanks to Jupeyy & Learath2 for also looking into this
2020-09-21 10:19:54 +02:00
def 5cc826d6f5 edit box: only highlight x when hovering it
not when hovering the text field itself

Thanks to Ryozuki for report
2020-09-20 11:52:17 +02:00
def a99b673042 Some browser improvements
- Increase size of Name and Clan in adding friend fields
- Smaller Search and Exclude fields
- No more duplicate Search - Search - Search text
- Smaller Connect and Refresh buttons
2020-09-20 11:47:04 +02:00
def dfa072353d Fix skin lookup
Thanks for Jupeyy for looking into this with me
2020-09-20 02:19:58 +02:00
def 61f89533c5 Clean up skin downloader code a bit
Was trying to find what's causing the issues with skin downloader, but
didn't find anything suspicious.
2020-09-20 02:19:49 +02:00
def 8ef6a0da16 Revert "Revert "Fix clang-format""
This reverts commit 833e3640b4.
2020-09-20 02:19:32 +02:00
def 1d868fec70 Revert "Revert "Fix skin prefix search crash""
This reverts commit 4ad0f61a00.
2020-09-20 02:19:28 +02:00
def a09be98df9 Revert "Revert "Implement on-demand skin downloader (fixes #1166)""
This reverts commit cc2f05b6df.
2020-09-20 02:19:24 +02:00
def cc2f05b6df Revert "Implement on-demand skin downloader (fixes #1166)"
This reverts commit 3cc1e47ec4.
2020-09-20 01:51:23 +02:00
def 4ad0f61a00 Revert "Fix skin prefix search crash"
This reverts commit 1270434f5e.
2020-09-20 01:49:58 +02:00
def 833e3640b4 Revert "Fix clang-format"
This reverts commit f42a5a0431.
2020-09-20 01:49:26 +02:00
bors[bot] ea1a7934e5
Merge #2878
2878: Max images (fixes #2148) r=def- a=Jupeyy



Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-19 20:50:04 +00:00
Jupeyy a1eb5dc114 Max images(for editor, clamp for client and warning for mapconvert) (fixes #2148) 2020-09-19 21:22:21 +02:00
Jupeyy 5208a588b8 Add unmasked entities for all mods 2020-09-19 14:44:24 +02:00
def c31fc33cf2 Fix MouseInside to only select one field (fixes #2868) 2020-09-19 11:50:33 +02:00
def 1cf68d7191 Fix localizing demo list
You can't store the result of Localize in a static, it will be removed
by switching to another language.

Thanks to Jupeyy for report
2020-09-18 23:33:51 +02:00
Dennis Felsing 4317cb7af8
Merge pull request #2855 from def-/pr-kill-server-on-quit
Kill server on quit
2020-09-18 08:04:44 +02:00
def 427450ddc3 Demo viewer: Ignore shortcuts when popup is open
As reported by Shyzo on Discord
2020-09-18 07:57:43 +02:00
Jupeyy 1270434f5e Fix skin prefix search crash 2020-09-18 06:27:18 +02:00
def 46b21020be Kill server on quit
As suggested by Ryozuki
2020-09-18 00:30:31 +02:00
def d5648f5cde Fix localizing in browser
Thanks to gerdoe for noticing
2020-09-17 21:54:24 +02:00
def 9da149f84b Localize control settings 2020-09-17 21:18:33 +02:00
def da4a8c704b Fix running server from other directory 2020-09-17 21:06:02 +02:00
bors[bot] 93e592dcd9
Merge #2813
2813: Sort spectator view by team, then name (not score) (fixes #2808) r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
2020-09-17 16:07:28 +00:00
bors[bot] da62510a2d
Merge #2840
2840: [Idea] Add some decent hover effects and colors r=def- a=Jupeyy

Generally, would be nice to have very decent hover effects and decent colors.

I just tried for fun adding hover effects to menu tabs(red for the quit button),

hover effects for the server browser items

and color for search/exclude

I'm not an artist, it doesnt look good, if someone wants to overtake, he/she would be very welcome todo so

![image](https://user-images.githubusercontent.com/6654924/93282252-44ee1a00-f7ce-11ea-8b16-5d563610c9ce.png)

![image](https://user-images.githubusercontent.com/6654924/93282271-50d9dc00-f7ce-11ea-89cf-8f1e38b4a6b7.png)

![screenshot_2020-09-16_03-38-40](https://user-images.githubusercontent.com/6654924/93282288-57685380-f7ce-11ea-8cbe-3f04f8d89bc4.png)


Co-authored-by: Jupeyy <jupjopjap@gmail.com>
2020-09-17 14:19:22 +00:00
bors[bot] 21e080596a
Merge #2836 #2841 #2845
2836: Only make Esc key leave editor when no popup is open r=Jupeyy a=def-



2841: Fix ingame browser tab change (fixes #2839) r=Jupeyy a=def-



2845: Fix spacing in kick-vote menu (center tees and text) r=Learath2 a=def-

Old: ![screenshot-20200917@090205](https://user-images.githubusercontent.com/2335377/93431529-882ab480-f8c4-11ea-8e56-dfe903a5ae06.png)
New: ![screenshot-20200917@090226](https://user-images.githubusercontent.com/2335377/93431538-8cef6880-f8c4-11ea-8946-449e7aa6dea7.png)


Co-authored-by: def <dennis@felsin9.de>
2020-09-17 14:00:09 +00:00
bors[bot] 77cb30aec4
Merge #2733
2733: Implement on-demand skin downloader, remove Lappi's non-free skins (fixes #1166, fixes #2547) r=Learath2 a=def-

Seems to work on first try, I'm somewhat surprised :D

Future ideas:

- I haven't checked how the performance impact is of a new skin joining,
  might want to move the loading to a separate thread?
- Use the skins from download directory instead of redownloading? Might
  want to compare modified time.
- Make all skins load on demand only to save some memory?

Co-authored-by: def <dennis@felsin9.de>
2020-09-17 13:49:23 +00:00