Commit graph

18727 commits

Author SHA1 Message Date
Dennis Felsing cfced55534 Fix macOS CI
Seen in https://github.com/ddnet/ddnet/actions/runs/6969106161/job/18964960431

Error: No such keg: /usr/local/Cellar/python@3.10
2023-11-23 13:20:41 +01:00
furo 04c5c6a5d6 More fixes to KILLMSGTEAM 2023-11-23 11:57:35 +01:00
Dennis Felsing 6fc27bea8c
Merge pull request #7528 from furo321/statboard-killmsgteam
Count deaths in statboard from `KILLMSGTEAM`
2023-11-23 07:26:56 +00:00
furo ad41069c20 Count deaths in statboard from KILLMSGTEAM 2023-11-23 07:54:02 +01:00
Dennis Felsing 75628335e3
Merge pull request #7527 from Robyt3/Config-ResetGameSettings-Fixes
Fix string and color game settings not being reset correctly
2023-11-22 23:06:44 +00:00
Robert Müller 61c201c37c Fix string game settings not being reset correctly
Due to swapped `str_copy` arguments, the old value for string game variables was being overridden by the current value instead of the other way around in `CConsole::ResetGameSettings`.

There are currently no string game settings affected by this.
2023-11-22 23:16:57 +01:00
Robert Müller d331bcb496 Fix color game settings not being reset correctly
Handling color settings the same as int settings in `CConsole::ResetGameSettings` is not correct, as this causes the color variable data to be cast to int variable data.

There are currently no color game settings affected by this.
2023-11-22 23:12:56 +01:00
heinrich5991 7f9371ccfd
Merge pull request #7525 from Robyt3/Server-Debug-Dummies-ServerInfo
Ensure debug dummies are not included in server info
2023-11-22 18:39:00 +00:00
Robert Müller 48bfecc0d3 Ensure debug dummies are not included in server info
Also fix normal clients being disconnected/controlled like debug dummies.

Closes #7523.
2023-11-22 19:23:38 +01:00
Dennis Felsing 403c1a5377
Merge pull request #7526 from Learath2/pr_reckon
Revert the mess-chain #7247. Apply #7171
2023-11-22 18:20:50 +00:00
Learath b9f786c14f Revert the mess-chain #7247. Apply #7171
Co-authored-by: Valentin Bashkirov <valenteen3d@ya.ru>
2023-11-22 18:34:42 +01:00
heinrich5991 f95b0f163f
Merge pull request #7520 from Robyt3/Packer-Improvements
Minor improvements to `CPacker` and `CUnpacker`
2023-11-22 16:44:30 +00:00
heinrich5991 8b0fccc6a3
Merge pull request #7522 from furo321/gitignore
Add `demo_extract_chat` to .gitignore.
2023-11-22 01:16:42 +00:00
furo ef8a87a359 Add demo_extract_chat to .gitignore. 2023-11-22 00:54:54 +01:00
Dennis Felsing 7c0c7051b8
Merge pull request #7519 from Robyt3/Server-Debug-Dummies-Dynamic
Dynamically connect/disconnect debug dummies, cleanup
2023-11-21 22:41:46 +00:00
Robert Müller ab4e737a57 Fix misaligned int loads in CUnpacker::GetUncompressedInt
Use `mem_copy` instead of dereferencing potentially misaligned address as `int`.
2023-11-21 21:57:06 +01:00
Robert Müller 51e3c37c03 Use mem_copy instead of for-loop in CPacker::AddRaw
Using `memcpy` is faster, assuming the compiler doesn't already transform the loop to `memcpy` automatically.
2023-11-21 21:49:29 +01:00
Robert Müller 0d8a0d3b1d Dynamically connect/disconnect debug dummies, cleanup
Call expected server callback functions to simulate clients dynamically connecting and disconnecting when changing the `dbg_dummies` variable. This makes the debug dummies more useful for debugging. Previously, the debug dummies were considered invalid clients, whereas they are now considered to be ingame, so they should behave mostly like real clients being connected to the server. The debug dummies also have correct client names now, e.g. "Debug dummy 42".

The game server code is cleaned up by moving all special handling for debug dummies to the engine server function `CServer::UpdateDebugDummies`.

