diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 5257e258..36451dea 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -175,6 +175,9 @@ namespace TShockAPI [Description("Disable a player if they exceed this number of projectile new within 1 second.")] public int ProjectileThreshold = 50; + [Description("Ignore shrapnel from crystal bullets for Projectile Threshold.")] public bool + ProjIgnoreShrapnel = true; + [Description("Require all players to register or login before being allowed to play.")] public bool RequireLogin; [Description( @@ -200,7 +203,7 @@ namespace TShockAPI [Description("The maximum damage a projectile can inflict")] public int MaxProjDamage = 175; [Description("Ignores checking to see if player 'can' update a projectile")] public bool IgnoreProjUpdate = false; - + [Description("Ignores checking to see if player 'can' kill a projectile")] public bool IgnoreProjKill = false; [Description("Ignores all no clip checks for players")] public bool IgnoreNoClip = false; diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 5e95e2e2..29bc13d4 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1916,8 +1916,15 @@ namespace TShockAPI if (!TShock.Config.IgnoreProjUpdate && TShock.CheckProjectilePermission(args.Player, index, type)) { - args.Player.Disable("Does not have projectile permission to update projectile."); - args.Player.RemoveProjectile(ident, owner); + if (type == 100) + { //fix for skele prime + Log.Debug("Skeletron Prime's death laser ignored for cheat detection.."); + } + else + { + args.Player.Disable("Does not have projectile permission to update projectile."); + args.Player.RemoveProjectile(ident, owner); + } return true; } @@ -1936,7 +1943,14 @@ namespace TShockAPI if (!args.Player.Group.HasPermission(Permissions.ignoreprojectiledetection)) { - args.Player.ProjectileThreshold++; + if ((type ==90) && (TShock.Config.ProjIgnoreShrapnel))// ignore shrapnel + { + Log.Debug("Ignoring shrapnel per config.."); + } + else + { + args.Player.ProjectileThreshold++; + } } return false; @@ -2594,4 +2608,4 @@ namespace TShockAPI return false; } } -} \ No newline at end of file +}