Robert Müller
1dedde542a
Refactor ghost skin updating, ensure current ghost is updated
...
Rename function for consistency.
2023-10-02 15:35:12 +02:00
Robert Müller
9029fb9593
Remove CTeeRenderInfo
member variables of CPlayers
...
The variables can be local variables in `CPlayers::OnRender`.
2023-10-02 15:34:39 +02:00
furo
7e045d4f32
Teleport the player to their cursor if no argument is specified.
...
Check for `NumArguments()`
2023-10-02 13:26:34 +02:00
Robert Müller
dab88177dd
Fix images using indexed color palette not being loadable
...
The wrong color channel count was being used for loading images that use an indexed color palette, which was causing the loading to fail with the error "bytes in row incorrect". Now the correct color channel count is retrieved using the libpng API.
Closes #7157 .
2023-10-02 12:21:20 +02:00
Dennis Felsing
fe77f63a58
Merge pull request #7278 from Robyt3/Menus-Images-Scan-Refactoring
...
Refactor menu image scan
2023-10-01 22:22:24 +00:00
Dennis Felsing
887522ea5b
Merge pull request #7279 from Robyt3/Menus-Performance
...
Improve performance of menus checker background, improve server browser performance
2023-10-01 22:21:58 +00:00
Dennis Felsing
624f4aef21
Merge pull request #7280 from furo321/move-lasttelepos
...
Don't reset `/lasttp` position on death
2023-10-01 22:21:34 +00:00
Dennis Felsing
879a88933c
Merge pull request #7277 from furo321/send-ping-menu
...
Send the player's latency if a menu is open
2023-10-01 22:19:50 +00:00
Robert Müller
fa07f64982
Improve performance of menus checker background, refactoring
...
Avoid duplicate `SetColor` calls in loop.
Avoid `QuadsDrawTL` calls by batching quads together before drawing.
Use `SetColor` instead of `SetColorVertex`.
2023-10-01 21:01:10 +02:00
Robert Müller
b1d90aaaf2
Store number of filtered players when filtering
...
Only update total number of filtered players when the filter is updated instead of calculating it every frame.
2023-10-01 20:53:29 +02:00
Robert Müller
fe27752d40
Refactor menu image scan
...
Remove unnecessary check for duplicate menu images. Listing directories with the storage now prevents duplicates, so this additional check is not needed anymore.
Ensure menu images are in RGBA format.
Ensure menu image names are not truncated.
Minor code format improvements.
2023-10-01 19:39:04 +02:00
furo
6dd43fb086
Don't reset LastTelePos
on death
2023-10-01 18:34:07 +02:00
furo
0661eafb49
Send the player's latency if a menu is open
2023-10-01 17:32:51 +02:00
Robert Müller
7743981e02
Merge pull request #7273 from Marmare314/quad-selection-iv
...
revert quad selection correctly fixes #7248
2023-10-01 09:51:24 +00:00
furo
f55086f2bf
Use m_aInputData
for dummy in cl_show_direction
2023-10-01 01:14:35 +02:00
marmare314
a7748ba87e
revert quad selection correctly fixes #7248
2023-09-30 23:43:21 +02:00
Dennis Felsing
e0d906d9e1
Merge pull request #7272 from furo321/afk-optional2
...
Don't run `GET_INT` on afk attribute in `ProcessServerInfo`
2023-09-30 20:43:37 +00:00
furo
a3064ae105
Don't run GET_INT
on afk attribute in ProcessServerInfo
2023-09-30 20:51:20 +02:00
Dennis Felsing
c8401aa38f
Merge pull request #7271 from furo321/afk-optional
...
Make IsAfk attribute optional
2023-09-30 18:22:09 +00:00
Dennis Felsing
49a5a591d7
Merge pull request #7269 from Robyt3/Serverbrowser-Favorite-Resort-Fix
...
Fix large FPS drop rendering server details of favorite server
2023-09-30 18:15:50 +00:00
furo
3b2389daa4
Make IsAfk attribute optional
2023-09-30 19:56:01 +02:00
Robert Müller
d55822bc4f
Merge pull request #7270 from furo321/editor-export-sound
...
Add export button to sounds
2023-09-30 16:10:20 +00:00
furo
f07e7fef76
Add export button to sounds
2023-09-30 17:28:47 +02:00
Robert Müller
0025b6c1f3
Fix large FPS drop rendering server details of favorite server
...
The server list was being resorted every frame when the server details of a favorite server were being rendered, which was causing the FPS to drop by a factor of 5.
2023-09-30 15:48:10 +02:00
Dennis Felsing
c731d5345f
Merge pull request #7087 from ChillerDragon/pr_streamer_mode
...
Add streamer mode to avoid leaks
2023-09-30 13:34:32 +00:00
ChillerDragon
ca8d9d4f18
Add streamer mode to avoid leaks
2023-09-30 15:10:44 +02:00
Robert Müller
cf35594fa4
Extract UpdateServerFriends
function, cache friends on server
...
Calculate the number of friends on each server when refreshing the friend state of the server info instead of every time the server entry is rendered.
2023-09-30 13:32:36 +02:00
Robert Müller
7e8442d394
Move and rename UpdateFilteredPlayers
function, mark as const
2023-09-30 13:29:28 +02:00
Robert Müller
28d4451057
Add local variable Info
to reduce duplicate code
2023-09-30 13:29:28 +02:00
Robert Müller
034962ae24
Add enum ERankState
to replace magic numbers
2023-09-30 13:29:28 +02:00
Robert Müller
dcff6d92f0
Add name for enum EClientScoreKind
2023-09-30 13:29:28 +02:00
Robert Müller
721a55c603
Remove game menus includes in engine
...
Use config manager to reset `ui_page` to the default, instead of using `CMenus::PAGE_DDNET` directly (which is the default).
Check current type of serverbrowser instead of checking the current `ui_page` against `CMenus::PAGE_DDNET` and `CMenus::PAGE_KOG`.
2023-09-30 13:29:28 +02:00
Robert Müller
6753e37772
Move function definitions to remove and organize includes
2023-09-30 13:29:27 +02:00
Robert Müller
e78305e1cd
Remove unused m_aFilter(Gametype)String
variables
2023-09-30 13:29:27 +02:00
Dennis Felsing
359d9ab00b
Merge pull request #7176 from Marmare314/export-image
...
add export image button
2023-09-30 11:01:26 +00:00
Dennis Felsing
1452b36dc0
Merge pull request #7172 from furo321/render-done-popup
...
Add a popup for when video render is done
2023-09-30 09:38:01 +00:00
Dennis Felsing
3e2893e638
Merge pull request #7182 from dobrykafe/pr-show-direction
...
Ability to show local keypresses only
2023-09-30 09:35:20 +00:00
Dennis Felsing
aacfc9a357
Merge pull request #7241 from Robyt3/UI-LabelStreamed-HighlightedFix
...
Fix mangled highlighted text in server browser
2023-09-30 09:24:58 +00:00
Learath
fcffac6fa8
Fix the fix to dead reckoning
2023-09-30 01:29:33 +02:00
Steinchen99
7b58b77c5e
QoL ; Made it so f2 cmd 'tele' resets speed and unfreezes the tee upon teleporting
2023-09-29 14:53:24 +02:00
Robert Müller
c64ec0f677
Limit effects of dbg_stress
to features useful for debugging
...
Using `dbg_stress 1` now only does the following (in debug build):
- Randomly send inputs.
- Randomly send chat messages.
- Randomly connect/disconnect to server configured with `dbg_stress_server` (`localhost` by default).
Previously it also did the following, which is not useful for this debugging feature and only complicates the code unnecessarily:
- Cause images and sounds not to be loaded.
- Render only every tenth frame.
- Always use inactive graphics refresh rate.
2023-09-28 20:14:54 +02:00
Robert Müller
06948ddecd
Remove remains of dbg_stress
from server
...
Using `dbg_stress 1` on a server made clients always auto-join team 0 and nothing else, which is not useful on its own for stress testing.
2023-09-28 20:14:23 +02:00
Robert Müller
247ce38094
Remove unused variables m_RenderFrameTimeLow/High
2023-09-28 20:12:55 +02:00
Dennis Felsing
6a030e1a2b
Merge pull request #7262 from furo321/expire-server-info-afk
...
Expire server info when changing `m_Afk`
2023-09-27 10:44:55 +00:00
Dennis Felsing
5b3738dc17
Merge pull request #7261 from furo321/demo-show-pred
...
Don't show cl_showpred in demos
2023-09-27 10:31:36 +00:00
furo
4f0552a8df
Expire server info when changing m_Afk
2023-09-27 12:12:12 +02:00
furo
23477584d1
Don't show cl_showpred in demos
2023-09-27 11:31:53 +02:00
Robert Müller
74192b9051
Add CSnapshot::EmptySnapshot
, mark pointer arguments as const
...
Instead of keeping track of a permanently empty `CSnapshot` object in client and server separately, add `CSnapshot::EmptySnapshot` to access a singleton empty `CSnapshot`.
Mark pointer parameters of snapshot functions as `const` when possible.
2023-09-26 20:13:27 +02:00
Dennis Felsing
875c51e28f
Merge pull request #7257 from furo321/votes-command
...
Add votes command to rcon
2023-09-26 11:45:32 +00:00
furo
eabe59b413
Change format of votes
2023-09-26 12:13:49 +02:00
furo
d165f9e8a9
Add votes command to rcon
2023-09-26 02:24:00 +02:00
Jupeyy
958676ae84
Merge pull request #7251 from Robyt3/Graphics-Texture-Index-DoubleFree-Assertion
...
Add assertion when double-freeing texture index, ensure OpenGL texture vectors are large enough
2023-09-25 18:51:04 +00:00
heinrich5991
296d141c0e
Merge pull request #7254 from Robyt3/Windows-File-Buffering
...
Use `FILE *` on Windows again, only use `HANDLE` for opening
2023-09-25 17:41:47 +00:00
Robert Müller
8ebe3c1b35
Use FILE *
on Windows again, only use HANDLE
for opening
...
This mostly reverts #6937 by making our `IOHANDLE` effectively `FILE *` on all systems again. We still use `CreateFileW` to open a `HANDLE` initially so we can specify the necessary flag so the file can be moved/deleted while open, which we can't do with the `FILE *` based `fopen` functions on Windows. This brings back the automatic I/O buffering on Windows, causing significantly less system calls when saving files. Closes #7226 .
2023-09-25 18:24:48 +02:00
furo
25101d2cb0
Add missing descriptions of commands.
2023-09-24 23:21:10 +02:00
Robert Müller
96a68455ca
Ensure OpenGL texture vectors are large enough
...
In the unlikely case that the wanted texture slot is larger than twice the size of the original texture vector.
2023-09-24 22:27:16 +02:00
Robert Müller
99cee23de4
Add assertion when double-freeing texture index
...
Simplify the handling of free texture indices by using `-1` only for indices which are currently in use, whereas the size of the vector is now used to indicate the last free index. Otherwise the assertions incorrectly detect the last texture index always being in use because `-1` was used for both states.
2023-09-24 22:24:51 +02:00
Dennis Felsing
60046c7e18
Merge pull request #7247 from Learath2/pr_reckon
...
Fix dead reckoning
2023-09-24 18:38:53 +00:00
Dennis Felsing
708b263766
Merge pull request #7249 from Robyt3/Gameclient-ConfigManager-Getter
...
Add `IConfigManager` getter to `CGameClient` and `CComponent`
2023-09-24 18:38:29 +00:00
Dennis Felsing
bca21dc640
Merge pull request #7250 from Robyt3/Cleanup-Background-Foreground-Names
...
Rename variables containing `ForeGround` and `BackGround`
2023-09-24 18:38:15 +00:00
Robert Müller
2a17d1b8ac
Rename variables containing ForeGround
and BackGround
...
To `Foreground` and `Background` respectively.
2023-09-24 20:01:36 +02:00
Robert Müller
003d96e1c8
Add IConfigManager
getter to CGameClient
and CComponent
2023-09-24 19:55:20 +02:00
Robert Müller
9933c1350d
Merge pull request #7246 from furo321/register_conchain
...
Configs used in Register OnConfigChange should have Conchain
2023-09-24 17:54:31 +00:00
Learath
ecaded8cce
Fix dead reckoning
2023-09-24 18:14:09 +02:00
furo
4476dfacde
Configs used in OnConfigChange should trigger Conchain
2023-09-24 15:31:43 +02:00
Dennis Felsing
bcb84d612e
Merge pull request #7245 from furo321/freeview-radius
...
Increase freeview radius to kill tile border
2023-09-24 06:58:05 +00:00
furo
e93325b141
Increase freeview radius to kill tile border
2023-09-24 01:19:50 +02:00
Dennis Felsing
5d220e337c
Merge pull request #7244 from furo321/suicide-penalty
...
Remove unused config, `sv_suicide_penalty`
2023-09-23 22:17:43 +00:00
furo
436c977f7e
Remove unused config, sv_suicide_penalty
2023-09-23 23:51:16 +02:00
Robert Müller
2d4bac8c0c
Ensure strings in demo header are zero-terminated and valid UTF-8
...
Previously, if the demo header strings did not contain zero-termination, the client would render the strings and any following non-zero memory from the demo header.
Now, demos will not be loaded, if any string in the header is not zero-terminated or not valid UTF-8.
2023-09-23 22:14:34 +02:00
Robert Müller
95675a97ad
Fix mangled highlighted text in server browser
...
Refresh UI label text containers when the glyph count of the read-cursor has changed.
Regression from #7203 .
2023-09-23 16:34:13 +02:00
Dennis Felsing
cc67723beb
Merge pull request #7239 from furo321/editor-zoom-envelope
...
Add numpad shortcuts and button for zooming in envelope editor
2023-09-23 13:51:27 +00:00
Dennis Felsing
1193361f1c
Version 17.3
2023-09-23 15:28:55 +02:00
furo
57ad88d6ee
Add numpad shortcuts and button for zooming in envelope editor
2023-09-23 14:45:56 +02:00
Robert Müller
25b110c153
Merge pull request #7236 from furo321/add-is-process-alive
...
Detect if server started from client is no longer running
2023-09-23 08:50:39 +00:00
VoxelDoesCode
c4d325e09b
Show if your friend is AFK through friends list
...
resolve mege conflict
AFK -> Afk (for consistency)
2023-09-23 00:54:13 +02:00
furo
3da0b34444
Don't close handle if TerminateProcess failed
2023-09-22 23:15:53 +02:00
furo
1a36743185
kill_process
return true if process doesn't exist
2023-09-22 22:18:20 +02:00
Robert Müller
1d711d6cf0
Correctly update auth keys when using auth_remove
...
When using `auth_remove`, the key indices for the default helper, mod and admin passwords were not properly adjusted, causing the wrong passwords to be used for the username-less logins.
The key indices for connected clients were also not properly adjusted, causing the wrong identity to be shown for currently authenticated clients when using the `status` command.
Closes #6427 .
2023-09-22 21:12:20 +02:00
furo
367f06a7f9
Detect if server started from client is no longer running
...
Add function to check if a process is alive.
Fix requsted changes
2023-09-22 20:17:40 +02:00
Dennis Felsing
c042835c1d
Merge pull request #7234 from Robyt3/Input-PumpEvents
...
Fix double-click handling with `gfx_asyncrender_old 0`
2023-09-22 15:38:17 +00:00
Robert Müller
98bfed7859
Fix double-click handling with gfx_asyncrender_old 0
...
We need to call `SDL_PumpEvents()` to ensure that we have the latest keyboard, mouse and joystick state before we use it.
See:
- https://wiki.libsdl.org/SDL2/SDL_GetKeyboardState
- https://wiki.libsdl.org/SDL3/SDL_GetMouseState#code-examples
Closes #7052 .
2023-09-22 17:09:39 +02:00
Robert Müller
774d32713d
Merge pull request #7227 from furo321/swap-without-name
...
Add ability to swap without a name when team only has 2 players.
2023-09-22 14:33:48 +00:00
Dennis Felsing
cc2bdbd0ed
Merge pull request #7232 from furo321/initial-chat-delay-message
...
Use a different message when muted by sv_chat_initial_delay
2023-09-22 11:06:56 +00:00
furo
5793891d91
Add a message when using sv_chat_initial_delay
2023-09-22 12:43:36 +02:00
Robert Müller
b9951dd411
Refactor and reorder RateConvert
, DecodeOpus
, DecodeWV
...
Pass sample by reference instead of by index, as the functions are only used internally and a valid sample is assured.
2023-09-21 23:52:44 +02:00
Robert Müller
7fe854d861
Reduce indentation, rename variables in Mix
function
2023-09-21 23:52:40 +02:00
Robert Müller
07e18ebecb
Replace most global variables in engine sound with member variables
...
Most variables used in the sound engine were static globals, as they are used in the static sound mixing function. The global variables are replaced by member variables, by passing the sound interface as user-data for the SDL mixing callback. The `Mix` function is made a public member function of `ISound` instead of being exposed using `ISoundMixFunc GetSoundMixFunc()`.
This allows to remove the direct dependency of the engine sound on the engine video, by instead passing the sound mixing function as a lambda to the engine video in the engine client.
The old WavPack reader function interface does support passing a user-data pointer to the callback function, so global variables are still used here.
2023-09-21 23:52:13 +02:00
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
furo
f23e5ceb6f
Correct value of TeamSize.
2023-09-21 23:15:42 +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
furo
992a26c7ca
Add ability to swap without a name when team only has 2 players.
2023-09-21 19:40:37 +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
dobrykafe
7c710ddb96
add another value instead of new variable
2023-09-20 22:47:09 +02: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