Fixed STR width & length clamping being incorrect.
The main game should however clamp it itself too before sending, so there shouldn't be issues.
This commit is contained in:
parent
a48bac3631
commit
9bc936053b
1 changed files with 2 additions and 2 deletions
|
|
@ -1345,8 +1345,8 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
x = TShock.Utils.Clamp(x, Main.maxTilesX, 0);
|
x = TShock.Utils.Clamp(x, Main.maxTilesX, 0);
|
||||||
y = TShock.Utils.Clamp(y, Main.maxTilesY, 0);
|
y = TShock.Utils.Clamp(y, Main.maxTilesY, 0);
|
||||||
width = TShock.Utils.Clamp(x + width, Main.maxTilesX, 1) - x;
|
width = TShock.Utils.Clamp(x + width, Main.maxTilesX, 0) - x;
|
||||||
length = TShock.Utils.Clamp(y + length, Main.maxTilesY, 1) - x;
|
length = TShock.Utils.Clamp(y + length, Main.maxTilesY, 0) - x;
|
||||||
NetMessage.SendTileSquare(Index, x, y, width, length, changeType);
|
NetMessage.SendTileSquare(Index, x, y, width, length, changeType);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue