diff --git a/CHANGELOG.md b/CHANGELOG.md index a69b28a0..cda3e58e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * The default group that gets this permission is `Guest` for the time being. * To add this command to your guest group, give them `tshock.synclocalarea`, with `/group addperm guest tshock.synclocalarea`. * This command may be removed at any time in the future (and will likely be removed when send tile square handling is fixed). +* Fixed smart door automatic door desync and deletion issue. (@hakusaro) ## TShock 4.4.0 (Pre-release 8) * Update for OTAPI 2.0.0.36 and Terraria 1.4.0.4. (@hakusaro, @Patrikkk, @DeathCradle) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index edf05800..fb7c7182 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -560,6 +560,7 @@ namespace TShockAPI bool changed = false; bool failed = false; + bool doorRelated = false; try { var tiles = new NetTile[size, size]; @@ -591,6 +592,11 @@ namespace TShockAPI continue; } + if (newtile.Active && Terraria.ID.TileID.Sets.RoomNeeds.CountsAsDoor.Contains(newtile.Type)) + { + doorRelated = true; + } + // Fixes the Flower Boots not creating flowers issue if (size == 1 && args.Player.Accessories.Any(i => i.active && i.netID == ItemID.FlowerBoots)) { @@ -704,7 +710,8 @@ namespace TShockAPI } else { - args.Player.SendTileSquare(tileX, tileY, size); + if (!doorRelated) + args.Player.SendTileSquare(tileX, tileY, size); } } catch