Commit graph

13539 commits

Author SHA1 Message Date
Robert Müller a2de08a8db Add UpdateVolume function, remove unnecessary lock usage
Using the lock is not necessary, as the volume is already an atomic variable.
2023-09-21 23:44:59 +02:00
Robert Müller beaf263f3d Reorder SetChannel and SetListenerPos functions 2023-09-21 23:44:58 +02:00
Robert Müller b0356aea13 Rename argument, reduce indentation of SetVoiceTimeOffset 2023-09-21 23:44:58 +02:00
Robert Müller f169ce1c8c Use nullptr instead of 0, 0x0 and NULL 2023-09-21 23:44:58 +02:00
Dennis Felsing 2c8a798f3f
Merge pull request #7230 from furo321/practice-lasttp
Add /lasttp
2023-09-21 20:51:41 +00:00
furo a7ef9c7c6f Add /lasttp 2023-09-21 21:02:55 +02:00
Dennis Felsing 545852b7f1
Merge pull request #7224 from Robyt3/Demo-Hud-Intratick
Fix 1-tick delay of player position, speed, angle HUD
2023-09-20 22:45:51 +00:00
Robert Müller cd37c2d5b3
Merge pull request #7223 from furo321/preview-only-friends
Chat preview respect cl_show_chat_friends
2023-09-20 19:56:21 +00:00
Robert Müller b7cbbb48be
Merge pull request #7222 from furo321/update-server-browser
Update server browser when adding friends from ingame.
2023-09-20 19:49:00 +00:00
Robert Müller ed9a95ac23 Fix 1-tick delay of player position, speed, angle HUD
Respect the intratick when displaying the player position, speed and angle, to fix this information always being shown for the next tick. See #6417. This does not resolve the issue yet, as there are more HUD and player elements that need to make use of the intratick.
2023-09-20 21:39:42 +02:00
furo 4e9556e3da Chat preview respect cl_show_chat_friends 2023-09-20 21:32:13 +02:00
Robert Müller cf0df5bc03 Use GameTickSpeed instead of 50 and SERVER_TICK_SPEED 2023-09-20 21:17:12 +02:00
furo 5a4e3b1c2d Update server browser when adding friends from ingame. 2023-09-20 18:32:34 +02:00
Dennis Felsing 4dda7949d1
Merge pull request #7221 from Robyt3/Serverbrowser-Filter-Background-Fix
Fix background color in ingame server browser filter tab
2023-09-20 16:22:46 +00:00
Robert Müller 23cb2ff8c8 Fix background color in ingame server browser filter tab
Make background color of the tab content consistent with the color of the tab bar.

Regression from #7190.
2023-09-20 17:52:42 +02:00
Dennis Felsing fb6f04e9dc
Merge pull request #7220 from Robyt3/UI-Label-Streamed-Fixes
Track UI elements separately for each server browser tab
2023-09-20 15:48:25 +00:00
Robert Müller da47ebe0b5 Track UI elements separately for each server browser tab
Fix highlighted text of server browser entries not being refresh correctly when switching tabs.

This also reduces lag when switching tabs, as the UI elements for all tabs are now cached and don't need to be recreated when switching.

Regression from #7203.
2023-09-20 17:23:34 +02:00
Robert Müller 5d4affac55 Fix text containers always being recreated for empty text
Because text containers are not created for empty text, it was being tried again every frame.
2023-09-20 17:22:16 +02:00
Robert Müller 2c7df07fd7
Merge pull request #7196 from furo321/add-optional-arguments
Add optional argument to movement commands
2023-09-20 15:04:54 +00:00
Robert Müller 61a9095fc3 Remove unused IServerBrowser::TYPE_NONE, add NUM_TYPES 2023-09-20 17:03:24 +02:00
Robert Müller 48671dc866 Remove unnecessary temporary variables 2023-09-20 17:03:24 +02:00
Dennis Felsing 60de0f191e
Merge pull request #7217 from furo321/gfx-screen-conchain
Add console chain for screen resolution commands.
2023-09-20 09:25:14 +00:00
furo 597350010f Add console chain for screen resolution commands. 2023-09-20 11:01:43 +02:00
trml b62754915a Add flag to ddnetlaser for enabling prediction, let server control starttick 2023-09-19 23:22:15 +02:00
Jupeyy fcbe429d4c Decrease descriptor pool's current size when descriptor is freed 2023-09-19 18:28:48 +02:00
Robert Müller ce65d57f2e Support dynamic list of "communities" in engine serverbrowser
Replace existing hard-coded support for two "networks" with support for a dynamic list of "communities" which are indexed by a string-ID, though right now the DDNet and KoG communities are still hard-coded. The communities now also support an arbitrary number of associated countries, types and servers. This is a refactoring to prepare for getting the list of communities dynamically from the server and removing the DDNet and KoG tabs from the serverbrowser.
2023-09-18 19:37:04 +02:00
Robert Müller 2973eee036 Refactor json parser usage in CServerInfo2::FromJsonRaw 2023-09-18 17:37:21 +02:00
Robert Müller ca1bec5bac Refactor json parser usage in CServerBrowser::LoadDDNetRanks 2023-09-18 17:37:15 +02:00
Robert Müller e82e197109 Use NUM_LOCS as static assertion for array size 2023-09-18 17:29:43 +02:00
Edgar c6f666bee2
Merge pull request #7209 from Robyt3/Server-Mutes-Maximum-Increase
Increase maximum number of mutes and vote mutes
2023-09-18 14:53:05 +00:00
Robert Müller ce8e47ee63 Increase maximum number of mutes and vote mutes 2023-09-18 16:22:51 +02:00
marmare314 3f21597b6c check if quadpoint is selected and not if quad is selected
fixes #7199 (partially?)
2023-09-18 10:24:16 +02:00
Dennis Felsing a706074c82
Merge pull request #7203 from Robyt3/Serverbrowser-Memory-Leak
Fix memory leak of server browser entry UI elements
2023-09-17 20:13:01 +00:00
Robert Müller 816f1a5a01 Fix memory leak of server browser entry UI elements
New UI elements were being created for every server info after refreshing the server list. At the same time, old UI elements were not being deleted when the server info objects are deleted. The use of `mutable` for this purpose was also rather unclean.

