Skip to content

Commit

Permalink
HHP-8: fix Xbox and RD controls for Fan Railer mod
Browse files Browse the repository at this point in the history
  • Loading branch information
YoRyan committed Apr 17, 2021
1 parent 7039a10 commit dea111f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,15 @@ Update = RailWorks.wraperrors(function (_)
end
end)

OnControlValueChange = RailWorks.SetControlValue
OnControlValueChange = RailWorks.wraperrors(function (name, index, value)
-- Fix Xbox and Raildriver controls for Fan Railer's mod.
if name == "VirtualThrottle"
and RailWorks.ControlExists("NewVirtualThrottle", 0) then
RailWorks.SetControlValue("NewVirtualThrottle", 0, value)
end

RailWorks.SetControlValue(name, index, value)
end)

OnCustomSignalMessage = RailWorks.wraperrors(function (message)
atc:receivemessage(message)
Expand Down

0 comments on commit dea111f

Please sign in to comment.