add Game.ForceVoice and Game.ForceLocalVoice
guess what i am going to use this for
This commit is contained in:
@@ -228,9 +228,11 @@ namespace Barotrauma.Networking
|
|||||||
if (GameMain.WindowActive && SettingsMenu.Instance is null)
|
if (GameMain.WindowActive && SettingsMenu.Instance is null)
|
||||||
{
|
{
|
||||||
bool pttDown = PlayerInput.KeyDown(InputType.Voice) && GUI.KeyboardDispatcher.Subscriber == null;
|
bool pttDown = PlayerInput.KeyDown(InputType.Voice) && GUI.KeyboardDispatcher.Subscriber == null;
|
||||||
|
if (GameMain.LuaCs.Game.ForceVoice != null) { pttDown = GameMain.LuaCs.Game.ForceVoice.Value; }
|
||||||
if (pttDown || captureTimer <= 0)
|
if (pttDown || captureTimer <= 0)
|
||||||
{
|
{
|
||||||
ForceLocal = GameMain.ActiveChatMode == ChatMode.Local;
|
ForceLocal = GameMain.ActiveChatMode == ChatMode.Local;
|
||||||
|
if (GameMain.LuaCs.Game.ForceLocalVoice != null) { ForceLocal = GameMain.LuaCs.Game.ForceLocalVoice.Value; }
|
||||||
}
|
}
|
||||||
if (GameSettings.CurrentConfig.Audio.VoiceSetting == VoiceMode.Activity)
|
if (GameSettings.CurrentConfig.Audio.VoiceSetting == VoiceMode.Activity)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ namespace Barotrauma
|
|||||||
return GameMain.LightManager;
|
return GameMain.LightManager;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool? ForceVoice = null;
|
||||||
|
public bool? ForceLocalVoice = null;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
public bool IsDedicated
|
public bool IsDedicated
|
||||||
|
|||||||
Reference in New Issue
Block a user