Commit graph

20477 commits

Author SHA1 Message Date
Zwelf 783f4e3093 Record player name in Teehistorian files 2024-04-16 00:50:05 +02:00
Zwelf 868e6e0975 Disallow /save on teams with practice enabled 2024-04-16 00:34:23 +02:00
Robert Müller 8817a69269 Remove unnecessary client component variables and setters
Use the gameclient to access other components instead.
2024-04-15 20:26:26 +02:00
Dennis Felsing 2e211c9a31
Merge pull request #8218 from dobrykafe/pr-align-friendslist
Fix alignment of labels in friends list
2024-04-15 01:31:55 +00:00
Dennis Felsing fe41f58197
Merge pull request #8164 from murpii/pr_teleport_reset_jumps
Refresh air jumps after teleporting
2024-04-15 01:31:50 +00:00
Dennis Felsing aca25cc802
Merge pull request #8216 from Robyt3/Demo-ServerInfo-Fix
Fix incorrect score kind in demos depending on last server
2024-04-15 01:31:38 +00:00
dobrykafe 19b19262a4 fix alignment of labels in friends list 2024-04-15 00:29:46 +02:00
Robert Müller 8a378da89b
Merge pull request #8217 from dobrykafe/pr-remove-conmode
Remove unused `ConMode` function
2024-04-14 21:07:58 +00:00
dobrykafe 3b7019d3f7 remove unused ConMode function 2024-04-14 22:48:20 +02:00
Robert Müller 47e4505193
Merge pull request #8215 from furo321/fix-timecp-mysql
Fix `/timecp` not working with MySQL
2024-04-14 20:23:18 +00:00
Robert Müller 2423e35fd2 Fix incorrect score kind in demos depending on last server
Clear current server info when playing demos to ensure that the score kind (points, time) is detected correctly. Previously, when playing a demo with points score kind and `cl_demo_assume_race 0`, the score was not shown as points when the last server that the client connected to had a race gametype.

Move the implementation for `cl_demo_assume_race` together with the rest of the demo server info initialization in the `CClient::DemoPlayer_Play` function.
2024-04-14 22:18:49 +02:00
furo cf6569029f Fix /timecp not working with MySQL 2024-04-14 19:51:09 +02:00
Dennis Felsing 06f1db98e6
Merge pull request #8213 from furo321/fix-gametiles-button
Fix bug where certain tiles would not work in `Game tiles` menu
2024-04-14 13:28:22 +00:00
furo 2545c14a5d Fix bug where certain tiles would not work in Game tiles menu 2024-04-14 15:05:10 +02:00
Dennis Felsing c878cc70f4
Merge pull request #8211 from Robyt3/Menus-Demo-Hotkeys-Fix
Fix demo player hotkeys not working when menu is inactive, fix duplicated rendering of popup menus in demo player
2024-04-14 10:06:49 +00:00
Robert Müller 9abe501f77 Fix duplicated rendering of popup menus in demo player
The popup menus are already rendered in the `CMenus::Render` function, also for the demo player since #8156.
2024-04-14 11:30:47 +02:00
Robert Müller 717cbef375 Fix demo player hotkeys not working when menu is inactive
The demo player needs to be rendered also when the menu is inactive, to handle the hotkeys for controlling the demo player and to render the play/pause and speed indicators.

Closes #8208.
2024-04-14 11:30:42 +02:00
Dennis Felsing 1b77cbc821
Merge pull request #8209 from dobrykafe/pr-votes
Allow the vote creator to cancel the vote + sixup vote fix
2024-04-14 03:58:29 +00:00
Dennis Felsing 0691d42dd0
Merge pull request #8206 from furo321/rename-hooktick
Change type of `m_HookTick` to `NetIntAny`
2024-04-14 03:56:06 +00:00
dobrykafe 8ca395c8be allow the vote creator to cancel the vote 2024-04-13 23:57:59 +02:00
dobrykafe b6a1a124fe fix votes for sixup 2024-04-13 23:56:40 +02:00
furo 32fcd2a7e8 Change type of m_HookTick to NetIntAny 2024-04-13 17:02:18 +02:00
Dennis Felsing effc79cc87
Merge pull request #8204 from Robyt3/Client-Various-Cleanup
Various minor cleanup of `CClient`
2024-04-13 14:17:01 +00:00
Robert Müller 5295ba3ded Improve readability by breaking early and reducing indentation
Remove unnecessary temporary variables and parenthesis.
2024-04-13 11:10:47 +02:00
Robert Müller 9cd51576d4 Rename static variable ActionTaken to s_ActionTaken 2024-04-13 11:10:45 +02:00
Robert Müller fd7a1600f6 Remove redundant checks of client state
These conditions are contained in an `if(State() == IClient::STATE_ONLINE)` branch and the state does not change while inside this branch, so these checks are unnecessary.
2024-04-13 11:10:25 +02:00
Robert Müller 507b097ad8 Remove unnecessary cleanup in CClient::LoadMap function
The number of received snapshots is already correctly reset in the `CClient::OnEnterGame` function for the main and dummy connections.
2024-04-13 11:07:19 +02:00
Robert Müller 5a05f6e098
Merge pull request #8202 from def-/pr-estonian
Update Estonian translations by Cammo
2024-04-12 15:54:27 +00:00
Robert Müller a743962b84 Pass CImageInfo by reference to IGraphics::LoadPng
For consistency with other graphics functions using `CImageInfo`.
2024-04-12 17:23:41 +02:00
Robert Müller 8f7055f694 Change PNG in function names to Png
- `LoadPNG` -> `LoadPng`
- `SavePNG` -> `SavePng`
- `LoadSkinPNG` -> `LoadSkinPng`
2024-04-12 17:23:18 +02:00
Dennis Felsing 74411fb66c Update Estonian translations by Cammo 2024-04-12 22:44:13 +08:00
Dennis Felsing 06f330afb7
Merge pull request #8201 from Robyt3/Gameclient-OnReset-Fix
Fix tee briefly appearing at previous position when joining
2024-04-12 01:19:08 +00:00
Robert Müller 5da64c54fd Fix tee briefly appearing at previous position when joining
Previously, when connecting to servers repeatedly, the local tee would appear at the position it had on the previous server for a short time when joining.

