Commit graph

20828 commits

Author SHA1 Message Date
Dennis Felsing f121e1ddaa
Merge pull request #9166 from Robyt3/Editor-IsEntitiesLayer-Use
Use `CLayer::IsEntitiesLayer` function to avoid duplicate code
2024-10-24 21:01:50 +00:00
Robert Müller a93cba1a4f Use CLayer::IsEntitiesLayer function to avoid duplicate code 2024-10-24 22:42:39 +02:00
Dennis Felsing a7a07ad402 Update Persian language by ArAsH 2024-10-24 22:26:59 +02:00
Robert Müller e2df30a59e Add log_*_color macros, deprecate IConsole::Print
Add `log_error_color`, `log_warn_color`, `log_info_color`, `log_debug_color` and `log_trace_color` macros to wrap `log_log_color` function with specific log levels.

Add comment to mark the `IConsole::Print` function as deprecated in favor of the `log_*` functions, which should be preferred for the following reasons:

- They support `printf`-formatting without a separate buffer.
- They support all five log levels.
- They do not require a pointer to `IConsole` to be used.
- Consistency of logging code.
2024-10-23 17:52:54 +02:00
Emir Marincic 5a716ae463
Merge pull request #9163 from Robyt3/Console-Format-Removal
Remove obsolete `IConsole::Format` function, fix `show_ips` output
2024-10-21 22:21:16 +00:00
Robert Müller 66c5609ae4 Remove obsolete IConsole::Format function, fix show_ips output
The `IConsole::Format` function was previously used to format the log and rcon output, but it has become obsolete when the logging was refactored.

The function was still being used to format the output of the `show_ips` command in the rcon, which was causing this particular rcon line to have the old log format (e.g. `[12:34:56][server]: Value: 0`). Now, `IConsole::Print` is used directly, as this causes the output to be sent with the correct format and only to the rcon command user.

The `IConsole::FPrintCallback` function pointer typedef is also obsolete and unused.
2024-10-21 23:35:30 +02:00
Dennis Felsing 74fa79b489
Merge pull request #9162 from Robyt3/Client-TextureHandle-Cleanup
Avoid redundant overwriting of texture handles after unloading
2024-10-21 21:07:49 +00:00
Dennis Felsing 78f5013d93
Merge pull request #9161 from KebsCS/pr-regional-top5team
Fix top5team sql
2024-10-21 21:07:46 +00:00
KebsCS 97af0168eb
Fix top5team sql 2024-10-21 22:14:08 +02:00
Robert Müller 4314608dfb Avoid redundant overwriting of texture handles after unloading
It's not necessary to create a new `CTextureHandle` object after unloading the handle and it's also not necessary to check if the texture handle is valid when unloading it.
2024-10-21 22:07:13 +02:00
Robert Müller d923e58452
Merge pull request #9158 from Jupeyy/pr_unblock_less
Don't block drivers before & equal to 2.0.137.
2024-10-20 09:33:43 +00:00
Jupeyy efc1d2d4d1
Don't block drivers before 2.0.137.
Reported by meep on discord. He apparently uses a driver from around 2020 that also worked
without problems.
2024-10-20 11:14:28 +02:00
Dennis Felsing baddafefa0
Merge pull request #9157 from Robyt3/Client-Settings-Skin-Reveal
Scroll to selected skin when entering name and switching tabs
2024-10-19 21:43:53 +00:00
Robert Müller 9e7ba82507 Scroll to selected skin when entering name and switching tabs
Scroll to reveal the selected skin when entering a skin name and when switching between the player and dummy tabs.
2024-10-19 20:50:10 +02:00
Dennis Felsing 1bd0f4330f
Merge pull request #9155 from Robyt3/Client-LastRaceTick-Cleanup
Move last race tick and current race time handling to `CGameClient`
2024-10-18 20:38:55 +00:00
Robert Müller b724ccc6a6 Move last race tick and current race time handling to CGameClient
Store and update the last race tick directly in `CGameClient` instead of in `CGhost`, as the value is also used in the gameclient.

Move current race time calculation from `CClient` to `CGameClient`, as this function is not used in the engine and this allows removing unnecessary virtual functions.

Closes #1720.
2024-10-18 22:10:58 +02:00
Dennis Felsing 74b485b397
Merge pull request #9153 from Robyt3/Editor-Curvetype-Popup
Add popup to select envelope curve type, support shift+left click
2024-10-17 07:15:53 +00:00
Robert Müller 9a1bd192c4 Add popup to select envelope curve type, support shift+left click
Show popup to select the envelope curve type from a list when right clicking the curve type button, as selecting the curve type by pressing the button multiple times is inconvenient.

Switch to previous curve type on shift+left clicking the curve type button.
2024-10-16 22:31:02 +02:00
Dennis Felsing 3e9ca3314f
Merge pull request #9152 from Robyt3/CLayers-Refactoring
Minor refactoring of `CLayers`
2024-10-15 20:56:55 +00:00
Robert Müller 7ac0a8f6c6 Reduce indent, avoid C style casts in CLayers::InitTilemapSkip 2024-10-15 21:11:31 +02:00
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