From 658c714ac5d1b354dd21c102b80e53b2665f2e35 Mon Sep 17 00:00:00 2001 From: quake1337 <3310937+bartico6@users.noreply.github.com> Date: Fri, 21 May 2021 12:13:06 +0200 Subject: [PATCH] Remove old UpdateServerTileState call, as the new one supersedes it --- TShockAPI/Handlers/SendTileRectHandler.cs | 65 +---------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/TShockAPI/Handlers/SendTileRectHandler.cs b/TShockAPI/Handlers/SendTileRectHandler.cs index d0e0b547..e737b6fc 100644 --- a/TShockAPI/Handlers/SendTileRectHandler.cs +++ b/TShockAPI/Handlers/SendTileRectHandler.cs @@ -385,69 +385,6 @@ namespace TShockAPI.Handlers } } - /// - /// Updates a single tile's world state with a change from the tile rect packet - /// - /// The tile to update - /// The NetTile containing the change - public static void UpdateServerTileState(ITile tile, NetTile newTile) - { - tile.active(newTile.Active); - tile.type = newTile.Type; - - if (newTile.FrameImportant) - { - tile.frameX = newTile.FrameX; - tile.frameY = newTile.FrameY; - } - - if (newTile.HasWall) - { - tile.wall = newTile.Wall; - } - - if (newTile.HasLiquid) - { - tile.liquid = newTile.Liquid; - tile.liquidType(newTile.LiquidType); - } - - tile.wire(newTile.Wire); - tile.wire2(newTile.Wire2); - tile.wire3(newTile.Wire3); - tile.wire4(newTile.Wire4); - - tile.halfBrick(newTile.IsHalf); - - if (newTile.HasColor) - { - tile.color(newTile.TileColor); - } - - if (newTile.HasWallColor) - { - tile.wallColor(newTile.WallColor); - } - - byte slope = 0; - if (newTile.Slope) - { - slope += 1; - } - if (newTile.Slope2) - { - slope += 2; - } - if (newTile.Slope3) - { - slope += 4; - } - - tile.slope(slope); - - TShock.Log.ConsoleDebug("Bouncer / SendTileRect updated a tile from type {0} to {1}", tile.type, newTile.Type); - } - /// /// Performs on multiple tiles /// @@ -623,7 +560,7 @@ namespace TShockAPI.Handlers { for (int y = 0; y < height; y++) { - UpdateServerTileState(Main.tile[tileX + x, tileY + y], newTiles[x, y]); + UpdateServerTileState(Main.tile[tileX + x, tileY + y], newTiles[x, y], TileDataType.All); } //Add a line of dirt blocks at the bottom for safety UpdateServerTileState(Main.tile[tileX + x, tileY + height], new NetTile { Active = true, Type = 0 }, TileDataType.All);