mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-26 20:07:11 -05:00
@@ -121,11 +121,6 @@ public PlacedItemPermission IsOccupied(Item tile, in int x, in int y)
|
||||
var w = type.GetWidth();
|
||||
var h = type.GetHeight();
|
||||
|
||||
if (x + w - 1 >= MaxWidth)
|
||||
return PlacedItemPermission.OutOfBounds;
|
||||
if (y + h - 1 >= MaxHeight)
|
||||
return PlacedItemPermission.OutOfBounds;
|
||||
|
||||
if ((tile.Rotation & 1) == 1)
|
||||
{
|
||||
var tmp = w;
|
||||
@@ -133,6 +128,11 @@ public PlacedItemPermission IsOccupied(Item tile, in int x, in int y)
|
||||
h = tmp;
|
||||
}
|
||||
|
||||
if (x + w - 1 >= MaxWidth)
|
||||
return PlacedItemPermission.OutOfBounds;
|
||||
if (y + h - 1 >= MaxHeight)
|
||||
return PlacedItemPermission.OutOfBounds;
|
||||
|
||||
for (byte ix = 0; ix < w; ix++)
|
||||
{
|
||||
for (byte iy = 0; iy < h; iy++)
|
||||
|
||||
Reference in New Issue
Block a user