fixed some misuse of ipairs over pairs

This commit is contained in:
2026-06-25 11:43:54 -05:00
parent 998cc318f6
commit bd5b6376e9

View File

@@ -179,9 +179,9 @@ function ThrottleInit()
while true do
local currentStates = getRelayStates()
for pname, currentState in ipairs(currentStates) do
for pname, currentState in pairs(currentStates) do
local initialState = initialStates[pname]
for k, v in ipairs(currentState) do
for k, v in pairs(currentState) do
if initialState[k] ~= v then
Throttles[throttleType].name = pname
Throttles[throttleType].side = k
@@ -545,8 +545,8 @@ function UpdateGlobalThrust()
end
end
for _, d in ipairs(thrustDirections) do
for _, t in ipairs(Thrusters) do
for _, d in pairs(thrustDirections) do
for _, t in pairs(Thrusters) do
if t.affectVectors.lateral == d then
SetThrusterPower(t, d)
end