Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions TShockAPI/Bouncer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3056,20 +3056,17 @@ internal void OnQuickStack(object sender, OTAPI.Hooks.Chest.QuickStackEventArgs

internal void OnSecondUpdate()
{
Task.Run(() =>
var threshold = DateTime.UtcNow.AddSeconds(-5);
foreach (var player in TShock.Players)
{
foreach (var player in TShock.Players)
if (player != null && player.TPlayer.whoAmI >= 0)
{
if (player != null && player.TPlayer.whoAmI >= 0)
lock (player.RecentlyCreatedProjectiles)
{
var threshold = DateTime.Now.AddSeconds(-5);
lock (player.RecentlyCreatedProjectiles)
{
player.RecentlyCreatedProjectiles = player.RecentlyCreatedProjectiles.Where(s => s.CreatedAt > threshold).ToList();
}
player.RecentlyCreatedProjectiles.RemoveAll(s => s.CreatedAt <= threshold);
}
}
});
}
}

/// <summary>
Expand Down