mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40: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
|
|
@ -271,11 +271,11 @@ void LoadingScreen::render() {
|
|||
ImVec2(0, 0), ImVec2(screenW, screenH));
|
||||
}
|
||||
|
||||
// Progress bar
|
||||
// Progress bar (top of screen)
|
||||
{
|
||||
const float barWidthFrac = 0.6f;
|
||||
const float barHeight = 6.0f;
|
||||
const float barY = screenH * 0.91f;
|
||||
const float barY = screenH * 0.06f;
|
||||
float barX = screenW * (0.5f - barWidthFrac * 0.5f);
|
||||
float barW = screenW * barWidthFrac;
|
||||
|
||||
|
|
@ -306,20 +306,20 @@ void LoadingScreen::render() {
|
|||
{
|
||||
char pctBuf[32];
|
||||
snprintf(pctBuf, sizeof(pctBuf), "%d%%", static_cast<int>(loadProgress * 100.0f));
|
||||
float barCenterY = screenH * 0.91f;
|
||||
float barCenterY = screenH * 0.06f;
|
||||
float textY = barCenterY - 20.0f;
|
||||
|
||||
ImVec2 pctSize = ImGui::CalcTextSize(pctBuf);
|
||||
ImGui::SetCursorPos(ImVec2((screenW - pctSize.x) * 0.5f, textY));
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "%s", pctBuf);
|
||||
ImGui::TextColored(ImVec4(0.0f, 0.0f, 0.0f, 1.0f), "%s", pctBuf);
|
||||
}
|
||||
|
||||
// Status text below bar
|
||||
{
|
||||
float statusY = screenH * 0.91f + 14.0f;
|
||||
float statusY = screenH * 0.06f + 14.0f;
|
||||
ImVec2 statusSize = ImGui::CalcTextSize(statusText.c_str());
|
||||
ImGui::SetCursorPos(ImVec2((screenW - statusSize.x) * 0.5f, statusY));
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.8f, 1.0f), "%s", statusText.c_str());
|
||||
ImGui::TextColored(ImVec4(0.0f, 0.0f, 0.0f, 1.0f), "%s", statusText.c_str());
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
|
|
|||
|
|
@ -2452,12 +2452,6 @@ void Renderer::update(float deltaTime) {
|
|||
}
|
||||
|
||||
characterRenderer->setInstancePosition(characterInstanceId, characterPosition);
|
||||
if (activitySoundManager) {
|
||||
std::string modelName;
|
||||
if (characterRenderer->getInstanceModelName(characterInstanceId, modelName)) {
|
||||
activitySoundManager->setCharacterVoiceProfile(modelName);
|
||||
}
|
||||
}
|
||||
|
||||
// Movement-facing comes from camera controller and is decoupled from LMB orbit.
|
||||
// During taxi flights, orientation is controlled by the flight path (not player input)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue