Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for tricks-on-a-switch activation cleanup #24770

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ TRIK_SEL_FN = bind_add_param2("_SEL_FN", 2, 301)
TRIK_ACT_FN = bind_add_param2("_ACT_FN", 3, 300)
TRIK_COUNT = bind_add_param2("_COUNT", 4, 3)
TRICKS = {}
local last_trick_action_state = rc:get_aux_cached(TRIK_ACT_FN:get())


function tricks_exist()
Expand Down Expand Up @@ -764,7 +765,6 @@ function check_auto_mission()
end
end

local last_trick_action_state = rc:get_aux_cached(TRIK_ACT_FN:get())
local trick_sel_chan = nil
local last_trick_selection = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ local function sq(x)
return x*x
end

local last_trick_action_state = nil
if TRIK_ENABLE:get() > 0 then
--[[
// @Param: TRIK_SEL_FN
Expand All @@ -358,6 +359,8 @@ if TRIK_ENABLE:get() > 0 then
TRIK_COUNT = bind_add_param2("_COUNT", 4, 3)
TRICKS = {}

last_trick_action_state = rc:get_aux_cached(TRIK_ACT_FN:get())

-- setup parameters for tricks
local count = math.floor(constrain(TRIK_COUNT:get(),1,11))
for i = 1, count do
Expand Down Expand Up @@ -3110,7 +3113,6 @@ function check_auto_mission()
end
end

local last_trick_action_state = rc:get_aux_cached(TRIK_ACT_FN:get())
local trick_sel_chan = nil
local last_trick_selection = nil

Expand Down
Loading