Added range check to SendTileSquare
This commit is contained in:
parent
f3e3c4dafc
commit
ecc6da2a96
1 changed files with 2 additions and 0 deletions
|
|
@ -204,6 +204,8 @@ namespace TShockAPI
|
|||
|
||||
public virtual void SendTileSquare(int x, int y, int size = 10)
|
||||
{
|
||||
if (x + size >= Main.maxTilesX || y + size >= Main.maxTilesX)
|
||||
return;
|
||||
SendData(PacketTypes.TileSendSquare, "", size, (float)(x - (size / 2)), (float)(y - (size / 2)), 0f);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue