From eab82a2cb1b4f48d7954884c67a5c88e67e44248 Mon Sep 17 00:00:00 2001 From: Deathmax Date: Sat, 3 Sep 2011 09:31:41 +0800 Subject: [PATCH] Fix projectile exploit detection (please test for false positives when using Harpoon) --- TShockAPI/GetDataHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index f2adac02..82d87df9 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -480,7 +480,7 @@ namespace TShockAPI return true; } - if (type == 23 && float.IsNaN((float)Math.Sqrt((double)(velx * velx + vely * vely)))) + if (type == 23 && (vely == 0f || velx == 0f)) //float.IsNaN((float)Math.Sqrt((double)(velx * velx + vely * vely)))) { Tools.HandleGriefer(args.Player, TShock.Config.ProjectileAbuseReason); return true;