Commit graph

20665 commits

Author SHA1 Message Date
heinrich5991 4f09d3f7d4
Merge pull request #8701 from Robyt3/Client-Spectate-ClientIds
Improve `cl_show_ids`: support spectator menu, optimize, refactor
2024-08-13 09:50:12 +00:00
Dennis Felsing 192ae58a2e
Merge pull request #8717 from heinrich5991/pr_ddnet_birthday
Distinguish birthday from finish events
2024-08-13 09:43:11 +00:00
heinrich5991 585a36dd9d Distinguish birthday from finish events
This allows us to give birthdays a different effect in the future if we
want to.
2024-08-13 11:02:25 +02:00
heinrich5991 c0ec918721 Remove comments that just describe the next line 2024-08-13 11:01:06 +02:00
Dennis Felsing ef6fd80bc5
Merge pull request #8715 from furo321/birthday-confetti
Spawn a confetti when connecting on your DDNet birthday
2024-08-13 08:22:59 +00:00
Dennis Felsing a8219530b1
Merge pull request #8714 from def-/pr-spec-auth
server: Disallow moving authed players to spec
2024-08-12 21:39:53 +00:00
heinrich5991 86f7b6c2fe
Merge pull request #8713 from def-/pr-dnsbl
server: Handle dnsbl and other non-critical stuff only on new ticks
2024-08-12 21:18:49 +00:00
furo 1563b4a56a Spawn a confetti when connecting on your DDNet birthday 2024-08-12 23:14:07 +02:00
Robert Müller 594968fe07 Improve cl_show_ids: support spectator menu, optimize, refactor
Also show client IDs in the spectator menu when `cl_show_ids` is enabled. Previously, this setting applied to scoreboard and chat, although the setting and config variable descriptions were only mentioning the scoreboard.

Extract client ID formatting in `CGameClient::FormatClientId` function to reduce duplicate code and ensure it is consistent.

Correctly indent client IDs also when largest client ID is 100 or larger. Fix scoreboard spectator client ID buffer not being large enough for IDs 100 and larger.

Make client ID formatting more efficient by avoiding `str_format` except for formatting the number itself and appending text directly to the text cursor when possible.
2024-08-12 22:59:32 +02:00
Dennis Felsing 608fba82e0 server: Disallow moving authed players to spec 2024-08-12 19:33:50 +02:00
Dennis Felsing 043480b06e server: Handle dnsbl and other non-critical stuff only on new ticks
Less risk of causing microlags then, I think once per second is often enough since it has to iterate through all players
2024-08-12 18:49:17 +02:00
heinrich5991 26cccb7f51
Merge pull request #8711 from def-/pr-show-kill
Show game menu buttons again, even in 5:4, when not on a red/blue-team server
2024-08-12 12:56:31 +00:00
Dennis Felsing 96881defdf Show game menu buttons again, even in 5:4 2024-08-12 14:35:49 +02:00
Dennis Felsing bd92dbddf2
Merge pull request #8706 from Robyt3/Client-Skins7-Loading-Refactoring
Various refactoring of 0.7 skin loading
2024-08-11 22:12:35 +00:00
Dennis Felsing 960d2853bc
Merge pull request #8708 from ChillerDragon/pr_07_modern_is_ddnet_msg
Send the new is ddnet message in 0.7 connections
2024-08-11 22:12:00 +00:00
Dennis Felsing c5ab4def3d
Merge pull request #8709 from Robyt3/Network-Socket-Init-Cleanup-Fix
Fix UDP socket creation/cleanup if opening IPv6 socket fails
2024-08-11 22:11:42 +00:00
Robert Müller 570c2c857a Fix UDP socket creation/cleanup if opening IPv6 socket fails
Previously, the `net_udp_create` function returned whether the IPv6 socket in particular was created successfully. If an IPv4 socket or Websocket was created successfully before this, it was not used and also not closed properly, if the IPv6 socket could not be created.

