mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix voice gender using server data and update loading screen UI
- Use authoritative playerRace/playerGender at spawn for voice profiles instead of unreliable model name parsing - Support nonbinary gender with useFemaleModel body type fallback - Move voice setup into spawnPlayerCharacter() for all spawn paths - Remove legacy single-player default Human Male clip preloading - Make loading screen text black and move progress bar to top
This commit is contained in:
parent
efc7e65dfc
commit
f2f6ffd2cd
5 changed files with 58 additions and 15 deletions
|
|
@ -28,9 +28,8 @@ bool ActivitySoundManager::initialize(pipeline::AssetManager* assets) {
|
|||
assetManager = assets;
|
||||
if (!assetManager) return false;
|
||||
|
||||
rebuildJumpClipsForProfile("Human", "Human", true);
|
||||
rebuildSwimLoopClipsForProfile("Human", "Human", true);
|
||||
rebuildHardLandClipsForProfile("Human", "Human", true);
|
||||
// Voice profile clips (jump, swim, hardLand, combat vocals) are set at
|
||||
// character spawn via setCharacterVoiceProfile() with the correct race/gender.
|
||||
|
||||
preloadCandidates(splashEnterClips, {
|
||||
"Sound\\Character\\Footsteps\\EnterWaterSplash\\EnterWaterSmallA.wav",
|
||||
|
|
@ -162,6 +161,11 @@ void ActivitySoundManager::rebuildJumpClipsForProfile(const std::string& raceFol
|
|||
prefix + stem + "\\" + stem + "Jump01.wav",
|
||||
prefix + stem + "\\" + stem + "Jump02.wav",
|
||||
});
|
||||
if (jumpClips.empty()) {
|
||||
LOG_WARNING("No jump clips found for ", stem, " (tried exert prefix: ", exertPrefix, ")");
|
||||
} else {
|
||||
LOG_INFO("Loaded ", jumpClips.size(), " jump clips for ", stem);
|
||||
}
|
||||
}
|
||||
|
||||
void ActivitySoundManager::rebuildSwimLoopClipsForProfile(const std::string& raceFolder, const std::string& raceBase, bool male) {
|
||||
|
|
@ -393,6 +397,24 @@ void ActivitySoundManager::setCharacterVoiceProfile(const std::string& modelName
|
|||
" death clips=", deathClips.size());
|
||||
}
|
||||
|
||||
void ActivitySoundManager::setCharacterVoiceProfile(const std::string& raceFolder, const std::string& raceBase, bool male) {
|
||||
if (!assetManager) return;
|
||||
std::string key = raceFolder + "|" + raceBase + "|" + (male ? "M" : "F");
|
||||
if (key == voiceProfileKey) return;
|
||||
voiceProfileKey = key;
|
||||
rebuildJumpClipsForProfile(raceFolder, raceBase, male);
|
||||
rebuildSwimLoopClipsForProfile(raceFolder, raceBase, male);
|
||||
rebuildHardLandClipsForProfile(raceFolder, raceBase, male);
|
||||
rebuildCombatVocalClipsForProfile(raceFolder, raceBase, male);
|
||||
core::Logger::getInstance().info("Activity SFX voice profile (explicit): ", voiceProfileKey,
|
||||
" jump clips=", jumpClips.size(),
|
||||
" swim clips=", swimLoopClips.size(),
|
||||
" hardLand clips=", hardLandClips.size(),
|
||||
" attackGrunt clips=", attackGruntClips.size(),
|
||||
" wound clips=", woundClips.size(),
|
||||
" death clips=", deathClips.size());
|
||||
}
|
||||
|
||||
void ActivitySoundManager::playWaterEnter() {
|
||||
LOG_INFO("Water entry detected - attempting to play splash sound");
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue