Merge pull request #1216 from cracker64/general-devel
Properly follow tileData for region checks. Fix #1159
This commit is contained in:
commit
edc3d34d68
1 changed files with 2 additions and 6 deletions
|
|
@ -2231,12 +2231,8 @@ namespace TShockAPI
|
||||||
if (tileData == null)
|
if (tileData == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (tileData.Width == 3 && tileData.Height == 2) { x -= 1; y -= 1; }
|
x -= tileData.Origin.X;
|
||||||
else if (tileData.Width == 4 && tileData.Height == 2) { x -= 1; y -= 1; }
|
y -= tileData.Origin.Y;
|
||||||
else if (tileData.Width == 6 && tileData.Height == 3) { x -= 2; y -= 2; }
|
|
||||||
else if (tileData.Width == 6 && tileData.Height == 4) { x -= 2; y -= 3; }
|
|
||||||
else if (tileData.Width == 3 && tileData.Height == 3) { x -= 1; y -= 2; }
|
|
||||||
else if (tileData.Width == 3 && tileData.Height == 4) { x -= 1; y -= 3; }
|
|
||||||
|
|
||||||
for (int i = x; i < x + tileData.Width; i++)
|
for (int i = x; i < x + tileData.Width; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue