From f2da3f6c839a194941399ff8e5586a21a5e715d4 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 24 Dec 2017 20:13:53 -0700 Subject: [PATCH] Remove index check on Bouncer NewProjectiles Note: even in the previous iteration of the code the search function returned -1 if it couldn't find it in the system, which would have made removal of projectiles by ident and owner impossible because they weren't found anyway. Either way, this is related to fixing #1584. --- TShockAPI/Bouncer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 40e2c355..022421ab 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -978,7 +978,7 @@ namespace TShockAPI short type = args.Type; int index = args.Index; - if (index > Main.maxProjectiles || index < 0) + if (index > Main.maxProjectiles) { args.Player.RemoveProjectile(ident, owner); args.Handled = true;