Merge pull request #331 from k0rd/general-devel
Fix for skeletron prime disabling players & new config option to ignore shrapnel
This commit is contained in:
commit
1666c657d6
2 changed files with 22 additions and 5 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -1915,9 +1915,16 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
if (!TShock.Config.IgnoreProjUpdate && TShock.CheckProjectilePermission(args.Player, index, type))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -1935,9 +1942,16 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
if (!args.Player.Group.HasPermission(Permissions.ignoreprojectiledetection))
|
||||
{
|
||||
if ((type ==90) && (TShock.Config.ProjIgnoreShrapnel))// ignore shrapnel
|
||||
{
|
||||
Log.Debug("Ignoring shrapnel per config..");
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Player.ProjectileThreshold++;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue