Fixes TSDEV-129
Explicitly check for projectile exploit to kick/ban while ignoring other packets that can potentially crash clients.
This commit is contained in:
parent
a14299ee32
commit
612b629a9b
1 changed files with 9 additions and 3 deletions
|
|
@ -480,12 +480,18 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
|
||||
if (type == 23 && (vely == 0f || velx == 0f)) //float.IsNaN((float)Math.Sqrt((double)(velx * velx + vely * vely))))
|
||||
if (type == 23)
|
||||
{
|
||||
Tools.HandleGriefer(args.Player, TShock.Config.ProjectileAbuseReason);
|
||||
return true;
|
||||
if (velx == 0f && vely == 0f && dmg == 99)
|
||||
{
|
||||
Tools.HandleGriefer(args.Player, TShock.Config.ProjectileAbuseReason);
|
||||
return true;
|
||||
}
|
||||
else if (velx == 0f || vely == 0f)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (type == 29 || type == 28 || type == 37)
|
||||
{
|
||||
Log.Debug(string.Format("Explosive(PlyXY:{0}_{1}, Type:{2})", args.Player.TileX, args.Player.TileY, type));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue