From 0d0641c8c0ddbb556ef6c810aea73250070ea93a Mon Sep 17 00:00:00 2001 From: Patrikkk Date: Tue, 9 Jun 2020 00:23:23 +0200 Subject: [PATCH] Bouncer OnTileEdit - Adding more checks on ReplaceTile action. --- TShockAPI/Bouncer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 3a0fa623..934793e9 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -358,7 +358,7 @@ namespace TShockAPI } } - if (editData >= (action == EditAction.PlaceTile ? Main.maxTileSets : Main.maxWallTypes)) + if (editData >= ((action == EditAction.PlaceTile || action == EditAction.ReplaceTile) ? Main.maxTileSets : Main.maxWallTypes)) { TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (ms3) {0} {1} {2}", args.Player.Name, action, editData); args.Player.SendTileSquare(tileX, tileY, 4); @@ -536,7 +536,7 @@ namespace TShockAPI return; } - if ((action == EditAction.PlaceTile || action == EditAction.PlaceWall) && !args.Player.HasPermission(Permissions.ignoreplacetiledetection)) + if ((action == EditAction.PlaceTile || action == EditAction.ReplaceTile || action == EditAction.PlaceWall) && !args.Player.HasPermission(Permissions.ignoreplacetiledetection)) { args.Player.TilePlaceThreshold++; var coords = new Vector2(tileX, tileY);