Skip to content

Commit a822e16

Browse files
committed
1.1.2
* Fixed a bug where if SCP575 was spawned by command everyone could hear the audios
1 parent a6ceee5 commit a822e16

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

SCP575/Command/Scp575Command.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
2626
{
2727
if (sender != null)
2828
{
29-
if (!Round.IsRoundStarted)
29+
/*if (!Round.IsRoundStarted)
3030
{
3131
response = Scp575.Instance.Config.CommandResponses.RoundHasNotStarted;
3232
return false;
33-
}
33+
}*/
3434
// Display help response.
3535
if (arguments.Count < 1 || arguments.IsEmpty() || arguments.Count > 2)
3636
{
@@ -62,6 +62,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
6262

6363
response = string.Format(Scp575.Instance.Config.CommandResponses.Spawning, victim.Nickname, duration);
6464
return true;
65+
6566
}
6667
else
6768
{
@@ -70,7 +71,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
7071
}
7172
}
7273

73-
public void SpawnScp575(Player victim, float duration)
74+
public void SpawnScp575(Player victim, float duration, bool everyoneCanHear = false)
7475
{
7576
var scp575 = Dummies.CreateDummy("Scp575", "SCP-575");
7677

@@ -124,7 +125,14 @@ public void SpawnScp575(Player victim, float duration)
124125
return;
125126
}
126127

127-
scp575.PlayAudio(audioFile, channel: VoiceChatChannel.RoundSummary, volume: Scp575.Instance.Config.Scp575.SoundVolume);
128+
if (everyoneCanHear)
129+
{
130+
scp575.PlayAudio(audioFile, channel: VoiceChatChannel.RoundSummary, volume: Scp575.Instance.Config.Scp575.SoundVolume);
131+
}
132+
else
133+
{
134+
scp575.PlayAudio(audioFile, channel: VoiceChatChannel.RoundSummary, volume: Scp575.Instance.Config.Scp575.SoundVolume, player: victim);
135+
}
128136
Log.Debug($"Playing sound {audioFile}", Scp575.Instance.Config.Debug);
129137
}
130138
}

SCP575/Scp575.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class Scp575
4444
/// <summary>
4545
/// Plugin version
4646
/// </summary>
47-
private const string Version = "1.1.1";
47+
private const string Version = "1.1.2";
4848

4949
[PluginPriority(LoadPriority.High)]
5050
[PluginEntryPoint("SCP-575", Version, "Add SCP-575 to SCP:SL", "SrLicht")]

0 commit comments

Comments
 (0)