Fix projectile exploit detection (please test for false positives when using Harpoon)

This commit is contained in:
Deathmax 2011-09-03 09:31:41 +08:00
parent 65b323f004
commit eab82a2cb1

View file

@ -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;