Commit graph

15437 commits

Author SHA1 Message Date
Tater 80e2de13da Add client side freeze stars 2024-09-12 04:48:46 -05:00
Robert Müller d3f0c2a156 Extract CUi::DoEditBox_Search function for quick search
Reduce duplicate and inconsistent code for rendering quick search for the demo browser, ingame vote list, player flag, skin, skin 0.7 and asset search.

The quick search and exclude in the server browser are not refactored, as they have additional labels and different alignment, which would make a general function complicated.
2024-09-11 21:33:08 +02:00
Jupeyy d5e81ca78d
Merge pull request #8932 from Robyt3/Client-Network-Before-Graphics
Initialize client networking before graphics
2024-09-11 18:07:20 +00:00
Robert Müller 128ffd2313 Initialize client networking before graphics
Avoid Vulkan crash if the backend is destroyed immediately after being created.

Slightly decreases time of initial black screen before loading menu is rendered.
2024-09-11 19:34:31 +02:00
Tim Schumacher 0ad1c08c22 Fixes a bug where econ was exposed publicly when ec_bindaddr was set to localhost
Also implements the original intention of 85f5e9c that is to disable
econ if ec_binaddr is invalid.
2024-09-11 18:28:07 +02:00
Robert Müller 32e9240634 Fix editor crash when saving maps with RGB mapres
Convert mapres to RGBA immediately when loading them, so the image data is always in RGBA format internally, instead of only converting when the map is saved (which was erroneously removed in #8670).

This means the `cl_editor_dilate` setting will now also be applied to converted RGB images.
2024-09-10 21:22:56 +02:00
Robert Müller 58ce5985d4 Use operator != instead of mem_comp for colors 2024-09-09 17:17:17 +02:00
Dennis Felsing 337d5c7ab3
Merge pull request #8915 from Robyt3/Base-Detect-ARM-Redefinition-Fix
Fix redefinition of `CONF_ARCH_STRING` for ARM architectures
2024-09-07 21:03:40 +00:00
Robert Müller 8e45d0a71a Fix redefinition of CONF_ARCH_STRING for ARM architectures
The macro `__ARM_ARCH` is defined both for 32-bit and 64-bit ARM so it cannot be used to identify ARM64. Now `__ARM_ARCH_ISA_A64` is used instead, which should only be defined for ARM64. This caused a warning due to the macro `CONF_ARCH_STRING` being redefined when compiling for Android. Furthermore, support for detecting big-endian ARM64 with the `__ARM_BIG_ENDIAN` macro is added.

See https://developer.arm.com/documentation/dui0774/g/chr1383660321827
2024-09-07 21:16:09 +02:00
Robert Müller a865354320
Merge pull request #8914 from Jupeyy/pr_cpy_into_fake_buffer
Add another row to do the copying for presented images in when pitch is bigger than width
2024-09-07 18:56:16 +00:00
Jupeyy 3595b70170
Add another row to do the copying for presented images in when pitch is bigger than width 2024-09-07 18:31:06 +02:00
Jupeyy 11fd82077a
Merge pull request #8913 from Robyt3/Video-Stop-ASAN-Fix
Fix heap-use-after-free in `CVideo::Stop`
2024-09-07 16:17:29 +00:00
Robert Müller 9e0ba8a91f Fix heap-use-after-free in CVideo::Stop
The `delete ms_pCurrentVideo` deletes the current video instance (`this`) so the subsequent write to `m_Stopped` was invalid.

Closes #8899.
2024-09-07 16:57:27 +02:00
Robert Müller c89509bc4b Add icon button to open console in bottom right of start menu
Add a button with the "terminal" icon in the bottom right of the start menu to open the local console to ensure that the local console is usable also when no physical keyboard (with F-keys) is available.
2024-09-07 13:12:30 +02:00
Dennis Felsing fc058fa432
Merge pull request #8906 from Robyt3/Client-Download-Gameserver-Fix
Fix map download fallback from game server
2024-09-06 22:11:02 +00:00
Dennis Felsing 3b22a3e02f
Merge pull request #8905 from furo321/hot-reload-super-crash
Fix crash with `hot_reload` while in `super`
2024-09-06 22:08:14 +00:00
Robert Müller ed1ef4e694 Fix map download fallback from game server
Do not reset the active map download's information before using the fallback map download.

Remove redundant calls of `ResetMapDownload` before disconnecting, as this already resets the map download.

Closes #8885. Regression from #8848.
2024-09-06 20:55:02 +02:00
furo 9103332e36 Fix crash with hot_reload while in super 2024-09-06 20:12:07 +02:00
Dennis Felsing 0948a53648
Merge pull request #8904 from furo321/fix-force-yes
Fix `random_unfinished_map` not working with `vote yes`
2024-09-06 17:34:21 +00:00
furo bbd34c9452 Fix random_unfinished_map not working with vote yes 2024-09-06 18:56:58 +02:00
KebsCS eb9e73f68b
Add /lasttp to hot reload 2024-09-06 16:31:46 +02:00
Dennis Felsing e0a95d14a6
Merge pull request #8898 from KebsCS/pr-country-filters
Change country and types filter behavior
2024-09-05 13:16:21 +00:00
KebsCS fa28ed77a6
Change country and types filter behavior 2024-09-05 14:24:11 +02:00
KebsCS 796fa4275f
Fix tpxy arg validation 2024-09-05 11:04:03 +02:00
dobrykafe c9e7e0f01b add ed_auto_map_reload setting 2024-09-05 00:23:03 +02:00
Dennis Felsing cf107a81a1
Merge pull request #8892 from ChillerDragon/pr_scoreboard_pause_game
Do not force scoreboard open when the game is paused
2024-09-04 07:15:29 +00:00
ChillerDragon 74bb327799 Do not force scoreboard open when the game is paused
If the game is paused and a player joins a server (sv_tournament_mode 0)
The scoreboard will be forced open. Unless the client configured cl_scoreboard_on_death 0.

This can be quite annoying. Especially in the brand new 0.7 feature
where users can pause the game. Oy realized that this is a problem 12
year ago:

aec468a3c4 (diff-e0ff7a1d6079610adb64fc89fbfff23a381ed92f268d8fe188731a9e0c323b0aR389-R390)

For ddnet servers this would mostly affect tournaments where paused games are
used to give everyone enough time to download the map.

A open scoreboard also blocks broadcasts. So new users might miss the
admin announcements explaining why the game is paused.
2024-09-04 10:21:16 +08:00
dobrykafe 22d699fbc0 use player name function instead of config 2024-09-04 02:37:16 +02:00
dobrykafe 5f57ba9130 add missing parentheses in updater code 2024-09-03 12:44:02 +02:00
Dennis Felsing 69fa7ea18f
Merge pull request #8886 from furo321/use-str_copy
Use `str_copy` instead of `str_format` where possible
2024-09-03 07:08:54 +00:00
furo 0664f12265 assert if str_format is used with no arguments 2024-09-03 08:49:55 +02:00
furo 8b5da71e89 Use str_copy instead of str_format where possible 2024-09-03 08:49:47 +02:00
ChillerDragon d0eebee44d Add quick actions for zooming the view 2024-09-03 09:58:36 +08:00
Ewan Green 7abad2b8a4 make reconnect screen count down from 5-1 instead of 4-0 2024-09-02 13:23:34 -06:00
Dennis Felsing f599449f31
Merge pull request #8879 from furo321/conchain_browser
Add console chain for browser filters
2024-09-02 15:24:40 +00:00
Dennis Felsing 226d948acc Version 18.5 2024-09-02 17:02:21 +02:00
furo 58f14edb95 Add console chain for browser filters 2024-09-02 16:45:04 +02:00
Dennis Felsing a3fc627285
Merge pull request #8874 from ChillerDragon/pr_test_tooltip_style
Test tooltip description style
2024-09-02 06:17:10 +00:00
Dennis Felsing f79784bec7
Merge pull request #8873 from ChillerDragon/pr_actions_settings_and_history
Add quick actions Server settings and History
2024-09-02 06:16:31 +00:00
Dennis Felsing ccaddd2016
Merge pull request #8872 from ChillerDragon/pr_action_pipettte
Add quick action "Pipette"
2024-09-02 06:16:29 +00:00
ChillerDragon e9187cc352 Grow prompt label if there is space and fix margins
Closed #8867
2024-09-02 11:16:20 +08:00
ChillerDragon 2cf6622cd7 Test tooltip description style
See https://github.com/ddnet/ddnet/issues/8870
2024-09-02 10:32:55 +08:00
ChillerDragon 19a888734c Add quick actions Server settings and History 2024-09-02 09:23:21 +08:00
ChillerDragon 44fc871463 Add quick action "Pipette" 2024-09-02 09:13:03 +08:00
BlaiZephyr a017190753 fix inconsistent quickaction labels 2024-09-01 20:09:06 +02:00
ChillerDragon 2a26c1c5d6 Put dead players at the bottom of the scoreboard
Closed #8868
2024-09-01 19:17:03 +08:00
Dennis Felsing d9b031c887
Merge pull request #8864 from ChillerDragon/pr_gt_descs
Use same descriptions for game tile actions as the button
2024-09-01 09:21:09 +00:00
ChillerDragon 8b304cab23 Add quick action "Toggle Grid" 2024-09-01 16:23:04 +08:00
ChillerDragon 1b8e402a65 Use same descriptions for game tile actions as the button 2024-09-01 16:15:11 +08:00
Dennis Felsing 30acedaac5
Merge pull request #8820 from TsFreddie/resample
Resample to the device playback rate
2024-09-01 07:35:38 +00:00
Dennis Felsing bb3c76a290
Merge pull request #8834 from KebsCS/pr-command-argument-validation
Add validation for chat and console command arguments
2024-09-01 07:35:36 +00:00
Dennis Felsing d4f72803be
Merge pull request #8860 from ChillerDragon/pr_action_gametiles
Add quick actions for game tiles
2024-09-01 07:33:46 +00:00
Dennis Felsing f2d5b83f84
Merge pull request #8863 from ChillerDragon/pr_sixup_enum
Use enum instead of magic number in skin color translation
2024-09-01 07:11:17 +00:00
Dennis Felsing fcf810cae1
Merge pull request #8862 from ChillerDragon/pr_consistent_nolint_fireweapon
Consistently apply the NOLINT comment for all sounds in FireWeapon
2024-09-01 07:11:03 +00:00
Dennis Felsing 50b0af1614
Merge pull request #8858 from ChillerDragon/pr_action_info
Add quick actions for Show Info Off/Dec/Hex
2024-09-01 07:05:57 +00:00
Dennis Felsing b5c11bc860
Merge pull request #8857 from ChillerDragon/pr_action_load_current_map
Add quick action "Load Current Map"
2024-09-01 07:05:55 +00:00
ChillerDragon 82ca4bc335 Use enum instead of magic number in skin color translation 2024-09-01 12:44:00 +08:00
ChillerDragon 5986ee03b9 Consistently apply the NOLINT comment for all sounds in FireWeapon
Most but not all sound creations in CCharacter::FireWeapon have this NOLINT comment.

Somehow clang does not get tripped on all of those. But sooner or later it might.
I currently got a new error in my downstream fork when tweaking
FireWeapon a bit. So I applied the NOLINT comment to ALL occurences in
FireWeapon not only the ones that clangd finds at the moment.
2024-09-01 11:39:17 +08:00
ChillerDragon e1cb617c42 Add quick actions for game tiles 2024-09-01 10:50:44 +08:00
ChillerDragon daad41fbd7 Fix editor prompt suggesting disabled last action
The editor prompt always has as a first entry the last action that ran.
But this entry should not show up if that action is currently disabled.
2024-09-01 10:42:55 +08:00
ChillerDragon ed49fef917 Add quick actions for Show Info Off/Dec/Hex 2024-09-01 08:53:04 +08:00
ChillerDragon e20250cd65 Add quick action "Load Current Map" 2024-09-01 08:15:58 +08:00
Dennis Felsing 36f0bcc509
Merge pull request #8618 from ChillerDragon/pr_editor_prompt
Add ctrl+p editor prompt (quick actions)
2024-08-31 21:42:48 +00:00
Dennis Felsing 8ca93d451b
Merge pull request #8855 from ChillerDragon/pr_armor_progress
Only do armor progress hack in ddrace controller
2024-08-31 21:35:48 +00:00
ChillerDragon 2c77aeef2b Add quick action to pick image for selected layer 2024-08-31 21:57:32 +08:00
ChillerDragon f053a29463 Add ctrl+p editor prompt (quick actions) 2024-08-31 21:57:31 +08:00
ChillerDragon f8a4e7dbab Call TakeDamage on projectile and laser hit (gun, shotgun and laser)
The grenade and hammer already triggered TakeDamage
now all weapons hitting a tee call the method again
2024-08-31 19:59:05 +08:00
ChillerDragon f44def1cdd Only do armor progress hack in ddrace controller
Only mess with the characters armor in ddrace controllers.
This allows other game modes to use the armor as actual armor.
2024-08-31 18:57:42 +08:00
Dennis Felsing a83248b9ec
Merge pull request #8851 from ChillerDragon/pr_chr_get_tuning
Simplify character tuning code
2024-08-31 08:24:42 +00:00
Robert Müller f0449befa5
Merge pull request #8841 from ChillerDragon/pr_unhardcode_07_gameflags
Share gameflags for 0.6/0.7 instead of hardcoding it
2024-08-31 07:38:22 +00:00
ChillerDragon c02a2ed1d6 Simplify character tuning code
entities/character.cpp now has the same api as prediction/entities/character.cpp
2024-08-31 10:41:39 +08:00
KebsCS d452bcda8f
Add validation for chat and console command arguments 2024-08-31 02:15:33 +02:00
Robert Müller 05970178b2 Fix map downloading overriding more recent map change messages
Following sequence of events was possible:

1. HTTP map download for map X is started (e.g. client initially connects to server).
2. Map change message for map Y arrives while downloading (e.g. vote for another map has passed on the server).
3. Client already has map Y and loads it directly without starting or resetting the map download.
4. HTTP map download task for map X finishes.
5. Map X is loaded, overriding the map Y that should be loaded. This is one cause for #2804.

This could potentially also happen with the map download from the game-server, if the final map data chunk for a downloaded map is received directly after another map change message for a map which does not need to be downloaded, though this seems more unlikely.

This is fixed by resetting the current map download immediately after receiving a valid map change message instead of only when starting a new map download.

The relevant code to reset the map download is moved to `CClient::ResetMapDownload` to avoid duplicate code and ensure that the temporary map download file is always deleted and closed.
2024-08-30 17:54:38 +02:00
DynamoFox fe35322bb0 Workaround GLEW error code when calling glewInit() on Wayland
* Fixes OpenGL on Wayland when the GLX flavor of GLEW is linked
* Only if SDL2's video driver is "wayland" we also allow the
  GLEW_ERROR_NO_GLX_DISPLAY error code to be accepted as if glewInit()
  actually succeeded
* Hopefully this won't be needed anymore on future versions of GLEW when
  glewContextInit() is made part of the public API
2024-08-29 19:47:43 +02:00
Dennis Felsing 41cd82c2d3
Merge pull request #8653 from DynamoFox/force-sdl2-video-driver-selection-on-linux
Fix game launch on Wayland-only systems with SDL2.30+
2024-08-29 16:06:03 +00:00
Robert Müller edcc3245f4
Merge pull request #8821 from def-/pr-transl-18.5
Update translations for 18.5, remove 0.7-only translations
2024-08-29 08:11:18 +00:00
Dennis Felsing 88739c5345 Update translations for 18.5, remove 0.7-only translations
Fix some minor stuff
2024-08-29 09:53:28 +02:00
ChillerDragon 43dee5d4c5 Share gameflags for 0.6/0.7 instead of hardcoding it
5cf0e5e997/datasrc/network.py (L8)
5cf0e5e997/datasrc/seven/network.py (L10)

0.6 game flags:

```python
GameFlags = ["TEAMS", "FLAGS"]
```

0.7 game flags:

```python
GameFlags = Flags("GAMEFLAG", ["TEAMS", "FLAGS", "SURVIVAL", "RACE"])
```

The 0.7 protocol extended the game flags without changing the old 0.6 flags.
So flag teams and flag flags are the same in both versions and 0.7 just
has additional flags.

The server is now sending the same m_GameFlags from the gamemode
controller to 0.6 and 0.7 connections. It clamps away the unsupported
flags for 0.6.

Before this commit the ddnet server would always send the hardcodet race
flag to 0.7 connections while ignoring what the gamemode set as a game
flag.
2024-08-29 15:15:48 +08:00
Dennis Felsing 5cf0e5e997
Merge pull request #8839 from dobrykafe/pr-create-07-skin-folder
Create 0.7 skin folder
2024-08-28 23:00:58 +00:00
dobrykafe 218ce1f53f create 0.7 skin folder 2024-08-29 00:36:06 +02:00
dobrykafe 41fee0bb3f add 0.7 skins directory button 2024-08-28 23:57:12 +02:00
TsFreddie ecec1ff2a7 Resample to the device playback rate 2024-08-28 10:55:35 +08:00
Dennis Felsing 5a66dc05f4
Merge pull request #8828 from dobrykafe/pr-save-07-skins
Implement 0.7 skin save button
2024-08-27 21:50:23 +00:00
Dennis Felsing 7df1b24491
Merge pull request #8833 from furo321/vote-creator
Set `m_VoteCreator` when possible
2024-08-27 21:20:41 +00:00
dobrykafe 31ee6abe82 implement 0.7 skin save button 2024-08-27 23:18:43 +02:00
Dennis Felsing 3d6820ab68
Merge pull request #8831 from furo321/fix-crash-hotreload
Fix `double free or corruption` crash with `hot_reload`
2024-08-27 21:16:58 +00:00
Dennis Felsing 8b7e5dee4d
Merge pull request #8830 from dobrykafe/pr-conchain-07-tee
Add console chain for 0.7 tee
2024-08-27 21:16:37 +00:00
Dennis Felsing 76c44cfb40
Merge pull request #8829 from furo321/use-getmapname
Use `GetMapName()` when getting the map name
2024-08-27 21:16:12 +00:00
furo f407adc61c Set m_VoteCreator when using force_vote 2024-08-27 21:44:00 +02:00
furo 9fbbf5cde7 Fix using random_unfinished_map from rcon 2024-08-27 21:43:22 +02:00
furo 9a7bc70f76 Fix double free or corruption crash with hot_reload 2024-08-27 20:44:55 +02:00
furo 0e016f9732 Use GetMapName() when getting the map name 2024-08-27 20:41:43 +02:00
dobrykafe cb57aa82bf add console chain for 0.7 tee 2024-08-27 20:01:27 +02:00
Robert Müller 14f1b36dd1
Merge pull request #8825 from KebsCS/pr-ghost-sorting
Add ghost list sorting
2024-08-27 16:55:22 +00:00
KebsCS 906f75c13a
Add ghost list sorting 2024-08-27 18:34:26 +02:00
bencie c4ff37d9d9 Send result of random_unfinished_map to all clients 2024-08-27 16:37:15 +02:00
furo 358cd20183 Run editor auto-reload on any local address, and not just localhost 2024-08-27 13:05:52 +02:00
Dennis Felsing 9d920b3575
Merge pull request #8703 from sjrc6/pr_slider
Adjust slider handle size
2024-08-27 09:20:18 +00:00
Tater 5fb059ad92 Adjust slider handle size 2024-08-27 11:02:12 +02:00
Dennis Felsing 4b8dcc3315
Merge pull request #8811 from furo321/add-map-votes-directories
Add support for directories with `add_map_votes`
2024-08-27 08:59:25 +00:00