mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Merge remote-tracking branch 'public/master'
This commit is contained in:
commit
c90947e3ce
5 changed files with 20 additions and 5 deletions
|
|
@ -420,7 +420,11 @@ consvar_t cv_bgaudio = Player("bgaudio", "Nothing").onchange_noinit(BGAudio_OnCh
|
||||||
{0, "Nothing"},
|
{0, "Nothing"},
|
||||||
{1, "Music"},
|
{1, "Music"},
|
||||||
{2, "Sounds"},
|
{2, "Sounds"},
|
||||||
|
{4, "Voices"},
|
||||||
{3, "Music&Sounds"},
|
{3, "Music&Sounds"},
|
||||||
|
{5, "Music&Voices"},
|
||||||
|
{6, "Sounds&Voices"},
|
||||||
|
{7, "MusicSounds&Voices"}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Pause game upon window losing focus
|
// Pause game upon window losing focus
|
||||||
|
|
|
||||||
|
|
@ -5396,7 +5396,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0])
|
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0] && !g_voice_disabled)
|
||||||
{
|
{
|
||||||
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), false);
|
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), false);
|
||||||
}
|
}
|
||||||
|
|
@ -5410,7 +5410,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0])
|
if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0] && !g_voice_disabled)
|
||||||
{
|
{
|
||||||
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), terminal);
|
S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), terminal);
|
||||||
}
|
}
|
||||||
|
|
@ -7680,7 +7680,7 @@ void NetVoiceUpdate(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_voice_selfdeafen.value == 1)
|
if (cv_voice_selfdeafen.value == 1 || g_voice_disabled)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -858,7 +858,12 @@ void K_RetireBots(void)
|
||||||
std::stable_sort(humans.begin(), humans.end(), CompareReplacements);
|
std::stable_sort(humans.begin(), humans.end(), CompareReplacements);
|
||||||
std::stable_sort(bots.begin(), bots.end(), CompareReplacements);
|
std::stable_sort(bots.begin(), bots.end(), CompareReplacements);
|
||||||
|
|
||||||
if (G_GametypeHasSpectators() == true && grandprixinfo.gp == false && cv_shuffleloser.value != 0)
|
// If a player spectated mid-race or mid-duel, they will be placed in-game by K_CheckSpectateStatus,
|
||||||
|
// and their position will be set to 0. Since we're only replacing one player as of now, there's no need
|
||||||
|
// to do anything; a player has already been replaced.
|
||||||
|
bool player_already_joined = (!humans.empty() && humans[0]->position == 0);
|
||||||
|
|
||||||
|
if (G_GametypeHasSpectators() == true && grandprixinfo.gp == false && !player_already_joined && cv_shuffleloser.value != 0)
|
||||||
{
|
{
|
||||||
// While joiners and players still exist, insert joiners.
|
// While joiners and players still exist, insert joiners.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2858,6 +2858,9 @@ void BGAudio_OnChange(void)
|
||||||
|
|
||||||
if (window_notinfocus && !(cv_bgaudio.value & 2))
|
if (window_notinfocus && !(cv_bgaudio.value & 2))
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
|
||||||
|
if (window_notinfocus && !(cv_bgaudio.value & 4))
|
||||||
|
g_voice_disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2889,7 +2892,7 @@ void S_QueueVoiceFrameFromPlayer(INT32 playernum, void *data, UINT32 len, boolea
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cv_voice_selfdeafen.value != 1)
|
if (cv_voice_selfdeafen.value != 1 && !g_voice_disabled)
|
||||||
{
|
{
|
||||||
I_QueueVoiceFrameFromPlayer(playernum, data, len, terminal);
|
I_QueueVoiceFrameFromPlayer(playernum, data, len, terminal);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -523,6 +523,7 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||||
window_notinfocus = false;
|
window_notinfocus = false;
|
||||||
|
|
||||||
S_SetMusicVolume();
|
S_SetMusicVolume();
|
||||||
|
g_voice_disabled = cv_voice_selfdeafen.value;
|
||||||
|
|
||||||
if (!firsttimeonmouse)
|
if (!firsttimeonmouse)
|
||||||
{
|
{
|
||||||
|
|
@ -537,6 +538,8 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||||
I_SetMusicVolume(0);
|
I_SetMusicVolume(0);
|
||||||
if (!(cv_bgaudio.value & 2))
|
if (!(cv_bgaudio.value & 2))
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
if (!(cv_bgaudio.value & 4))
|
||||||
|
g_voice_disabled = true;
|
||||||
|
|
||||||
G_ResetAllDeviceGameKeyDown();
|
G_ResetAllDeviceGameKeyDown();
|
||||||
G_ResetAllDeviceResponding();
|
G_ResetAllDeviceResponding();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue