Commit graph

20808 commits

Author SHA1 Message Date
Robert Müller e0461f4c21 Combine CLayers::Init and CLayers::InitBackground functions
The `CLayers::InitBackground` function implemented a subset of the `CLayers::Init` function, only loading the game layers and not the other entities layers, so a Boolean parameter can be used to reduce the duplicate code.
2024-10-15 21:11:31 +02:00
Robert Müller b991a44b40 Rename variables l/g to LayerIndex/GroupIndex 2024-10-15 21:11:24 +02:00
heinrich5991 8290db97b8
Merge pull request #9142 from ChillerDragon/pr_07_fav_urls
Store 0.7 favorites in url format
2024-10-14 15:38:54 +00:00
heinrich5991 c829639d65
Merge pull request #9123 from Robyt3/Client-Skin-Download-Refactoring
Improve skin downloading: load from `downloadedskins` if possible
2024-10-14 15:37:35 +00:00
Dennis Felsing 0f074aa773 Fix top5team sql 2024-10-14 17:33:23 +02:00
Dennis Felsing e21915074c
Merge pull request #9149 from dobrykafe/pr-nameplates-preview
Add nameplates preview
2024-10-13 21:44:37 +00:00
Dennis Felsing de7cd8571f
Merge pull request #9148 from Robyt3/Demo-Envelope-Update-Cleanup
Cleanup envelope updating during demo playback
2024-10-13 21:25:16 +00:00
Dennis Felsing c3e627e443 Fix clang-tidy 2024-10-13 23:24:31 +02:00
dobrykafe f3473c7f73 add nameplates preview 2024-10-13 19:33:36 +02:00
Robert Müller e725432a7f Cleanup envelope updating during demo playback
The additional code to evaluate envelopes during demo playback is obsolete, as client ticks are already properly synchronized with the demo playback.

From teeworlds/teeworlds#2750 and teeworlds/teeworlds#2768.
2024-10-13 17:45:38 +02:00
Emir Marincic 2788f12634
Merge pull request #9146 from Robyt3/Http-Wait-Condition-Lock
Ensure lock is held when modifying condition of condition variable
2024-10-13 13:32:23 +00:00
Robert Müller 21e0cdd0bc Ensure lock is held when modifying condition of condition variable
See #9145.
2024-10-13 15:09:51 +02:00
Dennis Felsing a397688c38
Merge pull request #9145 from Robyt3/Http-Request-Wait-Condition
Avoid busy waiting in `CHttpRequest::Wait` function
2024-10-13 11:08:43 +00:00
Robert Müller ad8349b7e9 Avoid busy waiting in CHttpRequest::Wait function
Use a condition variable instead of busy waiting until HTTP requests are done.

Also set the state `EHttpState::RUNNING` which was previously unused.

Closes #7811.
2024-10-13 12:48:24 +02:00
Dennis Felsing 34015ea744
Merge pull request #9143 from KebsCS/pr-command-argument-validation
Fix toggle arg validation
2024-10-12 20:46:09 +00:00
KebsCS cd96eea8ce
Fix toggle arg validation 2024-10-12 21:02:17 +02:00
ChillerDragon 0c797893d5 Store 0.7 favorites in url format 2024-10-12 19:19:43 +09:00
Dennis Felsing 08ec4dd7cf
Merge pull request #9141 from Robyt3/Android-Build-x64-Fix
Fix Android build when first building `x64` architecture
2024-10-12 09:06:00 +00:00
Robert Müller 1828b5b29b Fix Android build when first building x64 architecture
The argument `x64` is an alias for `x86_64` but the name of the build folder always contains `x86_64`, so the `data` folder and certificate were not being found when using the `x64` argument, unless another architecture was previously built.
2024-10-12 10:07:14 +02:00
ChillerDragon bb53b9eae0 Revert "Fix 0.7 server favorites"
This reverts commit 4c57f2d9f8.
2024-10-12 15:13:14 +09:00
Dennis Felsing 0d76b482ee
Merge pull request #9140 from Robyt3/Server-Demos-Filename-Fix
Fix server-side demos with maps in folders, make `CServer::GetMapName` function more efficient by caching
2024-10-11 20:23:53 +00:00
Robert Müller ab60d0bf70 Fix server-side demos with maps in folders
When maps are loaded from folders on the server, the same folders were used for demos but recording would usually fail due to the folders not existing in the demos folder.

Furthermore, the map name being written in the demo header also included the folder names, which causes the client to not find the map unless it also exists at that location.

Closes #9033.
2024-10-11 21:36:32 +02:00
Robert Müller e24b87adbd Make CServer::GetMapName function more efficient by caching
Store the current map filename (without path) separately when loading a new map instead of determining it again each time that the `CServer::GetMapName` function is called.

Use the `fs_filename` function for this.

