From a7ae03427805cdf0886ca9eb40add54cf970fc4f Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 21 Aug 2023 00:59:02 +1000 Subject: Objects can now be placed under tiles that have non-block collision --- source/game/StarObjectDatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/game/StarObjectDatabase.cpp') 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; -- cgit v1.2.3