Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarObjectDatabase.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-08-21 00:59:02 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-08-21 00:59:02 +1000
commita7ae03427805cdf0886ca9eb40add54cf970fc4f (patch)
treed8b4c7d81b485e7a1bbe7ed3584bb34b5eb9fda4 /source/game/StarObjectDatabase.cpp
parentedbee201ee2debbe56e27636760a9d650b8ff685 (diff)
Objects can now be placed under tiles that have non-block collision
Diffstat (limited to 'source/game/StarObjectDatabase.cpp')
-rw-r--r--source/game/StarObjectDatabase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/StarObjectDatabase.cpp b/source/game/StarObjectDatabase.cpp
index 4c9a968..d886be8 100644
--- a/source/game/StarObjectDatabase.cpp
+++ b/source/game/StarObjectDatabase.cpp
@@ -32,9 +32,9 @@ bool ObjectOrientation::placementValid(World const* world, Vec2I const& position
if (!world)
return false;
- for (auto space : spaces) {
+ for (Vec2I space : spaces) {
space += position;
- if (world->tileIsOccupied(space, TileLayer::Foreground) || world->isTileProtected(space))
+ if (world->tileIsOccupied(space, TileLayer::Foreground, false, true) || world->isTileProtected(space))
return false;
}
return true;