Commit graph

20407 commits

Author SHA1 Message Date
Jupeyy fe9c2d305f
Merge pull request #8784 from Robyt3/Android-Backbutton-Handling-Revert
Revert "Quit if Android back-button is pressed 3 times within 1 second"
2024-08-21 17:54:23 +00:00
Robert Müller 499ad48ee6 Revert "Quit if Android back-button is pressed 3 times within 1 second"
This reverts commit 91848f0be6.

This was prone to accidental usage. The user interface is now usable with touch input, so this additional method to quickly and cleanly quit the game is not necessary anymore.
2024-08-21 19:30:59 +02:00
Dennis Felsing 4dc7346b4f
Merge pull request #8783 from Robyt3/Menus-Skin-ColorPicker-Cleanup
Use HSLA scrollbar color picker for 0.7 tee settings, refactor HSLA scrollbar color picker rendering
2024-08-21 17:10:27 +00:00
Robert Müller 992f235f05 Use HSLA scrollbar color picker for 0.7 tee settings
Use the same HSLA scrollbar color picker for the 0.7 tee settings as for the 0.6 tee settings. Use the correct darkest lighting value for 0.7 skin color pickers instead of not clamping the lighting value in the color picker.
2024-08-21 18:05:51 +02:00
Robert Müller ce0e52851c Refactor CSkins7::GetColor function
Use existing color constructor to conditionally unpack the alpha component instead of doing this separately.

Make `DARKEST_COLOR_LGT` a `float` constant instead of using an `enum` to simplify the usage.
2024-08-21 17:57:56 +02:00
Robert Müller abf8fac568 Refactor HSLA scrollbar color picker rendering
Rename `CMenus::RenderHSLScrollbars` function to `RenderHslaScrollbars`.

Pass darkest light value as `float` to the `RenderHslaScrollbars` function to add support for different values, instead of enabling the clamping with a `bool` parameter. Previously, this parameter was always set to `true`, as this type of color picker is only used for skins.

Remove unnecessarily complicated code for rendering unclamped lighting scrollbar. The code can be simplified by considering the darkest lighting value as a variable.

Let the `RenderHslaScrollbars` function return `true` if the color was changed to simplify the usage. The function previously returned the color but this value was unused.

Use `IGraphics::SetColor4` function instead of `IGraphics::SetColorVertex` when possible. Rename variables `Array` to `aColorVertices`. Use `std::size` instead of hard-coding array sizes.
2024-08-21 17:57:56 +02:00
Robert Müller 01d2b3e3bc Highlight hovered and active color picker scrollbar handle
Add visual feedback to color picker scrollbar handle being hovered and active.
2024-08-21 17:57:56 +02:00
Dennis Felsing db9b5f5b61
Merge pull request #8782 from ChillerDragon/pr_fix_sixup_sounds
Fix sixup sounds
2024-08-21 15:07:33 +00:00
ChillerDragon dcd1fefa7e Never send sounds to sixup that are played on the client side
Closed #2523
2024-08-21 22:02:39 +08:00
ChillerDragon 00b9eab2ce Rename CHAT_SIX/SEVEN to more generic FLAG_SIX/SEVEN 2024-08-21 21:33:34 +08:00
Dennis Felsing 1ebfe269aa
Merge pull request #8780 from ChillerDragon/pr_ed_fix_prop_clamp
Fix editor properties not being clamped on + and - button click
2024-08-21 13:10:34 +00:00
ChillerDragon 99ae72c143 Fix editor properties not being clamped on + and - button click
Closed #8778
2024-08-21 19:48:10 +08:00
Dennis Felsing 54271aef2a
Merge pull request #8776 from Robyt3/Base-Semaphore-macOS-Unique-Name
Make macOS semaphore names more unique, improve assertion
2024-08-20 18:50:17 +00:00
Robert Müller 839c511af4 Make macOS semaphore names more unique, improve assertion
On macOS, semaphore names are global and processes can open semaphores of other processes by using their name. It was possible that multiple client/server processes randomly tried to create semaphores with the same memory address, which would cause them to have the same name. In that case, `sem_open` would fail because `O_EXCL` prevents creating semaphores if the name is already used.

This is made more unlikely by also including the PID in the semaphore name. Additionally, the semaphore name is prefixed with `/` to more closely follow the construction rules for semaphore names. In particular, the behavior is implementation-defined if the name is not prefixed with a slash.

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_open.html

Closes #8773.

More details are added to the assertion error message in case this does not end up fixing the issue.
2024-08-20 20:25:56 +02:00
Dennis Felsing 580b2690a0
Merge pull request #8774 from heinrich5991/pr_ddnet_no_ban_vpn
Don't show "you've been banned" for VPN bans
2024-08-20 15:32:59 +00:00
heinrich5991 87aa251d73 Don't show "you've been banned" for VPN bans
Players are supposed to turn of their VPN or complain to the admins if
they get banned for using a VPN. Calling this "banned" seems to be
confusing, as players ask for an unban even after they turned off the
VPN.
2024-08-20 16:51:37 +02:00
Dennis Felsing 238e7495d2
Merge pull request #8771 from SoulyVEVO/pr_07_fix_feet_offset
fix 0.7 feet offset
2024-08-20 07:22:17 +00:00
Robert Müller 30f49201e5
Merge pull request #8764 from ChillerDragon/pr_cfgcol_07_marking
Use color type for 0.7 marking configs
2024-08-20 05:53:33 +00:00
ChillerDragon ef2db30bef Make 0.7 skin color variables unsigned to get rid of the casts 2024-08-20 11:49:04 +08:00
ChillerDragon 15713d7859 Use color type for 0.7 marking configs 2024-08-20 11:23:26 +08:00
Dennis Felsing 1dd2f3a4af
Merge pull request #8772 from Robyt3/Client-Input-Clipboard-String
Use `std::string` for `IInput::GetClipboardText`
2024-08-19 17:25:43 +00:00
Robert Müller 40fbc2140b Use std::string for IInput::GetClipboardText
Simplify clipboard handling by returning an `std::string` and freeing the string returned by SDL immediately, so the clipboard data does not stay in memory unnecessarily after the clipboard has been used until the clipboard data is requested again.