This (and potentially other bugs) are fixed by clearing all game related `CGameClient` member variables in the `OnReset` function. Additionally, the `OnReset` function is now used in the `OnInit` function to ensure everything is initialized correctly when starting the client and to avoid duplicating the code.

In particular, this bug was limited to use of `cl_predict 1`, because the predicted gameworlds were not being reset when disconnecting, causing the predicted world and character from the previous server to be used. This bug was introduced in version 15.6, which added the predicted gameworlds in #1620. Closes #4339.
2024-04-11 21:37:53 +02:00
Robert Müller e4fd16e6a5
Merge pull request #8200 from def-/pr-default-team0mode
Enable team0mode by default again
2024-04-11 18:21:26 +00:00
Dennis Felsing 1adae02291
Merge pull request #8199 from dobrykafe/pr-team0mode-fix
Prevent enabling `/team0mode` while practice mode is active
2024-04-11 16:45:22 +00:00
Dennis Felsing 387608a361 Enable team0mode by default again
Since we have https://github.com/ddnet/ddnet/pull/8199 now
2024-04-12 00:31:09 +08:00
dobrykafe 083f7ba7ab prevent enabling /team0mode while practice mode is active 2024-04-11 18:26:56 +02:00
Dennis Felsing e1ab2ea07e Add sv_team0mode 2024-04-12 00:15:38 +08:00
Dennis Felsing 8dcaee069e
Merge pull request #8198 from Robyt3/Browser-Community-Filter-All
Track country/type filters separately for internet/favorites tabs
2024-04-11 04:39:43 +00:00
Robert Müller 01a995e5ec Track country/type filters separately for internet/favorites tabs
For the internet/favorite tabs, instead of combining the country/type filters of all communities in one view, track the country/type filters separately for these tabs using the new, reserved community name `all`. This should make the filters less confusing to use, as changing the country/type filters in one tab will not influence the other tabs anymore. Though the country/type filters of the internet and favorite tabs are still combined, as this is also the case for the community filter.

However, this made it possible to select country/type filters that exclude all servers, by first excluding some countries/types and then changing the selected communities so all selectable countries/types are excluded. To prevent this, the filters will now include all countries/types, if they would otherwise exclude all selectable countries/types.

To do this more efficiently, the community cache is moved from the menus to the engine serverbrowser. To avoid using the UI page in the engine serverbrowser, the serverbrowser type is instead used to detect if the community cache should be updated. This required additional changes in the menus to ensure that the UI page and the serverbrowser type stay in sync with each other, which would otherwise cause incorrect server entries to be shown for one frame when switching tabs. The serverbrowser type is now refreshed immediately when the menu page is changed with the `CMenus::SetMenuPage` function, which allowed removing duplicate code for the server browser tab buttons. The `CMenus::RefreshBrowserTab` function does not take the page to be refreshed as argument anymore, as it always was only used to refresh the current page. Instead, a `bool` argument is used to specify whether the refresh should be forced even if the server browser type has not changed.

Closes #8158.
2024-04-10 21:40:02 +02:00
Robert Müller 394ed87ac9 Avoid copy of CServerInfo in loop in IsRegistered 2024-04-10 21:08:29 +02:00
Dennis Felsing 39dd2a552d
Merge pull request #8196 from ChillerDragon/pr_gtest_to_main
Update gtest to current main branch
2024-04-09 09:56:18 +00:00
ChillerDragon aa34ebe7be Update gtest to current main branch
From their readme

> GoogleTest now follows the Abseil Live at Head philosophy. We
> recommend updating to the latest commit in the main branch as often as
> possible. We do publish occasional semantic versions, tagged with
> v${major}.${minor}.${patch} (e.g. v1.14.0).

3d73dee972/README.md (live-at-head)
2024-04-09 16:51:15 +08:00
Dennis Felsing dee8ba46ec
Merge pull request #8195 from BlaiZephyr/fix-win-readme
update readme on building with MSVC on windows
2024-04-09 01:13:12 +00:00
meloƞ 69692d7fd1 update readme on building with MSVC on windows 2024-04-08 20:54:26 +02:00
Dennis Felsing 67dfd7b434
Merge pull request #8193 from furo321/fix-typo
Fix typo in `/team0mode` description
2024-04-08 16:03:40 +00:00
furo 077d7c5afb Fix typo in /team0mode description 2024-04-08 17:01:15 +02:00
Dennis Felsing 8f58cbaea3
Merge pull request #8192 from dobrykafe/pr-conchain-bg-entities
Add console chain for `ClBackgroundEntities`
2024-04-08 12:39:00 +00:00
dobrykafe fd5d334cd1 add console chain for ClBackgroundEntities 2024-04-08 12:26:25 +02:00
Dennis Felsing 96fa194f1c
Merge pull request #8190 from furo321/fix-conflock
Fix broken rebase of `ConFlock`, rename previous remains of `team 0 mode`
2024-04-08 01:23:20 +00:00