Commit graph

19197 commits

Author SHA1 Message Date
heinrich5991 e40c02a6ff
Merge pull request #7783 from Robyt3/Tools-Dummy-Map-Sha-Pointer-Fix
Fix incorrect SHA256 logged in `dummy_map` tool
2024-01-09 19:41:13 +00:00
heinrich5991 8c5210a156
Merge pull request #7782 from Robyt3/Datafile-Zlib-Include-Cleanup
Avoid including `zlib.h` in header file
2024-01-09 19:34:18 +00:00
Robert Müller 36a6c1aaf7 Fix incorrect SHA256 logged in dummy_map tool
The SHA256 was being calculated over a pointer to the map data and random following memory instead of over the data itself.
2024-01-09 19:50:43 +01:00
Robert Müller 80a52cae95 Avoid including zlib.h in header file
By adding `CDataFileWriter::ECompressionLevel` to replace usage of zlib internal compression levels in the `CDataFileWriter` API.

Use `std::numeric_limits<int>::max()` instead of `INT_MAX` in one case where the latter was only declared by the transitive zlib include. The `limits` header is already included and its use is more fitting for C++ code.
2024-01-09 19:36:41 +01:00
Dennis Felsing 0dc9495e80
Merge pull request #7781 from HiRavie/master
Improve text outlines
2024-01-09 10:58:08 +00:00
heinrich5991 9de11a5ecd
Merge pull request #7780 from Robyt3/Serverbrowser-Community-Update-Fix
Fix community not set for servers with missing server info
2024-01-08 21:26:34 +00:00
Robert Müller 6bdc73ad3d Fix community not set for servers with missing server info
The server community was only initialized when receiving server info. This caused servers for which no server info is received to be hidden when using the community filter. Now the community filter also works correctly for servers for which no ordinary server info is received, by initializing the community already when adding server entries to the list.

Closes #7776.
2024-01-08 22:07:24 +01:00
Ravie 2e44c02bbc Improve text outlines 2024-01-08 21:52:14 +01:00
Jupeyy 1377af0921
Merge pull request #7771 from ChillerDragon/pr_routine
Typo routine
2024-01-07 22:19:32 +00:00
Dennis Felsing 48c3981427
Merge pull request #7773 from archimede67/fix-fix-style-script-windows
`fix_style.py`: replace windows path separator with `/`
2024-01-07 17:13:28 +00:00
Chiller Dragon e36f2bf7bc
Fix comment grammar
Co-authored-by: Dennis Felsing <dennis@felsing.org>
2024-01-07 18:05:12 +01:00
Corantin H 2e1d44dc23 Use realpath when comparing paths 2024-01-07 17:47:42 +01:00
Learath2 9b3ebf3f1b Remove debug statement, fix CI 2024-01-07 17:48:48 +03:00
Dennis Felsing d6c10233ed
Merge pull request #7772 from Robyt3/Config-Save-Error-Improvements
Improve error messages when saving settings fails
2024-01-07 13:55:38 +00:00
Robert Müller a80d875e85 Improve error log messages when saving settings fails
Log separate messages for `io_sync` error, `io_close` error and general write errors.
2024-01-07 12:24:07 +01:00
Robert Müller 43b1e5cb1f Improve warning popup message when saving settings fails
The message was previously showing an incorrect filename.
2024-01-07 12:23:58 +01:00
ChillerDragon b10030391d Typo routine 2024-01-07 12:19:58 +01:00
Dennis Felsing fda996014b
Merge pull request #7767 from furo321/fix-hookcoll-spec
Fix hook collision line being incorrect while paused.
2024-01-07 00:15:23 +00:00
Dennis Felsing 6bcaa6cc38
Merge pull request #7768 from heinrich5991/pr_ddnet_refactor_netobj_inheritance
Refactor code around inherited net objects, add it to 0.7 code
2024-01-07 00:15:04 +00:00
heinrich5991 7aba25d3f7
Merge pull request #7747 from Robyt3/Map-UUID-Unknown-Handling
Propagate unknown UUID-based map items in map tools
2024-01-06 22:18:30 +00:00
heinrich5991 d3123a479b Refactor code around inherited net objects, add it to 0.7 code 2024-01-06 22:46:57 +01:00
Robert Müller ce47d01998
Merge pull request #7761 from swarfeya/master
fix happy ddnet birthday broadcast (#7758)
2024-01-06 20:45:52 +00:00
Robert Müller 999119c60f Propagate unknown UUID-based map items in map tools
Adapt the `CDataFileReader::GetItem` function so it optionally also returns a `CUuid` for UUID-based map items, including for items with unknown UUIDs where the item type will be `-1`. Adapt the `CDataFileWriter::AddItem` function so it optionally also accepts a `CUuid` which will be used if the item type is `-1`.

The additional checks for invalid map item types in the map tools are removed again and instead the new UUID parameters are used so map items with unknown UUIDs are written back to maps correctly.

Closes #7701.
2024-01-06 21:25:15 +01:00
furo e025c184af Fix hook collision line being incorrect while paused. 2024-01-06 20:45:14 +01:00
Chairn fe87fe6a3f
Merge pull request #7766 from Robyt3/Windows-File-Write-Truncation
Fix files not being truncated when opening for writing on Windows
2024-01-06 15:14:25 +00:00
swarfeya a9b19ff2a7 Increment m_SentSnaps inside of FakeSnap() 2024-01-06 16:02:43 +01:00
Robert Müller 1861e922b2 Fix files not being truncated when opening for writing on Windows
Files were not being truncated on Windows anymore when using `io_open` with `IOFLAG_WRITE` due to a regression from #7254. Instead, the existing file contents were kept and the file pointer was set to the beginning of the file.

This caused broken demo files to be created (#7349) when recording a shorter demo with the same filename as an existing longer demo. It also caused the map tools to produce maps with additional junk data at the end, if an existing map is overridden by a smaller map.

This is fixed by using the creation disposition `CREATE_ALWAYS` instead of `OPEN_EXISTING` with [`CreateFileW`](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew), which ensures that a file is always created and truncated.

A regression test case is added, which fails without this change.
2024-01-06 15:32:21 +01:00
Dennis Felsing c5d6389132
Merge pull request #7764 from heinrich5991/pr_ddnet_msg_groups
Group a couple of "list" messages
2024-01-05 18:34:39 +00:00
Dennis Felsing af6fe4183c
Merge pull request #7566 from heinrich5991/pr_ddnet_rust_1_48
Set MSRV to Rust 1.63.0
2024-01-05 18:10:49 +00:00
heinrich5991 9e9da7db28 Set MSRV to Rust 1.63.0 2024-01-05 18:54:16 +01:00
heinrich5991 ac041d7f34 Group CNetMsg_Sv_CommandInfo 2024-01-05 18:10:57 +01:00
heinrich5991 f81828e78e Group CNetMsg_Sv_VoteOptionListAdd 2024-01-05 18:10:57 +01:00
heinrich5991 c12835bc39 Group NETMSG_RCON_CMD_ADD 2024-01-05 18:10:57 +01:00
heinrich5991 0f3993953e
Merge pull request #7763 from Robyt3/Editor-FormatTmpPath
Use `IStorage::FormatTmpPath` function for editor map names
2024-01-05 17:06:07 +00:00
Robert Müller a55d49833e Use IStorage::FormatTmpPath function for editor map names 2024-01-05 17:46:26 +01:00
swarfeya d04cb7a36a actually fix happy ddnet message 2024-01-04 18:36:32 +01:00
Dennis Felsing 424d789f47
Merge pull request #7760 from Robyt3/Editor-Front-KillTile-Explain
Fix missing editor explanation for kill tile in front layer
2024-01-04 17:01:03 +00:00
Robert Müller 84f3bb5a4d Fix missing editor explanation for kill tile in front layer
The kill tile can also be used in the front layer and works as expected.
2024-01-04 17:42:53 +01:00
Dennis Felsing ca9c4f532a
Merge pull request #7757 from Robyt3/Graphics-LoadTexture-Move
Avoid copying texture memory when possible
2024-01-04 11:32:42 +00:00
Dennis Felsing 4f89a4d3fd
Merge pull request #7749 from archimede67/editor-fix-autosave-crash
Fix crash on editor autosave, add system method `timestamp_from_str`
2024-01-04 11:17:08 +00:00
Robert Müller abc7b602b2 Avoid copying texture memory when possible
Add separate `IGraphics::LoadTextureRawMove` function with non-`const` `void *pData` argument in addition to existing `LoadTextureRaw` function with `const void *pData` argument. The former function takes ownership of the data and avoids copying the texture data into an additional buffer, if the texture data is already in RGBA format. Non-RGBA texture data always needs to be converted and therefore also copied.

The `LoadTextureRaw` function is split into smaller functions to share common code with the `LoadTextureRawMove` function. Alternatively to this, a flag `TEXLOAD_MOVE_DATA` could have been added to the existing `LoadTextureRaw` function, which would have required the use of `const_cast` to free the texture data.
2024-01-03 23:03:04 +01:00
Corantin H 3c9294321e Fix crash on editor autosave
Add system method `timestamp_from_str` and add tests.
Replace `int64_t` with `time_t` to be more consistent.
2024-01-02 23:38:41 +01:00
heinrich5991 022cae6f20
Merge pull request #7753 from Robyt3/Client-Assertion-Handler-Crash-Fix
Fix crash in assertion handler after client/graphics destroyed
2024-01-02 18:42:15 +00:00
Robert Müller e27bf7b6c1 Fix crash in assertion handler after client/graphics destroyed
Unset the assertion handler before shutting down the kernel (including graphics) and client. Otherwise the assertion handler itself crashes when assertion errors happen after the graphics/client have been destroyed.
2024-01-02 19:20:57 +01:00
Dennis Felsing a8146afa77
Merge pull request #7752 from Robyt3/Menus-Vote-Selection-Reset
Fix wrong selection in vote menu when selected player leaves
2024-01-02 17:39:26 +00:00
Robert Müller c99d77ab84 Fix wrong selection in vote menu when selected player leaves
The selection in the kickvote/specvote menu was reset to the first player when the previously selected player leaves or if the filter string does not match it. Now the selection is cleared in these cases, to prevent players from accidentally starting kickvotes/specvotes on the wrong player.

Remove unnecessary `static` variable. Improve readability by not nesting post-increment in another statement.
2024-01-02 18:10:48 +01:00
Emir Marincic 5cee4177cd
Merge pull request #7751 from ChillerDragon/pr_setalldmgfields
Explicitly set all 0.7 dmg event fields
2024-01-02 13:58:40 +00:00
ChillerDragon 81c43ded42 Explicitly set all 0.7 dmg event fields 2024-01-02 13:40:13 +01:00
Robert Müller caeebaf4a0
Merge pull request #7748 from archimede67/fix-editor-value-selector-input-corners
Editor: fix input corners when editing value selector
2023-12-31 11:28:47 +00:00
Corantin H 454b4e4a1e Respect corners when doing edit box when rendering value selector 2023-12-31 12:07:21 +01:00