From e4b6f866dda312b8f7a75d3d9c45a93b243e3378 Mon Sep 17 00:00:00 2001 From: MarioE Date: Thu, 3 Oct 2013 22:27:45 -0400 Subject: [PATCH] Fix dart traps and bathtubs --- TShockAPI/GetDataHandlers.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 6a1bc930..cead90ff 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1605,6 +1605,11 @@ namespace TShockAPI return false; } + /// + /// Tiles that can be oriented (e.g., beds, chairs, bathtubs, etc). + /// + private static byte[] orientableTiles = new byte[] { 15, 79, 90, 137 }; + private static bool HandleSendTileSquare(GetDataHandlerArgs args) { if (args.Player.Group.HasPermission(Permissions.allowclientsideworldedit)) @@ -1674,9 +1679,8 @@ namespace TShockAPI } } - // Chairs and beds - if ((tile.type == 15 && newtile.Type == 15) || - (tile.type == 79 && newtile.Type == 79)) + // Orientable tiles + if (tile.type == newtile.Type && orientableTiles.Contains(tile.type)) { tile.frameX = newtile.FrameX; tile.frameY = newtile.FrameY;