Skip to content

Commit 14d1f1f

Browse files
Micky5991dr1zzle
authored and
dr1zzle
committed
Add parameter in positional task to support different sleep times
1 parent 9a6213e commit 14d1f1f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

JustAnotherVoiceChat.Server.Wrapper/src/Elements/Tasks/PositionalVoiceTask.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,21 @@ namespace JustAnotherVoiceChat.Server.Wrapper.Elements.Tasks
3131
{
3232
public class PositionalVoiceTask<TClient> : IVoiceTask<TClient> where TClient : IVoiceClient
3333
{
34+
private readonly int _sleepTime;
35+
36+
public PositionalVoiceTask(int sleepTime = 125)
37+
{
38+
_sleepTime = sleepTime;
39+
}
40+
3441
public virtual int RunVoiceTask(IVoiceServer<TClient> server)
3542
{
3643
foreach (var client in server.GetClients())
3744
{
3845
client.SetListeningPositionToCurrentPosition();
3946
}
4047

41-
return 125;
48+
return _sleepTime;
4249
}
4350

4451
public virtual void Dispose()

0 commit comments

Comments
 (0)