Fix possible TOCTOU when pasting from the clipboard into a lineinput, due to the clipboard data being requested twice.
2024-08-19 19:03:49 +02:00
Souly 4fb3027bd7
fix 0.7 feet offset
fix 0.7 feet offset
2024-08-19 15:34:44 +02:00
Dennis Felsing 89cc2d46a8
Merge pull request #8766 from Matodor/pr_inputs_missing_zoom_scale
Fixed missing TargetX/TargetY zoom scale apply in CControls::SnapInput
2024-08-19 06:55:54 +00:00
Robert Müller 288f999e9d
Merge pull request #8769 from ChillerDragon/pr_delete_skins7_hotkey
Add delete hotkey for 0.7 skins
2024-08-19 05:12:48 +00:00
ChillerDragon 66e3f619c7 Add delete hotkey for 0.7 skins 2024-08-19 12:00:55 +08:00
Dennis Felsing 474dae5ead check 2024-08-18 23:55:08 +02:00
Matodor ddd13ba4fc fix: fixed missing TargetX/TargetY zoom scale apply in CControls::SnapInput 2024-08-19 00:52:36 +05:00
Dennis Felsing 8dd2b6e9e6
Merge pull request #8765 from Robyt3/Client-Menus7-Interactive-Tee-Fixes
Improve interactive tee in 0.7 tee settings
2024-08-18 10:33:27 +00:00
Robert Müller b9ab23405e
Merge pull request #8759 from Bamcane/client-sixup-fix
Fix client sixup translation context
2024-08-18 10:33:07 +00:00
Bamcane 5c2ab4cb92 Fix client sixup translation context
Co-authored-by: Robyt3 <robytemueller@gmail.com>
2024-08-18 18:14:27 +08:00
Robert Müller 2eff7ecb61 Improve interactive tee in 0.7 tee settings
- Fix value `0` being used for sound volume, so the tee sound was not audible.
- Use `DoButtonLogic` to trigger sound to ensure it does not play while other UI elements are active.
- Remove unnecessay `MousePosition` variable by using `MousePos` function instead.
2024-08-18 12:08:20 +02:00
Dennis Felsing 96e946d504
Merge pull request #8751 from ChillerDragon/pr_grass_main_07_vanilla
Restore grass_main_0.7.png vanilla compability
2024-08-18 08:18:31 +00:00
Dennis Felsing ddfd4dbfb1
Merge pull request #8763 from ChillerDragon/pr_remove_ddnet_hotui
Remove ddnet_hotui hook
2024-08-18 07:22:22 +00:00
Dennis Felsing 21807c15bd
Merge pull request #8744 from ChillerDragon/pr_color_speed
Color speed in hud based on increase or decrease
2024-08-18 07:19:11 +00:00
ChillerDragon 789fee99df Remove ddnet_hotui hook 2024-08-18 15:02:33 +08:00
Dennis Felsing f569981eb5
Merge pull request #8755 from ChillerDragon/pr_delete_07_skins
Implement 0.7 delete skin button
2024-08-18 06:44:10 +00:00
Dennis Felsing 1758bfc7f9
Merge pull request #8730 from ChillerDragon/pr_07_separate_dummy_skins
Support different skin states for dummy and main in 0.7 connections
2024-08-18 06:42:24 +00:00
Dennis Felsing e008f40a19
Merge pull request #8761 from ChillerDragon/pr_race7_nullptr
Fix race 0.7 check null pointer dereference
2024-08-18 06:36:45 +00:00
Dennis Felsing 830aff899a
Merge pull request #8760 from ChillerDragon/pr_ddnet_grass
Rename grass_main_0.7 to ddnet_grass
2024-08-18 06:35:19 +00:00
Dennis Felsing b05ffeae3b
Merge pull request #8762 from ChillerDragon/pr_fix_dummy7_marking_alpha
Fix 0.7 dummy marking alpha being reset
2024-08-18 06:34:56 +00:00
Dennis Felsing 9fe2203a24
Merge pull request #8754 from ChillerDragon/pr_fix_06_demo_cutting
Fix cutting 0.6 demos
2024-08-18 06:29:33 +00:00
ChillerDragon 99fe6b09ed Fix 0.7 dummy marking alpha being reset
Closed #8757
2024-08-18 11:06:40 +08:00
ChillerDragon fa1ee98f1e Fix race 0.7 check null pointer dereference
Found by @fokkonaut in https://github.com/ddnet/ddnet/pull/8707

Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
2024-08-18 10:57:56 +08:00
ChillerDragon 6121be1bf1 Rename grass_main_0.7 to ddnet_grass
ddnet did extend the tileset so it is no longer matching the 0.7 grass_main
renaming the file makes that clear and allows for further extensions of
the file without breaking teeworlds 0.7 compability.

Also it frees the filename grass_main_0.7.png to be used by the ddnet
0.7 client mode so it can display the correct mapres on 0.7 connections.
2024-08-18 10:32:33 +08:00
ChillerDragon 64c7ab677d Color speed in hud based on increase or decrease 2024-08-18 10:32:00 +08:00
ChillerDragon 8d7c99fb96 Implement 0.7 delete skin button
See #8750
2024-08-18 10:17:13 +08:00
ChillerDragon e8fbb440b9 Fix cutting 0.6 demos
Closed #8748
2024-08-18 10:05:58 +08:00
Dennis Felsing b16bc401a8
Merge pull request #8716 from ChillerDragon/pr_hide_url_for_06
Hide address url for 0.6 ips (Closed #8712)
2024-08-17 17:42:30 +00:00
ChillerDragon 31cc4c24bf Restore grass_main_0.7.png vanilla compability
Reset to the current teeworlds version. Removing the ddnet specific
extension from 2015.

929919d44b (diff-d3cf443ce462f6e0cf9543319e40497f2c93505528a40cb7d923781643094f99)

Closed #8747

```
$ wget https://raw.githubusercontent.com/teeworlds/teeworlds/a1911c8f7d8458fb4076ef8e7651e8ef5e91ab3e/datasrc/mapres/grass_main.png -O grass_main_0.7.png
$ dilate grass_main_0.7.png
```
2024-08-17 00:36:14 +08:00