Now, the `net_udp_create` function succeeds if the socket for at least one network type (IPv4, IPv6 or Websocket) could be created successfully.

Avoid reusing local variables and remove redundant comments. Also apply the same refactoring to `net_tcp_create`, which already has the behavior of succeeding if the socket for any network type (IPv4 or IPv6) was created successfully.
2024-08-11 17:09:09 +02:00
ChillerDragon 21507b51f1 Send the new is ddnet message in 0.7 connections
We already sent the legacy is ddnet message and so far the ddnet
protocol over 0.7 seems to work fine.

But for completeness and correctness it is now also sending the new
ddnet version net message.
2024-08-11 09:25:18 +08:00
Robert Müller 38b60b1d51 Various refactoring of 0.7 skin loading
- Only log successful log messages when `debug` is enabled, consistent with logging for regular skins.
- Use `IsImageFormatRgba` to check for RGBA image format, so this also shows a warning popup.
- Remove redundant logic for non-RGBA image data.
- Use `CheckImageDivisibility` instead of enforcing exact size of xmas hat and bot decoration images to allow higher resolution images.
- Fix image data not being freed if it has the wrong format or ratio.
- Fix potential integer overflow when calculating skin part blood color (same as for regular skins).
- Extract `LoadXmasHat` and `LoadBotDecoration` functions for readability.
2024-08-10 17:55:11 +02:00
Dennis Felsing afd1bd9cde
Merge pull request #5949 from ChillerDragon/pr_07_client
Add 0.7 client support
2024-08-10 13:08:32 +00:00
ChillerDragon e0bc98e79a Add alpha support for 0.7 skins 2024-08-10 14:50:43 +02:00
ChillerDragon 53b01862d4 Remove netversion from demo editor init 2024-08-10 14:50:43 +02:00
ChillerDragon 399075c339 Display 0.7 skins in chat 2024-08-10 14:50:43 +02:00
ChillerDragon 8903f49716 Render skins in 0.7 demos 2024-08-10 14:50:43 +02:00
ChillerDragon be67622544 Resend 0.7 skin change if it got filtered by the server 2024-08-10 14:50:43 +02:00
ChillerDragon 093a78464a Add custom ddnet 0.7 skin greensward
https://github.com/teeworlds/teeworlds/pull/2152
2024-08-10 14:50:43 +02:00
Alexander Akulich fe99a346dd Improve 0.7 skins
skins7: Extract the skins dir to a macro
skins7: Look for the skins at 'skins7' dir
Data: Add 0.7 skins (diliated)
CMenus::RenderSkinSelection7: Fix the skins number (use 0.7 getter)
CSkins7::GetColorV3: Fix missing UnclampLighting
CRenderTools: Use stronger type for 0.7 colors
CSkins7::RandomizeSkin: Use enum value instead of hardcode+comment
CMenus::RenderSettingsTee7: Enable team skins validation
system: Add str_utf8_copy_num()
GameClient: Extract ApplySkin7InfoFromGameMsg()
GameClient: Add skin7 to CClientData (also process and validate it)
2024-08-10 14:50:43 +02:00
ChillerDragon bae37ab7df Add 0.7 client support
While keeping 0.6 fully working and untouched
This adds the option to connect via 0.7

0.7 servers are now mixed into the server browser list.
And users can also manually connect via 0.7
using a connection url like so:

    ./DDNet "connect tw-0.7+udp://127.0.0.1:8303"

