corrected bug where sound stopped on top of fog. now sound just drone instantly.

This commit is contained in:
lee2sman 2022-05-13 23:40:39 -04:00
parent d709e6f9e9
commit ee630a2bb9
1 changed files with 5 additions and 2 deletions

View File

@ -30,9 +30,12 @@ function love.update(dt)
local terrain = get_terrain(p_x,p_y)
--play drone corresponding to current space if not playing
if terrain<5 then
if terrain<5 and sound_switched == false then
stop_old_drone(current_drone)
choose_drone()
sound_switched = true
elseif terrain>=5 then
sound_switched = false
end
play_drone(current_drone)
@ -168,7 +171,7 @@ end
function draw_portal()
local spriteNum = math.floor(player.currentTime / player.duration * 2) + building_base
love.graphics.draw(building_sprite[spriteNum], grid_x + ((portal_y-portal_x) * (block_width / 2)) + block_width/4, grid_y + ((portal_x+portal_y) * (block_depth / 2)) - (block_depth * (grid_size / 2)) - block_depth - block_height/8, 0, 1)
love.graphics.draw(building_sprite[spriteNum], grid_x + ((portal_y-portal_x) * (block_width / 2)) + block_width/4, grid_y + ((portal_x+portal_y) * (block_depth / 2)) - (block_depth * (grid_size / 2)) - block_depth - block_height/4, 0, 1)
end