Skip tile rect changes close to the world edge
This commit is contained in:
parent
9e4bf72cbf
commit
4e542d6ef6
1 changed files with 3 additions and 2 deletions
|
|
@ -157,8 +157,9 @@ namespace TShockAPI.Handlers
|
|||
int realY = tileY + y;
|
||||
|
||||
// Do not process tiles outside of the world boundaries
|
||||
if ((realX < 0 || realX >= Main.maxTilesX)
|
||||
|| (realY < 0 || realY > Main.maxTilesY))
|
||||
// The hidden world strip is 40 tiles wide/tall, use 10 instead just to be safe to avoid off-by-one errors
|
||||
if ((realX < 10 || realX >= Main.maxTilesX - 10)
|
||||
|| (realY < 10 || realY > Main.maxTilesY - 10))
|
||||
{
|
||||
processed[x, y] = true;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue