HandleSendTileSquare now takes into account Tile's attempt at conversing bandwidth.
This commit is contained in:
parent
28c4f9ed9c
commit
fc7f20566e
2 changed files with 10 additions and 1 deletions
|
|
@ -221,6 +221,13 @@ namespace TShockAPI
|
||||||
for (int y = 0; y < size; y++)
|
for (int y = 0; y < size; y++)
|
||||||
{
|
{
|
||||||
tiles[x, y] = new NetTile(args.Data);
|
tiles[x, y] = new NetTile(args.Data);
|
||||||
|
if (tiles[x, y].SameTiles > 0)
|
||||||
|
{
|
||||||
|
var num = tiles[x, y].SameTiles;
|
||||||
|
var tile = tiles[x, y];
|
||||||
|
for (y++; y < y + num + 1; y++)
|
||||||
|
tiles[x, y] = tile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ namespace TShockAPI.Net
|
||||||
public bool HasLiquid { get { return Liquid > 0; } }
|
public bool HasLiquid { get { return Liquid > 0; } }
|
||||||
public bool FrameImportant { get { return Main.tileFrameImportant[Type]; } }
|
public bool FrameImportant { get { return Main.tileFrameImportant[Type]; } }
|
||||||
|
|
||||||
|
public int SameTiles { get; set; }
|
||||||
|
|
||||||
public NetTile()
|
public NetTile()
|
||||||
{
|
{
|
||||||
Active = false;
|
Active = false;
|
||||||
|
|
@ -125,7 +127,7 @@ namespace TShockAPI.Net
|
||||||
if (flags.HasFlag(TileFlags.Wire))
|
if (flags.HasFlag(TileFlags.Wire))
|
||||||
Wire = true;
|
Wire = true;
|
||||||
|
|
||||||
var samenum = stream.ReadInt16();
|
SameTiles = stream.ReadInt16();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue