Commit graph

20883 commits

Author SHA1 Message Date
Robert Müller d13d4f7144 Fix damage indicators being stuck after connecting dummy
Do not reset the local time after the dummy is connected, as the local time is supposed to run continuously while on the same server. Resetting the local time caused damage indicators to become stuck, as the `s_LastLocalTime` value is in the future after resetting the local time. This also affected other effects like pickup location and bullet rotation, where this was not noticeable.

Closes #4967.
2024-11-17 16:31:41 +01:00
Dennis Felsing 9c02194f09
Merge pull request #9258 from Robyt3/Textrender-Newline-Loop-Fix
Fix client hanging when rendering text with small maximum width
2024-11-16 21:00:42 +00:00
Dennis Felsing 95d6d99aff
Merge pull request #9256 from SollyBunny/fix_colors_on_repeated_client_msg
Fix colors on repeated client msg
2024-11-16 18:40:22 +00:00
SollyBunny 1361a4476f Fix colors on repeated client msg 2024-11-16 17:25:10 +00:00
Robert Müller c3bcf57f99 Fix client hanging when rendering text with small maximum width
Previously, when rendering text with a maximum width that is too small for a single glyph then the text rendering would loop indefinitely trying to advance the cursor to the next line where the glyph will also not fit.
2024-11-16 13:58:15 +01:00
Dennis Felsing aa408ef8c8
Merge pull request #9253 from heinrich5991/pr_ddnet_contributing_if_int
Document that using integers in boolean contexts is not recommended
2024-11-15 22:15:11 +00:00
heinrich5991 495e2621b4
Merge pull request #9246 from Robyt3/Datafile-Writer-Stack-Usage
Substantially reduce stack memory usage of `CDataFileWriter`
2024-11-15 21:52:59 +00:00
heinrich5991 b83bad7c27
Merge pull request #9252 from Robyt3/Client-CMapLayers-Parameter-Cleanup
Remove unused parameters of `CMapLayers` functions
2024-11-15 21:52:15 +00:00
heinrich5991 9ffde94c86 Document that using integers in boolean contexts is not recommended 2024-11-15 22:46:00 +01:00
Robert Müller 557a59461b Remove unused parameters of CMapLayers functions
Use width and height of `STileLayerVisuals` instead of passing `CMapItemLayerTilemap *` separately.

Remove unused `CMapItemGroup *` parameters.
2024-11-15 21:39:55 +01:00
Robert Müller 1cb3a6bf7d Substantially reduce stack memory usage of CDataFileWriter
Use an `std::map` to sparsely store only the used `CItemTypeInfo`s on the heap instead of using an `std::array` to store all 65536 entries (`MAX_ITEM_TYPES`) on the stack. This reduces the (stack) memory usage of `CDataFileWriter`s from 786512 to 128 bytes.
2024-11-15 21:10:41 +01:00
Robert Müller 4f53dd8048
Merge pull request #9241 from MilkeeyCat/pr_fix_envelope_point_popup
Fix envelope point popup
2024-11-13 21:40:54 +00:00
MilkeeyCat 47176e85d6 Fix envelope point popup 2024-11-13 22:14:40 +02:00
Robert Müller 47c3c80462
Merge pull request #9236 from SollyBunny/echo_colors_persist
Echo colors persist + Better pFrom for chat
2024-11-13 19:25:05 +00:00
SollyBunny ae04851a9a Echo colors persist + Better pFrom for chat 2024-11-12 23:32:45 +00:00
heinrich5991 1ff5d5b10f
Merge pull request #9232 from BlaiZephyr/supersede_mysql
Remove ENV-vars from FindMySQL.cmake
2024-11-11 13:03:52 +00:00
BlaiZephyr 59e50f0d90 Remove ENV-vars from FindMySQL.cmake 2024-11-11 13:37:25 +01:00
Dennis Felsing 0ebfa4802d
Merge pull request #9230 from ChillerDragon/pr_no_weapon
Make the client able to have tee's without weapons
2024-11-11 09:36:34 +00:00
ChillerDragon 32cb056549 Make the client able to have tee's without weapons
Closed #8758
2024-11-11 16:58:36 +08:00
Dennis Felsing 958926348e
Merge pull request #9226 from Zwelf/pr-fix-saveload-teehistorian-chunk
Fix incomplete Teehistorian chunks being written
2024-11-09 22:31:14 +00:00
Dennis Felsing 1500ec8b98
Merge pull request #9225 from BlaiZephyr/findmysql
fix FindMySQL not finding mysql under NixOS
2024-11-09 21:49:10 +00:00
Zwelf 1b6e5a9295 Fix incomplete Teehistorian chunks being written
Save/Load code are up to 65536 bytes long. However, Packer only has a
buffer of 2048 bytes. Writing SAVE_SUCCESS and LOAD_SUCCESS chunks
likely for saves with 3 or more tees.

This increases the buffer size for all packing including networking
packets and is therefore probably not the optimal solution. An
alternative would be to create an additional packer CLargePacker or make
the size a template argument.

The suggested change is the simplest fix adding not much complexity, but
increases the chance of overrunning the stack size. I'm open to take
another approach.
2024-11-09 22:27:53 +01:00
BlaiZephyr 6bed48a294 fix FindMySQL not finding mysql under NixOS 2024-11-09 19:06:46 +01:00
Dennis Felsing d0fc4af9fb
Merge pull request #9223 from Robyt3/Client-Infomessages-Quadcontainer
Use quad container for race flag in finish infomessages
2024-11-09 11:02:48 +00:00
Robert Müller 7ebaf1b9ad Use quad container for race flag in finish infomessages
Avoid uploading quad for race flag in finish infomessages every frame by adding it to the existing quad container.
2024-11-09 10:56:09 +01:00
Dennis Felsing c8c0c63b8a
Merge pull request #9222 from ChillerDragon/pr_ignore_sqliterc
Ignore ~/.sqliterc in integration tests
2024-11-09 07:49:38 +00:00
ChillerDragon 0929b70d30 Ignore ~/.sqliterc in integration tests
Fixes running tests locally with custom sqliterc such as

.mode table

Which would create a different output format for the select statements
2024-11-09 13:56:28 +08:00
Dennis Felsing b710f32a06
Merge pull request #9220 from KebsCS/pr-rcon-auth-dummy
Auto rcon auth both main and dummy
2024-11-08 22:27:22 +00:00
Dennis Felsing 6a0b0fc04b
Merge pull request #9200 from SollyBunny/cl_hook_coll_size_other
Add cl_hook_coll_size_other & +hookcoll button in UI
2024-11-08 22:26:55 +00:00
KebsCS 1801dbd491
Auto rcon auth both main and dummy 2024-11-08 21:29:19 +01:00
Zwelf 022f101c4b
Merge pull request #9006 from Robyt3/Editor-File-Dialog-Fixes
Fix editor `Save As` confirmation, prevent opening empty filename
2024-11-08 18:49:15 +00:00
Zwelf 73357a45dc
Merge pull request #9020 from ChillerDragon/pr_dbg_sql
Add ``dbg_sql`` config to hide non error sql logs
2024-11-07 22:28:49 +00:00
Dennis Felsing 5d085ede70
Merge pull request #9216 from Robyt3/Client-Map-Background-Fix
Fix incorrect rendering of menu and entities background maps
2024-11-07 20:56:29 +00:00
Robert Müller 1ceb7d0212 Fix incorrect rendering of menu and entities background maps
Load the map images for the menu and entities background maps before the respective map layers. Otherwise, the total number of images is `0` when loading the layers, which causes the images of tiles and quads layers to be considered invalid during the initialization, which results in the wrong tile/quad memory layout being used.

