Mark
/
celeste-ai
Archived
1
0
Fork 0

Added bonus frames for jumping

(necessary for jump-l and jump-r)
master
Mark 2023-02-24 14:19:30 -08:00
parent 2ff526a072
commit 2b1140e85f
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@ hack_ready = false
-- Slow down frame rate -- Slow down frame rate
hack_frame_counter = 0 hack_frame_counter = 0
hack_frame_freeze = 10 -- Freeze for n frames hack_frame_freeze = 5 -- Freeze for n frames
hack_frame_foward = 3 -- Run this many frames without sending status hack_frame_foward = 3 -- Run this many frames without sending status
hack_frame_foward_bonus = 0 -- Set when actions need extra frames (like dashes) hack_frame_foward_bonus = 0 -- Set when actions need extra frames (like dashes)
@ -1256,6 +1256,10 @@ function _update()
extcmd("screen") extcmd("screen")
end end
if (btn(k_left) or btn(k_right)) and btn(k_jump) then
hack_frame_foward_bonus = 10
end
-- Run bonus frames if we earned bonus frames -- Run bonus frames if we earned bonus frames
for i=1,hack_frame_foward_bonus do for i=1,hack_frame_foward_bonus do
old_update() old_update()