Improve on projectile draw exploit detection.

This commit is contained in:
Deathmax 2011-08-11 17:13:40 +08:00
parent 6370974f30
commit 9447ce37dc

View file

@ -452,7 +452,7 @@ namespace TShockAPI
return true;
}
if ((vely == 0f || velx == 0f) && type == 23)
if (type == 23 && float.IsNaN((float)Math.Sqrt((double)(velx * velx + vely * vely))))
{
Tools.HandleGriefer(args.Player, TShock.Config.ProjectileAbuseReason);
return true;