Avoid the usage of the `sv_map` config variable for this, which may have caused the returned map filename to be out-of-sync with the real map on the server due to the map specified by the config variable not being reloaded immediately.
2024-10-11 21:35:36 +02:00
Dennis Felsing 37761b6d1b
Merge pull request #9137 from KebsCS/pr-flags
Add Antarctica flag, update some existing flags
2024-10-11 12:49:42 +00:00
KebsCS 3c9d92a527
Add Antarctica flag, update some existing flags 2024-10-11 14:29:59 +02:00
Dennis Felsing 52d860a823
Merge pull request #9135 from furo321/no-delay-rescue
Don't check `sv_rescue_delay` in practice
2024-10-11 06:31:41 +00:00
Dennis Felsing e47bf55051
Merge pull request #9052 from ChillerDragon/pr_fav7
Fix 0.7 server favorites
2024-10-11 06:31:28 +00:00
Dennis Felsing 8cee3a6275
Merge pull request #8889 from KebsCS/pr-regional-top5team
Add regional rankings to /top5team
2024-10-11 06:26:38 +00:00
Dennis Felsing e4a3631bf4
Merge pull request #9138 from furo321/tiles-hookcoll-preview
Render hookable and unhookable tiles for hook collision preview
2024-10-11 06:26:16 +00:00
Dennis Felsing 5abd96c1d8
Merge pull request #9139 from Robyt3/Client-CTeeRenderInfo-Usage-Cleanup
Refactor `CTeeRenderInfo` usage
2024-10-11 06:25:39 +00:00
furo 9fdb246724 Render hookable and unhookable tiles for hook collision preview 2024-10-11 01:09:38 +02:00
KebsCS 279b14cc44
Add regional rankings to /top5team 2024-10-11 00:09:32 +02:00
Robert Müller 3f829b4ac2 Refactor CTeeRenderInfo usage
- Add `CTeeRenderInfo::ApplyColors` function to reduce duplicate code.
- Use `CTeeRenderInfo::Apply` function in more cases.
- Use `CSkins::Find` function instead of implementing default skin handling manually with the `FindOrNullptr` function for chat settings preview.
- Remove redundant initialization of `CTeeRenderInfo::m_CustomColoredSkin` member.
- Replace empty client skin with `default` instead of checking for empty skin names later.
- Remove unnecessary check for empty skin name for ghost rendering. The `CSkins::Find` function will return the default skin for an empty skin name, which is more correct than invalidating the ghost skin render info.
2024-10-10 23:29:38 +02:00
Robert Müller 85b836723a
Merge pull request #9136 from KebsCS/pr-hook-coll-preview
Add hook collisions preview
2024-10-10 20:43:26 +00:00
KebsCS bfe2e4dc80
Add hook collisions preview 2024-10-10 22:23:03 +02:00
Robert Müller f2090d6551
Merge pull request #8961 from KebsCS/pr-teleport-numbers
Change editor teleport number behavior
2024-10-10 17:26:51 +00:00
furo a4bb1ec0dc Don't check sv_rescue_delay in practice 2024-10-10 15:39:47 +02:00
Dennis Felsing 56737ccc1c
Merge pull request #9130 from ChillerDragon/pr_clang_data_pointer
Use .data() in mysql code for better readability
2024-10-10 09:58:48 +00:00
KebsCS a2fedd0589
Change editor teleport number behavior 2024-10-10 01:34:39 +02:00
ChillerDragon 1bf350c6f8 Use .data() in mysql code for better readability
Fixes https://clang.llvm.org/extra/clang-tidy/checks/readability/container-data-pointer.html
2024-10-10 08:18:51 +09:00
Robert Müller 181b6d8b9c Improve skin downloading: load from downloadedskins if possible
Previously, skins not found in the `skins` folder were downloaded from the configured URL and saved to the `downloadedskins` folder, but the saved files were never used, leading to wasted downloads and write operations.

Now, if a skin to be downloaded already exists in the `downloadedskins` folder, the modified time of the skin file is determined and included in the HTTP GET request as `If-Modified-Since` header. If the file was not modified on the server since that time, the server will answer with status 304 Not Modified and an empty response body, in which case the existing skin file is loaded. If the skin file was modified, then it will be downloaded like usual. The download will also be retried without including the `If-Modified-Since` header, if the local file is more recent but it failed to be loaded. If a skin could not be downloaded when it should but a file already exists in the `downloadedskins` folder then that file will be loaded instead.

Instead of checking whether the number of skins is different to determine whether to reload the list of skins in the settings menus, the last time that the list of skins was refreshed is now saved and compared, which is more robust. The additional check to refresh the skin list while skins are being downloaded is unnecessary, as any updates to the skin list are now covered by checking the last refresh time.
2024-10-09 22:56:44 +02:00
Dennis Felsing 76e7317685
Merge pull request #9114 from Pioooooo/infjump-command
Add rcon commands (un)infinite_jump, practice commands /(un)infjump
2024-10-09 20:27:03 +00:00
Emir Marincic 94b23af0d0
Merge pull request #9133 from heinrich5991/pr_ddnet_2048_bans
Allow 2048 bans, we hit the limit of 1024…
2024-10-09 19:09:13 +00:00
heinrich5991 7e04b8c521 Allow 2048 bans, we hit the limit of 1024… 2024-10-09 20:47:20 +02:00
Dennis Felsing a9e52d2b7b
Merge pull request #9131 from ChillerDragon/pr_fix_mysql_null_bind
Fix empty vector element access in mysql prepare
2024-10-09 07:33:42 +00:00
ChillerDragon f7955a50e6 Fix empty vector element access in mysql prepare
If the sql statement does not contain placeholders
``NumParameters`` can be empty.

In that case accessing the first element will cause an asan error:

```
runtime error: reference binding to null pointer of type 'st_mysql_bind'
```
2024-10-09 09:48:42 +09:00
Dennis Felsing 4dbf9a1d54
Merge pull request #9025 from dobrykafe/pr-fix-reset-file-crash
Fix `CFGFLAG_STORE` commands not getting stored when executed from reset file
2024-10-08 06:55:59 +00:00
Dennis Felsing 5fd083c674
Merge pull request #9127 from dobrykafe/pr-adjust-console-search
Adjust console search behaviour
2024-10-07 22:20:10 +00:00
dobrykafe bde82d57d9 adjust console search behaviour 2024-10-07 23:45:08 +02:00
Dennis Felsing 46abb54eb3
Merge pull request #9125 from KebsCS/pr-command-argument-validation
Fix color validation in some commands
2024-10-07 14:28:46 +00:00