The left/right direction inputs for debug dummies are now properly added to the client input array, so their input handling should be consistent with normal clients, which fixes some inconsistent prediction with debug dummies.
2023-11-21 19:59:20 +01:00
Dennis Felsing 35f071b021
Merge pull request #7513 from Robyt3/ImageLoader-Greyscale-Fix
Handle all color channel counts in image loader, refactoring
2023-11-20 21:55:00 +00:00
heinrich5991 83b199b8e2
Merge pull request #7517 from Robyt3/Style-ConstChar
Use `const char *` instead of `char const *` consistently
2023-11-20 21:53:13 +00:00
Robert Müller 29a32b7acc Use const char * instead of char const * consistently
Both are equivalent. Seems to already be used consistently for all other types.
2023-11-20 22:26:19 +01:00
Robert Müller bcae7da6b4 Handle all color channel counts in image loader
Greyscale images with alpha channel (i.e. channel count = 2) were incorrectly handled as RGBA images, causing the client to crash when loading such images. Now the images can successfully be loaded with the image loader, but the client still only supports loading RGB and RGBA images like before.
2023-11-20 21:58:29 +01:00
Robert Müller f0a17435e6 Ensure freed image buffer is not propagated
The image data is freed when the image format is unsupported, but `CImageInfo::m_pData` would still point to the freed memory, so double-frees were possible.
2023-11-20 21:58:29 +01:00
Robert Müller 82b75ddfe0 Improve error log messages for PNG loading 2023-11-20 21:58:29 +01:00
Robert Müller 0427dfff2e Use bool instead of int 2023-11-20 21:58:29 +01:00
Robert Müller 15e4f9a886 Remove remaining obsolete // ignore_convention comments 2023-11-20 21:58:29 +01:00
heinrich5991 b6c0b31d1c
Merge pull request #7514 from Robyt3/Codecov-Patch-No-Target
Also set Codecov target for patch to 0%
2023-11-20 20:08:25 +00:00
Robert Müller 7b6a126b53 Also set Codecov target for patch to 0% 2023-11-20 20:48:05 +01:00
Dennis Felsing 375dd7da8b
Merge pull request #7511 from furo321/telecursor-fixes
Account for zoom when teleporting to cursor.
2023-11-20 12:25:54 +00:00
furo c2d02ad45c Account for zoom when teleporting to cursor. 2023-11-20 12:33:08 +01:00
Dennis Felsing 9ede40513d Revert "Add flags for compatibility with Windows 8 - 11"
This reverts commit 744434be83.
2023-11-19 23:35:00 +01:00
Dennis Felsing d11a271f45
Merge pull request #7506 from trml/pr_predmargin_simplify
Make prediction margin take effect instantanously
2023-11-19 21:56:40 +00:00
Dennis Felsing 472c9f070b
Merge pull request #7507 from dobrykafe/pr-replace-sizeof
replace `sizeof x` with `sizeof(x)`
2023-11-19 21:56:15 +00:00
Dennis Felsing c15e9b17fa
Merge pull request #7505 from Chairn/pr_wastelefalse
Init vec2 members to 0 and small cleanup
2023-11-19 21:55:09 +00:00
dobrykafe 904abae6ac replace sizeof x with sizeof(x) 2023-11-19 22:36:47 +01:00
trml 717aad2677 Make prediction margin take effect immediately 2023-11-19 19:52:39 +01:00
Chairn 2dcbaf605e Small cleanup: simplify member type and computation 2023-11-19 17:36:17 +01:00
Chairn 5b27062ded Remove unused members 2023-11-19 17:36:16 +01:00
Chairn d6c7bcdbdc Init vec2 members to 0 following #6256 2023-11-19 17:36:16 +01:00
heinrich5991 b4567d6e25
Merge pull request #7502 from Robyt3/Browser-CommunityFilter-Fixes
Prevent community filters excluding all elements, fix server browser update on community filter change via console
2023-11-19 16:24:52 +00:00
Robert Müller 228810e01c
Merge pull request #7504 from def-/pr-codecov-annotations
codecov: Also disable annotations (fixes #7498)
2023-11-19 16:18:38 +00:00
Dennis Felsing ad7ad79082 codecov: Also disable annotations (fixes #7498) 2023-11-19 17:01:14 +01:00
Dennis Felsing 44d378c667
Merge pull request #7503 from ChillerDragon/pr_score_controller
Move `m_pLoadBestTimeResult` to `IGameController`
2023-11-19 15:56:41 +00:00
ChillerDragon 16c5a60b53 Move m_pLoadBestTimeResult to IGameController
Gets rid of more CGameControllerDDRace casts.
Those did not show up during compile time only during runtime
of another active controller when asan is active.
2023-11-19 16:23:17 +01:00
Robert Müller 9a652ecaae
Merge pull request #7501 from heinrich5991/pr_ddnet_antibot_kick
Allow antibot to kick people
2023-11-19 15:04:57 +00:00
Robert Müller ccc470ecc9 Fix server browser update on community filter change via console
Also update server browser filtering/sorting when changing the community/country/type filter config variables with the console.

Clean the filter config variables when they are changed instead of only when the community filter is rendered.
2023-11-19 15:34:50 +01:00
Robert Müller aba67f46ee Prevent community filters excluding all elements
Ensure that community/country/type filters do not exclude all allowed elements, which can happen when a previously selected community is not available anymore or when arbitrary community filter values are set with the console.
2023-11-19 15:34:33 +01:00
heinrich5991 a5b72fef42 Allow antibot to kick people 2023-11-19 14:59:14 +01:00
heinrich5991 4d00e8c0e3
Merge pull request #7496 from Robyt3/Base-cstring-Include-Fix
Add missing `<cstring>` include for `memset` to `system.h`
2023-11-19 13:05:35 +00:00
Robert Müller 2e7cb9e4bc Add missing <cstring> include for memset to system.h
Fix compilation with MinGW due to `memset` call added to `system.h` in #6256.
2023-11-19 13:04:04 +01:00