aboutsummaryrefslogtreecommitdiff
path: root/src/specks.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/specks.lua')
-rw-r--r--src/specks.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/specks.lua b/src/specks.lua
index a703d04..7f16c51 100644
--- a/src/specks.lua
+++ b/src/specks.lua
@@ -86,6 +86,10 @@ function Speck_Sys:check_bounce(i)
local scn = get_current_scene()
assert(scn, "No scene set.")
+ if not scn.tilemap then
+ return false
+ end
+
return has_tile(
scn.tilemap,
to_tile_coords(self.data.pos[i].x, self.data.pos[i].y))