Now, a separate `std::vector` of UI elements is kept for all server browser entries, instead of associating the UI elements directly with the server info.
2023-09-17 21:37:36 +02:00
Robert Müller 8dfa0b2198 Rename UpdateFilteredPlayers, remove mutable variable 2023-09-17 21:37:32 +02:00
Robert Müller ca308cccd8
Merge pull request #7195 from def-/pr-password-128
Increase password size limit from 32 to 128
2023-09-17 15:56:11 +00:00
furo 107af9c902 Add optional argument tiles to movement commands
Add optional argument to movement and console page commands

Remove optional argument to console page commands
2023-09-17 17:19:40 +02:00
Dennis Felsing 971fa6d024
Merge pull request #7186 from infclass/for-ddnet2
CMake: Revert versioning (move it back to version.h)
2023-09-17 14:51:47 +00:00
Dennis Felsing e33b747a4c Increase password size limit from 32 to 128 2023-09-17 14:32:23 +02:00
Dennis Felsing de8d373215
Merge pull request #7194 from furo321/fix-swap
Fix everyones swap getting reset when someone swaps
2023-09-17 12:29:11 +00:00
furo 77840a9c97 Fix everyones swap getting reset when someone swaps 2023-09-17 13:49:52 +02:00
Dennis Felsing a598831361
Merge pull request #7190 from Robyt3/Browser-Layout-Overhaul
Overhaul server browser filter, details and friends tabs
2023-09-16 22:17:38 +00:00
furo 67e753bd6b Don't include .demo in demo slice input 2023-09-16 22:09:26 +02:00
Robert Müller 0b57d56f48 Overhaul server browser filter, details and friends tabs
Move the "Filter", "Info" and "Friends" tabs to the top, above the tab content. Use icons instead of text for the tabs. Use animator to animate the tabs on mouse-over. Closes #6613.

Make spacings, corners and font sizes used in the filter, details and friends tabs more consistent.

Remove some unnecessary dark UI rect backgrounds.

Improve alignment of the number of friends with the heart icon for entries in the server list.

Improve layout of countries and types filters. Make the filters scrollable when there are many entries.

Refactor most of the server browser in preparation for replacing the DDNet and KoG tabs with a community filter, which will work like the countries and types filters. Split rendering of different server browser sections into multiple functions to improve readability. Reduce duplicate code for the countries and types filters.
2023-09-16 13:45:52 +02:00
Robert Müller 673b7facbe Remove unnecessary return value of net_init
The return value is unused and always 0, as the function fails with an assertion instead of returning an error value.
2023-09-16 13:37:53 +02:00
Robert Müller 3e548f0f66 Make listbox scrollbar width and margin adjustable 2023-09-16 13:24:19 +02:00
heinrich5991 286104cf08
Merge pull request #7181 from furo321/color-vote
Color vote if you have voted f3 or f4.
2023-09-16 10:40:15 +00:00
heinrich5991 b22956e7c6
Merge pull request #7188 from Robyt3/Server-Missing-Testing-Commands
Add `unninja`, `solo` and `deep` testing commands
2023-09-16 10:25:53 +00:00
furo b423ee59af Color text if you have voted f3 or f4
Add Sv_YourVote packet
2023-09-16 12:17:11 +02:00
Robert Müller 643a23aad3 Add unninja, solo and deep testing commands
Closes #7161.
2023-09-16 11:59:21 +02:00