Fix for skeletron prime disabling players.

New config option to ignore crystal shrapnel for projectile updates.
This commit is contained in:
k0rd 2012-01-23 10:54:10 -05:00
parent ae34636092
commit 2d650b0a1b
2 changed files with 22 additions and 5 deletions

View file

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

View file

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