diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 03b70404..f051ee37 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -963,7 +963,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; diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 82791065..99480b58 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -925,7 +925,7 @@ namespace TShockAPI /// /// identity /// owner - /// projectile ID or -1 if not found + /// projectile ID public int SearchProjectile(short identity, int owner) { for (int i = 0; i < Main.maxProjectiles; i++) @@ -933,7 +933,7 @@ namespace TShockAPI if (Main.projectile[i].identity == identity && Main.projectile[i].owner == owner) return i; } - return -1; + return 1000; } ///