Regression from #9213.
2024-11-07 21:03:45 +01:00
Dennis Felsing 50d8dfeb6a
Merge pull request #9214 from KebsCS/pr-fix-tuning
Fix invalid prediction tuning in tune zone 0
2024-11-07 06:41:50 +00:00
KebsCS eb3b850ba9
Fix invalid prediction tuning in tune zone 0 2024-11-07 00:39:10 +01:00
Dennis Felsing 91ec32b2d7
Merge pull request #9213 from Robyt3/Client-Mapimages-Validation
Improve map image validation
2024-11-06 22:35:29 +00:00
Robert Müller 8f37729f5b Improve map image validation
- Add check for map image data being loaded from map to avoid null pointer access.
- Add check for size of map image data to avoid out-of-bounds reads.
- Add check for map layer item not being found to avoid null pointer access.
- Fix inconsistent handling of layers with invalid images. In some cases only `-1` was considered non-textured whereas all invalid values should be.
- Ensure correct texture is always used for game layers instead of considering the image property of game layers which cannot be set via the map editor.
- Skip loading images which are not used by any quads or tiles layers.
- Replace member variable `m_aTextureUsedByTileOrQuadLayerFlag` with local variable.
- Mark pointers as `const` when possible.
- Avoid C-style casts.
2024-11-06 22:49:09 +01:00
Dennis Felsing fb7d8ab912
Merge pull request #9210 from Robyt3/Client-Mapsounds-Validation
Improve map sound validation and performance
2024-11-06 07:26:24 +00:00
Dennis Felsing b29723dbb5
Merge pull request #9211 from Rei-Tw/bans-find
Implement bans_find command.
2024-11-06 06:51:39 +00:00
Rei-Tw 82b274cc0e Implement bans_find command.
This rcon command simplifies searching for all ban records for a specific IP if the ban list has too many records.
2024-11-06 01:19:23 +01:00
SollyBunny 96b3b70a7d Add cl_hook_coll_size_other & +hookcoll button in UI 2024-11-05 22:33:11 +00:00
Robert Müller 06fcfe03b0 Improve map sound validation and performance
- Add check for map sound data being loaded from map to avoid null pointer access.
- Add check for size of sound source data to avoid out-of-bounds reads.
- Avoid iterating over all groups and layers and then performing a linear search on the sound queue entries every frame to update the sounds. Instead, store a pointer to the respective `CMapItemGroup` for every queue entry, so iterating over the queue once is enough to update all sound queue entries.
- Move check for sound layer index outside of loop as the value does not change.
- Avoid creating source queue entries for sounds that could not be loaded.
- Mark pointers as `const` when possible.
2024-11-05 22:18:48 +01:00
Dennis Felsing c0ff4c35f4
Merge pull request #9208 from Robyt3/Client-Skin07-FindSkin-Cleanup
Refactor `CSkins7` accessor functions and 0.7 skin json parsing
2024-11-05 07:33:22 +00:00
Robert Müller f0c9faf654 Refactor CSkins7 accessor functions and 0.7 skin json parsing
- Combine `CSkins7::FindSkinPart` and `CSkins7::GetSkinPart` functions into `CSkins7::FindSkinPart` function to simplify the usage.
- Replace `CSkins7::Num` and `CSkins7::Get` functions with `CSkins7::GetSkins` function to return all skins to improve readability using for-each loops.
- Replace `CSkins7::NumSkinPart` and `CSkins7::GetSkinPart` functions with `CSkins7::GetSkinParts` function to return all skin parts to improve readability using for-each loops.
- Add `CSkins7::FindSkinPartOrNullptr` function to find a skin by name or return `nullptr` if it's not found. Let the `CSkins7::FindSkinPart` function return the desired part, then the default part, and lastly the placeholder part.
- Add `CSkins7::FindDefaultSkinPart` function to find the default skin part or placeholder skin part (never `nullptr`).
- Remove redundant check for duplicate skin parts. This is already prevented by the `IStorage::ListDirectory` function.
- Remove separate placeholder skin that was being used to initialized every loaded and created skin.
- Remove unused `CSkins7::GetInitAmount` function.
- Add `CSkins7::InitPlaceholderSkinParts` function to initialize the placeholder skin parts. Keep placeholder skin parts separate from normal skin parts, i.e. not in the vectors of parts.
- Rename `CSkins7::AddSkin` function to `AddSkinFromConfigVariables` for clarity about its behavior.
- Fix `CSkins7::RandomizeSkin` function not terminating if there exist only special skin parts for any part type.
- Add `CSkins7::XmasHatTexture` and `CSkins7::BotDecorationTexture` getter functions instead of exposing the respective member variables.
- Improve validation when parsing 0.7 skin json format. Fail loading and log error messages on invalid skin json files instead of silently loading incorrect/incomplete skins.
2024-11-04 23:03:35 +01:00
Dennis Felsing 15cd607a2d
Merge pull request #9206 from def-/GokturkTalha-master
Gokturk talha master
2024-11-04 09:25:22 +00:00
Dennis Felsing 11c10a5358 Fix CMakeLists.txt 2024-11-04 10:06:28 +01:00
Talha Aygün f64ba64298
azerbaijanese > azerbaijani
azerbaijanese > azerbaijani
2024-11-04 11:41:19 +03:00
Talha Aygün 2b4f32ddfe
Update azerbaijanese.txt 2024-11-04 11:35:07 +03:00
Talha Aygün 24c2bb58e3
Update Turkish translation for 18.7 2024-11-04 11:31:53 +03:00