New AudioStatics class and WeaponDef improvements#1
Conversation
|
Important Review skippedToo many files! This PR contains 291 files, which is 141 over the limit of 150. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (291)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughSound loading logic was extracted from WeaponDef into a new SoundStatics utility. WeaponDef now delegates sound parsing to SoundStatics::LoadSound. New header/source and CMake entries were added to include the SoundStatics implementation and audio sources. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
rts/Sim/Weapons/WeaponDef.cpp (1)
586-587: Consider precomputing hash constants for readability.The hash comparisons at line 587 compute hashes of string literals inline. While compilers may optimize these, precomputing them as named constants would improve code readability and make the intent clearer.
Consider this refactor:
+ static const uint32_t HASH_SOUND_HIT_WET = hashString("soundHitWet"); + static const uint32_t HASH_SOUND_HIT_DRY = hashString("soundHitDry"); + uint32_t hash = hashString(soundKey.c_str()); - bool useHitFallback = hash == hashString("soundHitWet") || hash == hashString("soundHitDry"); + bool useHitFallback = hash == HASH_SOUND_HIT_WET || hash == HASH_SOUND_HIT_DRY;
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @Majavaa. * #1 (comment) The following files were modified: * `rts/Sim/Weapons/WeaponDef.cpp`
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
rts/Audio/AudioStatics.cpp(1 hunks)rts/Audio/AudioStatics.h(1 hunks)rts/Sim/Weapons/WeaponDef.cpp(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
rts/Audio/AudioStatics.h (1)
rts/Audio/AudioStatics.cpp (2)
ShouldUseHitFallback(10-12)ShouldUseHitFallback(10-10)
rts/Sim/Weapons/WeaponDef.cpp (1)
rts/Audio/AudioStatics.cpp (2)
ShouldUseHitFallback(10-12)ShouldUseHitFallback(10-10)
🔇 Additional comments (3)
rts/Audio/AudioStatics.cpp (1)
10-12: LGTM!The implementation is clean and efficient. Using
findwith comparison toend()is the idiomatic way to check set membership in C++.rts/Sim/Weapons/WeaponDef.cpp (2)
18-18: LGTM!The include path is appropriate for accessing the new
AudioStaticsutility.
584-620: Overall refactoring looks good.The new unified sound loading flow correctly:
- Uses
AudioStatics::ShouldUseHitFallbackto determine hit-fallback applicability- Tries direct file first, returning early if found
- Falls back to subtable lookup with hit-fallback support
- Finally attempts string fallback for hit sounds
The logic on line 600 (
!tbl.IsValid() && useHitFallback) is correct per the previous review discussion—the fallback table is only used when the specific table doesn't exist.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
rts/Sim/Weapons/WeaponDef.cpp (1)
567-572: LGTM! Minor spacing inconsistency in function calls.The delegation to
AudioStatics::LoadSoundis correct and successfully centralizes sound loading logic. BothsoundHitDryandsoundHitWetloading into the samehitSoundGuiSoundSet is appropriate for sound variation support.Minor: Fix spacing for consistency
void WeaponDef::ParseWeaponSounds(const LuaTable& wdTable) { RECOIL_DETAILED_TRACY_ZONE; - AudioStatics::LoadSound(wdTable, "soundStart" , fireSound); - AudioStatics::LoadSound(wdTable, "soundHitDry", hitSound); - AudioStatics::LoadSound(wdTable, "soundHitWet", hitSound); + AudioStatics::LoadSound(wdTable, "soundStart", fireSound); + AudioStatics::LoadSound(wdTable, "soundHitDry", hitSound); + AudioStatics::LoadSound(wdTable, "soundHitWet", hitSound); }rts/Audio/AudioStatics.cpp (1)
1-10: Remove unused include and fix spacing.Line 8 includes
<unordered_set>butstd::unordered_setis not used anywhere in this file. Onlystd::unordered_mapis used (forsoundFallbackMap). Additionally, line 38 has a spacing issue.🔎 Apply these diffs:
Remove unused include:
#include "System/Log/ILog.h" -#include <unordered_set> #include <string> #include <cstdint>Fix spacing at line 38:
- std::string fallbackKey= AudioStatics::GetSoundFallbackKey(key); + std::string fallbackKey = AudioStatics::GetSoundFallbackKey(key);
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
rts/Audio/AudioStatics.cpp(1 hunks)rts/Audio/AudioStatics.h(1 hunks)rts/Sim/Weapons/WeaponDef.cpp(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
rts/Audio/AudioStatics.h (1)
rts/Audio/AudioStatics.cpp (4)
GetSoundFallbackKey(22-29)GetSoundFallbackKey(22-22)LoadSound(31-77)LoadSound(31-35)
rts/Sim/Weapons/WeaponDef.cpp (1)
rts/Audio/AudioStatics.cpp (2)
LoadSound(31-77)LoadSound(31-35)
🪛 Cppcheck (2.18.0)
rts/Audio/AudioStatics.cpp
[error] 63-63: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
🔇 Additional comments (1)
rts/Audio/AudioStatics.cpp (1)
31-77: LGTM! Sound loading logic is well-structured.The implementation correctly handles:
- Direct sound file loading with volume control
- Multi-file table-based loading
- Recursive fallback resolution with appropriate logging
The centralization of sound loading logic successfully addresses the issues noted in previous reviews.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
rts/Audio/AudioStatics.cpp (2)
17-20: Add missing scope qualifier for static member definition.The static member
soundFallbackMapmust be defined with the class scope qualifierAudioStatics::. The current code creates a file-scope variable instead of defining the class member, causing linker errors.🔎 Apply this diff:
-const std::unordered_map<uint32_t, std::string> soundFallbackMap = { +const std::unordered_map<uint32_t, std::string> AudioStatics::soundFallbackMap = { {hashString("soundHitWet"), "soundHit"}, {hashString("soundHitDry"), "soundHit"} };
22-29: Add missing scope qualifier for static member function definition.The static member function
GetSoundFallbackKeymust be defined with the class scope qualifierAudioStatics::. The current code defines a free function instead of the class member, causing linker errors at line 38 whereAudioStatics::GetSoundFallbackKeyis called.🔎 Apply this diff:
-std::string GetSoundFallbackKey(const std::string& soundKey) { +std::string AudioStatics::GetSoundFallbackKey(const std::string& soundKey) { uint32_t keyHash = hashString(soundKey.c_str()); auto it = soundFallbackMap.find(keyHash); if (it != soundFallbackMap.end()) { return it->second; } return ""; }
🧹 Nitpick comments (2)
rts/Audio/AudioStatics.cpp (2)
38-38: Fix spacing around assignment operator.Missing space after
=in variable assignment.🔎 Apply this diff:
- std::string fallbackKey= AudioStatics::GetSoundFallbackKey(key); + std::string fallbackKey = AudioStatics::GetSoundFallbackKey(key);
54-63: Move success log after sound file is added.Line 60 logs "Successfully loaded sound file" before the file is actually added to the sound set at line 61. This is misleading—the log should either be moved after line 61 or reworded to indicate intent rather than completion.
🔎 Apply this diff:
for (int i = 1; i <= MAX_SOUND_FILES; i++) { soundFile = soundTable.GetString(i, ""); if (soundFile.empty()) break; - LOG_L(L_DEBUG, "[AudioStatics::%s] Successfully loaded sound file: %s with volume: %f", __func__, soundFile.c_str(), volume); CommonDefHandler::AddSoundSetData(soundSet, soundFile, volume); + LOG_L(L_DEBUG, "[AudioStatics::%s] Successfully loaded sound file: %s with volume: %f", __func__, soundFile.c_str(), volume); success = true; }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
rts/Audio/AudioStatics.cpp(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
rts/Audio/AudioStatics.cpp (1)
rts/Game/UnsyncedGameCommands.cpp (1)
LOG_L(1219-1222)
🪛 Cppcheck (2.18.0)
rts/Audio/AudioStatics.cpp
[error] 63-63: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
rts/Audio/AudioStatics.h (1)
4-7: Add missing headers and remove unused include.Line 11 declares
std::unordered_map<uint32_t, std::string>but<unordered_map>and<string>are not included. Line 5 includes<lualib.h>which is not used in this header.🔎 Apply this diff to fix the includes
#ifndef AUDIOSTATICS_H #define AUDIOSTATICS_H #include <cstdint> -#include <lualib.h> +#include <string> +#include <unordered_map> #include "Lua/LuaParser.h" #include "Sim/Misc/GuiSoundSet.h"
🧹 Nitpick comments (4)
rts/Audio/AudioStatics.cpp (4)
8-8: Remove unused<unordered_set>header.The
<unordered_set>header is included butstd::unordered_setis not used anywhere in this implementation. The recursion guard was implemented using the depth parameter instead.🔎 Proposed fix
#include "Sim/Misc/GuiSoundSet.h" #include "System/Log/ILog.h" -#include <unordered_set> #include <string> #include <cstdint>
39-39: Minor style issue: missing space after assignment operator.Line 39 has
fallbackKey=instead offallbackKey =.🔎 Proposed fix
- std::string fallbackKey= GetSoundFallbackKey(key); + std::string fallbackKey = GetSoundFallbackKey(key);
46-46: Consider using L_DEBUG for less verbose logging.The successful load messages (lines 46, 61) and fallback attempts (lines 72, 79, 84) log at
L_INFOlevel, which may be too verbose for production. Consider usingL_DEBUGfor routine sound loading operations and reserveL_INFOfor more significant events.Also applies to: 61-61, 72-72, 79-79, 84-84
15-15: Consider making MAX_SOUND_FILES constexpr.The constant could be
constexprinstead ofstatic const intfor modern C++ style, or could be moved to the class as a private member if preferred.🔎 Possible alternatives
-static const int MAX_SOUND_FILES = 8; +static constexpr int MAX_SOUND_FILES = 8;Or as a class member in AudioStatics.h:
class AudioStatics { private: static constexpr int MAX_SOUND_FILES = 8; // ... };
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
rts/Audio/AudioStatics.cpp(1 hunks)rts/Audio/AudioStatics.h(1 hunks)rts/Audio/CMakeLists.txt(1 hunks)rts/CMakeLists.txt(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
rts/Audio/AudioStatics.h (1)
rts/Audio/AudioStatics.cpp (4)
GetSoundFallbackKey(22-29)GetSoundFallbackKey(22-22)LoadSound(31-86)LoadSound(31-36)
🪛 Cppcheck (2.18.0)
rts/Audio/AudioStatics.cpp
[error] 63-63: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
[error] 85-85: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
🔇 Additional comments (6)
rts/Audio/CMakeLists.txt (1)
1-4: LGTM!The CMake configuration correctly exposes the Audio module sources to the parent scope for integration into the engine build.
rts/CMakeLists.txt (2)
131-131: LGTM!The Audio subdirectory is properly added to the build system.
148-148: LGTM!The Audio module sources are correctly integrated into the engine build.
rts/Audio/AudioStatics.h (1)
9-20: LGTM!The class structure is well-designed with appropriate static utility methods and a private fallback mapping.
rts/Audio/AudioStatics.cpp (2)
17-20: LGTM!The fallback map is correctly defined with the class scope qualifier and provides appropriate sound fallback mappings.
22-29: LGTM!The fallback key lookup is correctly implemented with proper scope qualification.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
rts/Audio/AudioStatics.cpp (1)
61-62: Log ordering is inconsistent with the pattern used elsewhere.The log on line 61 claims "Successfully loaded" before
AddSoundSetDataexecutes on line 62. This is inconsistent with lines 45-46 where the operation precedes the log. Consider swapping the order for consistency.🔎 Proposed fix
- LOG_L(L_INFO, "[AudioStatics::%s] Successfully loaded sound file: %s with volume: %f", __func__, soundFile.c_str(), volume); CommonDefHandler::AddSoundSetData(soundSet, soundFile, volume); + LOG_L(L_INFO, "[AudioStatics::%s] Successfully loaded sound file: %s with volume: %f", __func__, soundFile.c_str(), volume); success = true;
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
rts/Audio/AudioStatics.cpp(1 hunks)
🧰 Additional context used
🪛 Cppcheck (2.18.0)
rts/Audio/AudioStatics.cpp
[error] 63-63: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
[error] 85-85: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
🔇 Additional comments (4)
rts/Audio/AudioStatics.cpp (4)
1-15: LGTM!The includes are properly organized with all necessary headers, including
<unordered_set>which was previously flagged. The log section and constant definitions are appropriate.
17-20: LGTM!The static map is now correctly defined with the
AudioStatics::scope qualifier. The compile-time hash-based lookup for fallback keys is an efficient approach.
22-29: LGTM!The function is correctly scoped and provides efficient hash-based lookup for fallback keys.
71-85: LGTM!The depth-limiting logic is now correctly implemented: checking
depth == 0before decrementing (avoiding the unsigned underflow issue), and properly passing the decremented depth to the recursive call.Regarding the static analysis hint about "iterator to local container 'v'" at lines 63 and 85: this is a false positive—there is no container
vin this file.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
rts/Audio/AudioStatics.cpp (2)
36-36: Optional: Consider lazy-loading the fallback key.The fallback key is computed at line 36 but only used starting at line 68 if both direct string and subtable loading fail. Moving the computation to just before line 68 would avoid the hash lookup in the common case where sound loading succeeds.
🔎 Proposed optimization
RECOIL_DETAILED_TRACY_ZONE; - std::string fallbackKey = GetSoundFallbackKey(key); - float volume = table.GetFloat(key + "Volume", 1.0f); // ... existing direct string and subtable logic ... + std::string fallbackKey = GetSoundFallbackKey(key); + if (fallbackKey.empty()) { LOG_L(L_INFO, "[AudioStatics::%s] Sound file not found: %s, there is no fallback to try, not adding sound-set", __func__, key.c_str()); return false; }
43-43: Optional: Consider adjusting log levels for production.Currently, all log messages use
L_INFO, which provides good visibility during development. Once the feature is stable, you might consider:
L_DEBUGfor successful loads (lines 43, 59) to reduce verbosityL_WARNINGfor fallback attempts and failures (lines 69, 74, 80) to highlight unexpected conditionsThe current logging is fine for initial deployment and debugging.
Also applies to: 59-59, 69-69, 74-74, 80-80
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
rts/Audio/AudioStatics.cpp(1 hunks)rts/Audio/AudioStatics.h(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
rts/Audio/AudioStatics.h (1)
rts/Audio/AudioStatics.cpp (4)
GetSoundFallbackKey(19-26)GetSoundFallbackKey(19-19)LoadSound(28-82)LoadSound(28-33)
🪛 Cppcheck (2.18.0)
rts/Audio/AudioStatics.cpp
[error] 63-63: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
🔇 Additional comments (6)
rts/Audio/AudioStatics.h (1)
1-25: LGTM! Header is well-structured.The header file is clean and properly organized:
- Include guard correctly implemented
- All necessary headers included without unused dependencies
- Class interface clearly defined with appropriate access specifiers
- Static members and methods properly declared
All previous concerns have been addressed.
rts/Audio/AudioStatics.cpp (5)
1-12: LGTM! Includes and logging setup are correct.All necessary headers are included, and the LOG_SECTION_CURRENT macro appropriately categorizes log messages under "Audio".
14-17: LGTM! Fallback map properly defined.The static member is correctly defined with the
AudioStatics::scope qualifier, and the fallback mappings are sensible (both wet and dry variants fall back to the generic hit sound).
19-26: LGTM! Fallback key lookup is correctly implemented.The function properly hashes the key, performs the map lookup, and returns either the fallback key or an empty string. The scope qualifier is correct.
28-82: Depth limiting logic is now correct.The recursion guard has been properly fixed:
- Depth is checked against 0 before decrementing (line 73)
- Decremented depth is correctly passed to the recursive call (line 81)
- This prevents infinite recursion even with cyclic or long fallback chains
The overall loading logic is sound: attempts direct string, then subtable array, then falls back with depth limit.
63-63: Static analysis false positive - no issue here.The static analysis tool reports an invalid iterator issue at this line, but line 63 is simply
if (success) {with no iterator or container involved. This is a false positive and can be safely ignored.
…son#2692) * Speculatively handle SDL_WINDOWEVENT_DISPLAY_CHANGED. Also add logging to TextureRenderAtlas finalization calls to track the issue better. This is regards to beyond-all-reason#2661 * Replace SDL_WINDOWEVENT_DISPLAY_CHANGED missing in Linux headers with its surrogate * Unlikely to fix beyond-all-reason#2661 but might give additional clues
* add rmlui resource tracking --------- Co-authored-by: sprunk <spr.ng@o2.pl>
…rst time, there's a chance to recover
* some datamodel fixes * length functions * combine pairs function creation * allow for array set
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
rts/System/Sound/SoundStatics.h (1)
1-2: Header guard name doesn't match class name.The header guard uses
AUDIOSTATICS_Hbut the class is namedSoundStatics. Consider updating the guard toSOUNDSTATICS_Hfor consistency, or if "AudioStatics" was the intended name, the class should be renamed.🔎 Proposed fix
-#ifndef AUDIOSTATICS_H -#define AUDIOSTATICS_H +#ifndef SOUNDSTATICS_H +#define SOUNDSTATICS_HAnd at the end of the file:
-#endif +#endif // SOUNDSTATICS_Hrts/System/Sound/SoundStatics.cpp (2)
1-10: Remove redundant include.Line 8 includes
<string>, but this is already included inSoundStatics.h(line 5). While harmless, removing redundant includes improves clarity.🔎 Proposed fix
#include "SoundStatics.h" #include "System/Misc/TracyDefs.h" #include "System/StringHash.h" #include "Lua/LuaParser.h" #include "Sim/Misc/CommonDefHandler.h" #include "Sim/Misc/GuiSoundSet.h" #include "System/Log/ILog.h" -#include <string> #include <cstdint>
36-36: Volume is applied uniformly to all sound variations.The volume is read once and applied to all sound files in the array (lines 40, 56). This means all sound variations in a table share the same volume setting. If per-file volume control is needed in the future, consider reading individual volumes like
soundTable.GetFloat(i, 1.0f)in the loop at line 50.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
rts/CMakeLists.txtrts/Sim/Weapons/WeaponDef.cpprts/System/Sound/CMakeLists.txtrts/System/Sound/SoundStatics.cpprts/System/Sound/SoundStatics.h
🚧 Files skipped from review as they are similar to previous changes (2)
- rts/Sim/Weapons/WeaponDef.cpp
- rts/CMakeLists.txt
🧰 Additional context used
🪛 Cppcheck (2.18.0)
rts/System/Sound/SoundStatics.cpp
[error] 63-63: Using iterator to local container 'v' that may be invalid.
(invalidContainer)
🔇 Additional comments (6)
rts/System/Sound/CMakeLists.txt (2)
11-11: LGTM!The addition of SoundStatics.cpp to the no-sound library is correct and properly indented.
46-46: LGTM!The addition of SoundStatics.cpp to the real-sound library is correct and consistent with the no-sound configuration.
rts/System/Sound/SoundStatics.h (1)
10-22: LGTM!The class structure is well-designed with appropriate encapsulation. The static utility pattern is suitable for this centralized sound loading functionality, and the depth-limited recursion parameter provides protection against infinite loops in the fallback mechanism.
rts/System/Sound/SoundStatics.cpp (3)
14-26: LGTM!The fallback map initialization and lookup logic are straightforward and correct. The use of hashed keys is appropriate for O(1) lookups.
50-59: LGTM!The loop correctly handles Lua's 1-based indexing and respects the MAX_SOUND_FILES limit. The early break on empty strings is appropriate and prevents unnecessary iterations.
66-82: LGTM! Fallback logic is correct and well-protected.The depth-limited recursion correctly prevents infinite loops:
- Default depth of 3 allows up to 3 fallback attempts
- Depth is checked before decrementing (line 73)
- Clear debug logging at each decision point
Note: The static analysis hint about line 63 is a false positive—there's no iterator variable 'v' in this code.
With this change, the docker build image becomes pinned to the source commit. Checking out older engine commits will use older build image to compile engine. This allows for making backwards incompatible changes to the docker build images, libraries, etc without breaking building of older commits. It also allows updating the build image on master without touching release branch. Also fixes beyond-all-reason#2693
Ensures that the newly build docker images can correctly compile the engine, and we won't just get CI failure on master.
Sort icon names before adding to atlas so insertion order is consistent across runs. Replace non-deterministic GL texture IDs with stable insertion-order indices for UniqueSubTexture naming. Fix stableIdx assignment to be per-file at first insertion time. Also sort icon rendering to use deterministic ProjectileDrawer iteration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Allow specifying output format (e.g. "dumpatlas proj tga") instead of hardcoded .png. The last argument is treated as a file extension if it doesn't match a known atlas name. Also fixes "decal" typo in icons log message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Edge-pixel padding: expand each icon's destination rect into the allocator padding zone during atlas FBO baking. The shader clamps source UVs via a srcClamp uniform so out-of-range samples repeat the edge pixel. This prevents bilinear bleed from neighbouring icons at small icon sizes. Fix sliding artifact: at mip levels > 0, the old code reused level-0 normalised coordinates, placing quad vertices at fractional pixel positions for odd-positioned atlas entries (e.g. 9.75px at level 2). The triangle rasteriser then handled the two halves of the quad differently. Two fixes: 1. Pixel-snapped mip-level rendering: compute destination rect in integer mip-level pixels using floor/ceil, then convert to NDC. Quad vertices now land on exact pixel boundaries at every mip level. 2. Use GL_LINEAR for source texture sampling in the FBO baking loop. For odd-positioned entries the source UV at interior pixels lands exactly halfway between two LOD-N source texels. GL_NEAREST is undefined there; floating-point barycentric differences between the two triangles cause them to pick different texels, baking a seam. GL_LINEAR gives smooth blending instead, which both triangles agree on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix card shortcode: use self-closing {{< card >}} instead of {{% card %}}...{{% /card %}} which broke Hugo build since the hextra theme's card shortcode does not support .Inner
- Replace ./recoil with ./spring and add note that spring is a temporary binary name
- Add git clone examples for RecoilExampleMod and VroomRTS with filesystem tree
- Clarify that .sdd is just a directory named with .sdd extension, no special format required
Fixed broken cherry-pick
The fallback should only apply to sounds defs for hitting dry land or wet water, where they should instead use the generic soundHit. Also fixed the table case not having a fallback
L_INFO doesn't output in the builds, hopefully this is not only on my end
The previous location and naming was bad, sound is already being used as the keyword.
- soundHitDryVolume/soundHitWetVolume no longer incorrectly fall back to
soundHitVolume for direct hits; soundHitVolume is now only used on the
explicit soundHit fallback path, matching WEAPONDUMMYTAG declarations
- Replace recursive LoadSound+depth with a flat helper LoadSoundFromTable
and an explicit fallback if-block; the fallback chain (soundHitDry/Wet
-> soundHit) had only one hop so the generality was unwarranted
- Remove arbitrary MAX_SOUND_FILES=8 cap; loop breaks on empty string
matching CUnitDefHandler::LoadSounds behaviour
- Remove undefined ${sources_engine_Audio} from rts/CMakeLists.txt
- Fix 4-space indentation to tabs throughout SoundUtils.cpp/h
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7d39901 to
0bf65d6
Compare
Summary by CodeRabbit
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.