diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index a5e14115..7dde6776 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1295,10 +1295,10 @@ namespace TShockAPI { var keys = projectileCreatesLiquid.Where(k => k.Value == type).Select(k => k.Key); var recentBombs = args.Player.RecentlyCreatedProjectiles.Where(p => keys.Contains(Main.projectile[p.Index].type)); - wasThereABombNearby = recentBombs.Any(r => (args.TileX > (Main.projectile[r.Index].position.X / 16.0f) - 16 - && args.TileX < (Main.projectile[r.Index].position.X / 16.0f) + 16) - && (args.TileY > (Main.projectile[r.Index].position.Y / 16.0f) - 16 - && args.TileY < (Main.projectile[r.Index].position.Y / 16.0f) + 16)); + wasThereABombNearby = recentBombs.Any(r => (args.TileX > (Main.projectile[r.Index].position.X / 16.0f) - TShock.Config.BombExplosionRadius + && args.TileX < (Main.projectile[r.Index].position.X / 16.0f) + TShock.Config.BombExplosionRadius) + && (args.TileY > (Main.projectile[r.Index].position.Y / 16.0f) - TShock.Config.BombExplosionRadius + && args.TileY < (Main.projectile[r.Index].position.Y / 16.0f) + TShock.Config.BombExplosionRadius)); } // Liquid anti-cheat diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index fb920732..6fd5794c 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -527,6 +527,9 @@ namespace TShockAPI [Description("Whether or not the server should output debug level messages related to system operation.")] public bool DebugLogs = false; + [Description("Determines the range in tiles that a bomb can affect tiles.")] + public int BombExplosionRadius = 5; + /// /// Reads a configuration file from a given path ///