This also adds a "Tee 0.7" section in the menu to pick a 0.7 skin.
The config variables are prefixed with player7_ like for example
player7_color_body
2024-08-10 14:50:42 +02:00
Dennis Felsing 3a84cfeb8b
Merge pull request #8705 from Robyt3/Clang-Tidy-Static-Name-Fixes
Remove clang-tidy `static` variable name exceptions
2024-08-10 11:47:02 +00:00
Robert Müller 2fa4c1f603 Remove clang-tidy static variable name exceptions
- Remove `readability-identifier-naming.StaticVariableIgnoredRegexp`.
- Mark `static` variables as `const` and use `UPPER_CASE` for names when possible.
- Use local variables instead of `static` variables when possible.
- Use member variables with correct name instead of `static` variables.
- Pass output buffer for `static` function `GetKeyBindModifiersName` by argument instead of returning pointer to `static` buffer.
2024-08-10 13:27:55 +02:00
Dennis Felsing 44666c21f7
Merge pull request #8704 from Robyt3/Client-Connect-Resolve-Error
Show warning when connect address cannot be resolved
2024-08-09 21:49:12 +00:00
Robert Müller 323ccf5a22 Show warning when connect address cannot be resolved
Show warning and disconnect instead of falling back to connecting to `localhost` when the connect address cannot be resolved.
2024-08-09 20:22:00 +02:00
Dennis Felsing 00586a0c4a Revert "Faster /rank, fixes test result"
This reverts commit c2a3444f87.
2024-08-08 18:59:20 +02:00
Dennis Felsing e3dd2895dd Revert "Fix /rank"
This reverts commit 49bef9c453.
2024-08-08 18:59:20 +02:00
Dennis Felsing 7added6eef
Merge pull request #8700 from Robyt3/Binds-Repeat-Fix
Fix binds not being repeated when key held down
2024-08-08 16:37:18 +00:00
Robert Müller 645a00551b Fix binds not being repeated when key held down
Closes #8699. Regression from #8685.
2024-08-08 18:14:59 +02:00
Dennis Felsing 49bef9c453 Fix /rank
minTime being NULL means no rank
2024-08-08 17:13:47 +02:00
Dennis Felsing 647abbd801
Merge pull request #8693 from def-/pr-optimize-query
Faster /rank, fixes test result
2024-08-08 14:39:13 +00:00
Dennis Felsing 9be9a902e7
Merge pull request #8697 from heinrich5991/pr_ddnet_to_ipv4_mapped
Use `Ipv6::to_ipv4_mapped` in mastersrv
2024-08-07 22:19:45 +00:00
heinrich5991 83a90c9a06
Merge pull request #8676 from Robyt3/Client-LineInput-Event-Handling-Consistency
Consistently return `true` from `OnInput` function for used events
2024-08-07 22:07:49 +00:00
heinrich5991 dd1fb2026d
Merge pull request #8696 from Robyt3/UI-DoubleClick-LeftMouse-Only
Only activate double-clicks with left mouse button again
2024-08-07 22:07:10 +00:00
heinrich5991 d42ae75a9e Use Ipv6::to_ipv4_mapped in mastersrv
Needs Rust 1.63.0, should be old enough at this point.
2024-08-08 00:00:41 +02:00
Robert Müller 2c7c391ff0 Only activate double-clicks with left mouse button again
Double-clicks could also be activated with other mouse buttons on some UI elements, which was unintentionally added by #8489.
2024-08-07 20:59:45 +02:00
Dennis Felsing c2a3444f87 Faster /rank, fixes test result 2024-08-07 18:10:36 +02:00
heinrich5991 e97b8e1818
Merge pull request #8690 from def-/pr-dnsbl-info
More dnsbl printing
2024-08-06 16:53:17 +00:00
Dennis Felsing 922e32be0c More dnsbl printing 2024-08-06 17:21:24 +02:00
heinrich5991 7dc682565b
Merge pull request #8650 from def-/pr-ban-time
Don't show ban time for vpn bans
2024-08-05 21:08:44 +00:00
Dennis Felsing 082580f586 Don't show ban time for vpn bans 2024-08-05 20:27:16 +02:00
heinrich5991 75ec6ed304
Merge pull request #8652 from def-/pr-vpn-ban-1min
Only ban VPNs for a minute
2024-08-05 16:19:50 +00:00
Dennis Felsing b50d8eb79e
Merge pull request #8686 from StormAxs/master
Fix practice finish time
2024-08-05 10:23:07 +00:00