Allow launched bubble to squeeze through spaces

main
Tyler Scott 2022-02-06 09:39:04 +07:00
parent 046c9f9f4e
commit 0d4c32864c
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ function love.update(dt)
local diff_x = next_x - slot.x local diff_x = next_x - slot.x
local diff_y = next_y - slot.y local diff_y = next_y - slot.y
local dist = math.sqrt(diff_x * diff_x + diff_y * diff_y) local dist = math.sqrt(diff_x * diff_x + diff_y * diff_y)
if dist <= game.bubble_diameter then if dist <= game.bubble_diameter - 2 then -- -2 to allow squeezing through
local depth = game.bubble_diameter - dist local depth = game.bubble_diameter - dist
local direction_x = diff_x / dist local direction_x = diff_x / dist
local direction_y = diff_y / dist local direction_y = diff_y / dist