From af99c4cb8d7bab0775d8225b6c895cae83c2e924 Mon Sep 17 00:00:00 2001
From: 0x3fcf1bbd <81617230+0x3fcf1bbd@users.noreply.github.com>
Date: Wed, 26 Jan 2022 14:17:27 +0100
Subject: [PATCH] Fixed STS not being centered.
Inferring from the usage of it, this method was expected by its callers to be a square centered around the given coordinates (x, y), hence this being a fix.
---
TShockAPI/TSPlayer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs
index 00ff790b..c4c094e9 100644
--- a/TShockAPI/TSPlayer.cs
+++ b/TShockAPI/TSPlayer.cs
@@ -1311,7 +1311,7 @@ namespace TShockAPI
/// true if the tile square was sent successfully, else false
public virtual bool SendTileSquare(int x, int y, int size = 10)
{
- return SendTileRect((short)x, (short)y, (byte)size, (byte)size);
+ return SendTileRect((short)(x-(size/2)), (short)(y-(size/2)), (byte)size, (byte)size);
}
///