aboutsummaryrefslogtreecommitdiff
path: root/src/phys.lua
diff options
context:
space:
mode:
authorne_mene <[email protected]>2026-03-13 18:23:11 +0100
committerne_mene <[email protected]>2026-03-13 18:23:11 +0100
commit6146a0ac36df3557280a0135b71fee0e2b629ee2 (patch)
treec71bf30e308bfd0bdbe3880e3613f8ad5e979e56 /src/phys.lua
parentb47490aea2f63d881a2cc69a326b03abae1a46c0 (diff)
fix
Diffstat (limited to 'src/phys.lua')
-rw-r--r--src/phys.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/phys.lua b/src/phys.lua
index 2b1e101..e55f5c7 100644
--- a/src/phys.lua
+++ b/src/phys.lua
@@ -107,8 +107,9 @@ end
function box_in_tilemap(map, box)
local x, y, width, height = box:get_rect()
- local value
- value = has_tile(map, to_tile_coords(x, y))
+ if has_tile(map, to_tile_coords(x, y)) then
+ return true
+ end
if has_tile(map, to_tile_coords(x + width, y)) then
return true
end