mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-24 07:07:44 -05:00
parent
3e7bacb80b
commit
bb2ea75f58
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user