fixed CanPlace ignoring bounds of covered tiles
This commit is contained in:
parent
4742d90ba5
commit
aa6a75a14b
1 changed files with 2 additions and 2 deletions
|
@ -172,9 +172,9 @@ namespace TouchyTickets {
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanPlace(Point position, Attraction attraction) {
|
public bool CanPlace(Point position, Attraction attraction) {
|
||||||
if (!this.IsInBounds(position))
|
|
||||||
return false;
|
|
||||||
foreach (var offset in attraction.Type.GetCoveredTiles()) {
|
foreach (var offset in attraction.Type.GetCoveredTiles()) {
|
||||||
|
if (!this.IsInBounds(position + offset))
|
||||||
|
return false;
|
||||||
if (this.GetAttractionAt(position + offset) != null)
|
if (this.GetAttractionAt(position + offset) != null)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue