moonbus: fix getting next target after reaching target dock

This commit is contained in:
Dejvino 2024-08-10 16:17:20 +02:00
parent 62b85fa0f2
commit eb8d8a722e

View File

@ -52,10 +52,10 @@ function load_level()
gravity=maplevel.gravity or 0.01
engine_power=0.1
fuel_cons=0.005
fuel_cons=0.01
land_speed_limit=1
bonus_docked=1
transed_per_level=1
transed_per_level=5
plr_pos=find_random_point_by_flag(1)
telem_spd={}
@ -90,15 +90,16 @@ function _update()
if btn(➡️) then plr_engine=➡️ end
end
if plr_docked and btn(❎) then
if plr_win then
make_progress()
else
plr_docked=false
plr_static=false
plr_engine=⬆️
plr_speed={x=0,y=0.5}
plr_docked=false
plr_static=false
plr_engine=⬆️
plr_speed={x=0,y=0.5}
if not plr_win then
sfx(4)
else
--
end
make_progress()
end
end
@ -305,8 +306,9 @@ function make_progress()
if (plr_win) then
plr_level=get_new_level()
load_level()
else
next_target()
end
next_target()
end
function find_random_point_by_flag(f)