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:
Kelsi 2026-02-23 06:22:30 -08:00
parent efc7e65dfc
commit f2f6ffd2cd
5 changed files with 58 additions and 15 deletions

View file

@ -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();

View file

@ -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)